aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2019-11-20 15:34:48 -0700
committerSelene ToyKeeper2019-11-20 15:34:48 -0700
commit02ba399f83371d3c8dba866fefb2519767d809b7 (patch)
treedeee785616d0ae57a287bc0b829a726c169541f9 /spaghetti-monster
parentmerged more updates from fsm / irq-refactor branches, finishing up previous c... (diff)
downloadanduril-02ba399f83371d3c8dba866fefb2519767d809b7.tar.gz
anduril-02ba399f83371d3c8dba866fefb2519767d809b7.tar.bz2
anduril-02ba399f83371d3c8dba866fefb2519767d809b7.zip
made the button LED turn off in momentary mode, instead of staying on forever
Diffstat (limited to '')
-rw-r--r--spaghetti-monster/anduril/anduril.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c
index a86af16..5c5a6ee 100644
--- a/spaghetti-monster/anduril/anduril.c
+++ b/spaghetti-monster/anduril/anduril.c
@@ -1863,9 +1863,14 @@ uint8_t momentary_state(Event event, uint16_t arg) {
}
}
else {
- if (arg > TICKS_PER_SECOND*15) { // sleep after 15 seconds
+ if (arg > TICKS_PER_SECOND*5) { // sleep after 5 seconds
go_to_standby = 1; // sleep while light is off
- // TODO: lighted button should use lockout config?
+ // turn off lighted button
+ #ifdef USE_INDICATOR_LED
+ indicator_led(0);
+ #elif defined(USE_AUX_RGB_LEDS)
+ rgb_led_update(0, 0);
+ #endif
}
}
return MISCHIEF_MANAGED;