aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.