aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-04-28 03:03:42 -0600
committerSelene ToyKeeper2023-04-28 03:03:42 -0600
commitf34fe6dad847f4a8f1e10739d55adb35ba3e185b (patch)
tree55cb9111e1f592f126f35c6bafc386f0a238323c /spaghetti-monster
parentchanged lockout RGB aux default to blinking voltage, instead of blinking disco (diff)
downloadanduril-f34fe6dad847f4a8f1e10739d55adb35ba3e185b.tar.gz
anduril-f34fe6dad847f4a8f1e10739d55adb35ba3e185b.tar.bz2
anduril-f34fe6dad847f4a8f1e10739d55adb35ba3e185b.zip
RGB aux: always preview in high mode, and show voltage during 3-second post-off period
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/aux-leds.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/spaghetti-monster/anduril/aux-leds.c b/spaghetti-monster/anduril/aux-leds.c
index 5ac92a3..237390c 100644
--- a/spaghetti-monster/anduril/aux-leds.c
+++ b/spaghetti-monster/anduril/aux-leds.c
@@ -101,11 +101,14 @@ void rgb_led_update(uint8_t mode, uint16_t arg) {
uint8_t pattern = (mode>>4); // off, low, high, blinking, ... more?
uint8_t color = mode & 0x0f;
- // preview in blinking mode is awkward... use high instead
- if ((! go_to_standby) && (pattern > 2)) { pattern = 2; }
+ // always preview in high mode
+ if (! go_to_standby) { pattern = 2; }
- // use high mode for a few seconds after initial poweroff
- if (arg < (SLEEP_TICKS_PER_SECOND*3)) pattern = 2;
+ // use voltage high mode for a few seconds after initial poweroff
+ else if (arg < (SLEEP_TICKS_PER_SECOND*3)) {
+ pattern = 2;
+ color = RGB_LED_NUM_COLORS - 1;
+ }
const uint8_t *colors = rgb_led_colors;
uint8_t actual_color = 0;