Merge pull request #13 from keyboardio/f/reActivate

Add LEDControl.reActivate()
pull/365/head
Jesse Vincent 7 years ago committed by GitHub
commit 0fc47c3818

@ -38,10 +38,8 @@ LEDControl::set_mode(uint8_t mode_) {
if (mode_ >= LED_MAX_MODES)
return;
set_all_leds_to({0, 0, 0});
mode = mode_;
if (modes[mode])
modes[mode]->onActivate();
reactivate();
}
uint8_t LEDControl::get_mode_index(void) {

@ -102,6 +102,11 @@ class LEDControl : public KaleidoscopePlugin {
static void set_mode(uint8_t mode);
static uint8_t get_mode_index();
static LEDMode *get_mode();
static void reactivate() {
set_all_leds_to({0, 0, 0});
if (modes[mode])
modes[mode]->onActivate();
}
static int8_t mode_add(LEDMode *mode);

Loading…
Cancel
Save