fixed LED sync overflow bug

pull/365/head
matt venn 6 years ago
parent 279ac89ca6
commit 441812abcc

@ -151,8 +151,8 @@ kaleidoscope::EventHandlerResult LEDControl::beforeReportingState(void) {
if (paused) if (paused)
return kaleidoscope::EventHandlerResult::OK; return kaleidoscope::EventHandlerResult::OK;
uint16_t current_time = millis(); uint16_t elapsed = Kaleidoscope.millisAtCycleStart() - syncTimer;
if ((current_time - syncTimer) > syncDelay) { if (elapsed > syncDelay) {
syncLeds(); syncLeds();
syncTimer += syncDelay; syncTimer += syncDelay;
} }

Loading…
Cancel
Save