From 8e1d7d2ed82b6b37348524ceb5e34306f4120c61 Mon Sep 17 00:00:00 2001 From: midilab Date: Wed, 4 May 2022 07:18:17 -0300 Subject: [PATCH] fix variable declaration outside his usage scope --- src/uClock.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/uClock.cpp b/src/uClock.cpp index b4a8572..fff27e2 100755 --- a/src/uClock.cpp +++ b/src/uClock.cpp @@ -167,9 +167,10 @@ void uClockClass::setTimerTempo(float bpm) { // 96 ppqn resolution uint32_t tick_us_interval = (60000000 / 24 / bpm); - float tick_hertz_interval = 1/((float)tick_us_interval/1000000); #if defined(ARDUINO_ARCH_AVR) + float tick_hertz_interval = 1/((float)tick_us_interval/1000000); + uint32_t ocr; uint8_t tccr = 0;