Only call update() on cycles when we sync LEDs

Since LED modes only send updates to the hardware at `syncDelay` intervals, calling
`update()` on the active mode every cycle doesn't make animations any smoother.

Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
pull/593/head
Michael Richters 6 years ago
parent 764a2457ab
commit b083803dc0
No known key found for this signature in database
GPG Key ID: C40C181A55000EF6

@ -176,8 +176,8 @@ kaleidoscope::EventHandlerResult LEDControl::beforeReportingState(void) {
if (elapsed > syncDelay) { if (elapsed > syncDelay) {
syncLeds(); syncLeds();
syncTimer += syncDelay; syncTimer += syncDelay;
update();
} }
update();
return kaleidoscope::EventHandlerResult::OK; return kaleidoscope::EventHandlerResult::OK;
} }

Loading…
Cancel
Save