|
|
@ -39,16 +39,16 @@ void MyOldFriend::toggleLEDs(MyOldFriend::Event event) {
|
|
|
|
static uint8_t prev_led_mode = 0;
|
|
|
|
static uint8_t prev_led_mode = 0;
|
|
|
|
|
|
|
|
|
|
|
|
switch (event) {
|
|
|
|
switch (event) {
|
|
|
|
case Suspend:
|
|
|
|
case Suspend:
|
|
|
|
prev_led_mode = ::LEDControl.get_mode_index();
|
|
|
|
prev_led_mode = ::LEDControl.get_mode_index();
|
|
|
|
::LEDOff.activate();
|
|
|
|
::LEDOff.activate();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case Resume:
|
|
|
|
case Resume:
|
|
|
|
::LEDControl.set_mode(prev_led_mode);
|
|
|
|
::LEDControl.set_mode(prev_led_mode);
|
|
|
|
::LEDControl.refreshAll();
|
|
|
|
::LEDControl.refreshAll();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case Sleep:
|
|
|
|
case Sleep:
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|