Your ROOT_URL in app.ini is https://source.parasitstudio.de:63000/ but you are visiting https://source.parasitstudio.de/wirtz/uClock/commit/d8723b0df47552624e36aeddfe34e5dd32f1fd8c?style=unified&whitespace=show-all You should set ROOT_URL correctly, otherwise the web may not work correctly.

add a guard on getTempo to avoid slave calculations before buffer gets full

pull/19/head
midilab 3 years ago
parent c2b63d362d
commit d8723b0df4
  1. 4
      src/uClock.cpp

@ -244,6 +244,10 @@ float uClockClass::getTempo()
{
if (mode == EXTERNAL_CLOCK) {
uint32_t acc = 0;
// wait the buffer get full
if (ext_interval_buffer[EXT_INTERVAL_BUFFER_SIZE-1] == 0) {
return tempo;
}
for (uint8_t i=0; i < EXT_INTERVAL_BUFFER_SIZE; i++) {
acc += ext_interval_buffer[i];
}

Loading…
Cancel
Save