aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/aux-leds.c4
-rw-r--r--spaghetti-monster/anduril/aux-leds.h2
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
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.