aboutsummaryrefslogtreecommitdiff
path: root/ui/simple
diff options
context:
space:
mode:
authorChristian Schubert2026-04-02 21:55:07 +0200
committerChristian Schubert2026-04-02 21:55:07 +0200
commit9fa6aa01628c726e535ec4c37359968418ffdecf (patch)
tree8c666e61c9e487986fa76164dc6d0d6d5a6953e5 /ui/simple
parent3C from aux/on: color wheel (diff)
downloadanduril-9fa6aa01628c726e535ec4c37359968418ffdecf.tar.gz
anduril-9fa6aa01628c726e535ec4c37359968418ffdecf.tar.bz2
anduril-9fa6aa01628c726e535ec4c37359968418ffdecf.zip
off: re-enter standbysimple-ui
in case we left it by accident (random interrupt or cosmic rays or whatever)
Diffstat (limited to 'ui/simple')
-rw-r--r--ui/simple/simple.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ui/simple/simple.c b/ui/simple/simple.c
index 38e2922..668a0cf 100644
--- a/ui/simple/simple.c
+++ b/ui/simple/simple.c
@@ -139,7 +139,14 @@ uint8_t off_state(Event event, uint16_t arg) {
return EVENT_HANDLED;
}
- if (event == EV_1click) {
+ else if (event == EV_tick) {
+ if (arg > HOLD_TIMEOUT) {
+ go_to_standby = 1;
+ }
+ return EVENT_HANDLED;
+ }
+
+ else if (event == EV_1click) {
set_state(aux_state, 0);
return EVENT_HANDLED;
}