From b169de4cbcd3a1802b87990d5796750abf1d3426 Mon Sep 17 00:00:00 2001 From: midilab Date: Mon, 16 Jul 2018 09:53:38 -0300 Subject: [PATCH] hotfix: force onStartCallback to be called before we send our first clock signal. this fixes external gear problems related to start on slave midi device. --- src/uClock.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/uClock.cpp b/src/uClock.cpp index c73fc01..8411dbe 100755 --- a/src/uClock.cpp +++ b/src/uClock.cpp @@ -90,6 +90,10 @@ void uClockClass::start() { start_timer = millis(); + if (onClockStartCallback) { + onClockStartCallback(); + } + if (mode == INTERNAL_CLOCK) { state = STARTED; mod6_counter = 0; @@ -106,10 +110,6 @@ void uClockClass::start() div16th_counter = 0; counter = 0; } - - if (onClockStartCallback) { - onClockStartCallback(); - } } void uClockClass::stop()