Merge pull request #8 from keyboardio/f/init-mode

Add LEDControl.init_mode()
pull/365/head
Jesse Vincent 7 years ago committed by GitHub
commit 3a90cc42b2

@ -51,6 +51,12 @@ LEDControl_::update(void) {
previousMode = mode;
}
void
LEDControl_::init_mode(void) {
if (modes[mode])
(modes[mode]->init)();
}
void
LEDControl_::set_mode(uint8_t mode_) {
if (mode_ < LED_MAX_MODES)

@ -28,6 +28,7 @@ class LEDControl_ : public KaleidoscopePlugin {
static void update(void);
static void set_mode(uint8_t mode);
static uint8_t get_mode();
static void init_mode(void);
static int8_t mode_add(LEDMode *mode);

Loading…
Cancel
Save