added prev_mode

pull/365/head
Nate Soares 7 years ago
parent 4cb339bd8f
commit 8ea55ff76f

@ -34,6 +34,16 @@ void LEDControl::next_mode(void) {
return set_mode(mode);
}
void LEDControl::prev_mode(void) {
mode--;
if (mode >= LED_MAX_MODES || !modes[mode]) {
return set_mode(0);
}
return set_mode(mode);
}
void
LEDControl::set_mode(uint8_t mode_) {
if (mode_ >= LED_MAX_MODES)

@ -90,6 +90,7 @@ class LEDControl : public KaleidoscopePlugin {
void begin(void) final;
static void next_mode(void);
static void prev_mode(void);
static void setup(void);
static void update(void) {
if (modes[mode])

Loading…
Cancel
Save