|
|
@ -2,6 +2,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
LEDMode *LEDControl_::modes[LED_MAX_MODES];
|
|
|
|
LEDMode *LEDControl_::modes[LED_MAX_MODES];
|
|
|
|
uint8_t LEDControl_::previousMode, LEDControl_::mode;
|
|
|
|
uint8_t LEDControl_::previousMode, LEDControl_::mode;
|
|
|
|
|
|
|
|
uint16_t LEDControl_::syncDelay = 16;
|
|
|
|
|
|
|
|
uint32_t LEDControl_::syncTimer;
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
LEDMode::activate (void) {
|
|
|
|
LEDMode::activate (void) {
|
|
|
@ -126,6 +128,8 @@ LEDControl_::begin (void) {
|
|
|
|
|
|
|
|
|
|
|
|
event_handler_hook_use(eventHandler);
|
|
|
|
event_handler_hook_use(eventHandler);
|
|
|
|
loop_hook_use(loopHook);
|
|
|
|
loop_hook_use(loopHook);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
syncTimer = millis() + syncDelay;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Key
|
|
|
|
Key
|
|
|
@ -144,7 +148,10 @@ LEDControl_::loopHook (bool postClear) {
|
|
|
|
if (postClear)
|
|
|
|
if (postClear)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (millis() > syncTimer) {
|
|
|
|
led_sync();
|
|
|
|
led_sync();
|
|
|
|
|
|
|
|
syncTimer = millis() + syncDelay;
|
|
|
|
|
|
|
|
}
|
|
|
|
update();
|
|
|
|
update();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|