aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2020-07-30 18:22:06 -0600
committerSelene ToyKeeper2020-07-30 18:22:06 -0600
commitbaf32e54429753c560be45b8cd279a53d4231ce6 (patch)
tree4d889d6614ddcaccfac2d661a3b87a6e923e28f2
parentfixed bug: ramp mode acted strange if ramp level was changed after turning on... (diff)
downloadanduril-baf32e54429753c560be45b8cd279a53d4231ce6.tar.gz
anduril-baf32e54429753c560be45b8cd279a53d4231ce6.tar.bz2
anduril-baf32e54429753c560be45b8cd279a53d4231ce6.zip
fixed bug: 4H from lockout to ramp would immediately activate the sunset timer
-rw-r--r--spaghetti-monster/anduril/lockout-mode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/spaghetti-monster/anduril/lockout-mode.c b/spaghetti-monster/anduril/lockout-mode.c
index 14739fe..40bb6cf 100644
--- a/spaghetti-monster/anduril/lockout-mode.c
+++ b/spaghetti-monster/anduril/lockout-mode.c
@@ -99,6 +99,9 @@ uint8_t lockout_state(Event event, uint16_t arg) {
// 4 clicks, but hold last: exit and start at floor
else if (event == EV_click4_hold) {
blink_confirm(1);
+ // reset button sequence to avoid activating anything in ramp mode
+ current_event = 0;
+ // ... and back to ramp mode
set_state(steady_state, 1);
return MISCHIEF_MANAGED;
}