diff options
| -rw-r--r-- | spaghetti-monster/anduril/aux-leds.c | 4 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/aux-leds.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/spaghetti-monster/anduril/aux-leds.c b/spaghetti-monster/anduril/aux-leds.c index c72eb70..5ac92a3 100644 --- a/spaghetti-monster/anduril/aux-leds.c +++ b/spaghetti-monster/anduril/aux-leds.c @@ -79,7 +79,7 @@ uint8_t voltage_to_rgb() { // do fancy stuff with the RGB aux LEDs // mode: 0bPPPPCCCC where PPPP is the pattern and CCCC is the color // arg: time slice number -void rgb_led_update(uint8_t mode, uint8_t arg) { +void rgb_led_update(uint8_t mode, uint16_t arg) { static uint8_t rainbow = 0; // track state of rainbow mode static uint8_t frame = 0; // track state of animation mode @@ -104,6 +104,8 @@ void rgb_led_update(uint8_t mode, uint8_t arg) { // preview in blinking mode is awkward... use high instead if ((! go_to_standby) && (pattern > 2)) { pattern = 2; } + // use high mode for a few seconds after initial poweroff + if (arg < (SLEEP_TICKS_PER_SECOND*3)) pattern = 2; const uint8_t *colors = rgb_led_colors; uint8_t actual_color = 0; diff --git a/spaghetti-monster/anduril/aux-leds.h b/spaghetti-monster/anduril/aux-leds.h index 1938557..2e656dc 100644 --- a/spaghetti-monster/anduril/aux-leds.h +++ b/spaghetti-monster/anduril/aux-leds.h @@ -8,7 +8,7 @@ void indicator_led_update(uint8_t mode, uint8_t tick); #endif #if defined(USE_AUX_RGB_LEDS) && defined(TICK_DURING_STANDBY) uint8_t setting_rgb_mode_now = 0; -void rgb_led_update(uint8_t mode, uint8_t arg); +void rgb_led_update(uint8_t mode, uint16_t arg); void rgb_led_voltage_readout(uint8_t bright); /* * 0: R |
