aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Schubert2026-04-02 21:55:07 +0200
committerChristian Schubert2026-04-02 21:55:07 +0200
commit9fa6aa01628c726e535ec4c37359968418ffdecf (patch)
tree8c666e61c9e487986fa76164dc6d0d6d5a6953e5
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 '')
-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;
}
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.