Merge pull request #593 from gedankenexperimenter/led-control-speedup

Led control efficiency changes
pull/600/head
Gergely Nagy 6 years ago committed by GitHub
commit 199dfaca62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -22,7 +22,7 @@ namespace plugin {
LEDMode *LEDControl::modes[LED_MAX_MODES]; LEDMode *LEDControl::modes[LED_MAX_MODES];
uint8_t LEDControl::mode; uint8_t LEDControl::mode;
uint16_t LEDControl::syncDelay = 16; uint16_t LEDControl::syncDelay = 32; // 32ms interval => 30Hz refresh rate
uint16_t LEDControl::syncTimer; uint16_t LEDControl::syncTimer;
bool LEDControl::paused = false; bool LEDControl::paused = false;
@ -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