diff options
| author | Christian Schubert | 2026-04-02 21:55:07 +0200 |
|---|---|---|
| committer | Christian Schubert | 2026-04-02 21:55:07 +0200 |
| commit | 9fa6aa01628c726e535ec4c37359968418ffdecf (patch) | |
| tree | 8c666e61c9e487986fa76164dc6d0d6d5a6953e5 | |
| parent | 3C from aux/on: color wheel (diff) | |
| download | anduril-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 '')
| -rw-r--r-- | ui/simple/simple.c | 9 |
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; } |
