|
|
@ -37,13 +37,14 @@ void LEDControl::next_mode(void) {
|
|
|
|
void LEDControl::prev_mode(void) {
|
|
|
|
void LEDControl::prev_mode(void) {
|
|
|
|
if (mode == 0) {
|
|
|
|
if (mode == 0) {
|
|
|
|
// wrap around
|
|
|
|
// wrap around
|
|
|
|
mode = LED_MAX_MODES;
|
|
|
|
mode = LED_MAX_MODES - 1;
|
|
|
|
// then count down until reaching a valid mode
|
|
|
|
// then count down until reaching a valid mode
|
|
|
|
while (mode > 0 && !modes[mode]) mode--;
|
|
|
|
while (mode > 0 && !modes[mode]) mode--;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
mode--;
|
|
|
|
mode--;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
set_mode(mode);
|
|
|
|
|
|
|
|
|
|
|
|
return set_mode(mode);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|