aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2020-07-31 23:08:40 -0600
committerSelene ToyKeeper2020-07-31 23:08:40 -0600
commite08e95797801ac453390c8f75041ab148f1bb635 (patch)
tree285a239f4e232edfe3caeb9d567af72ee82dc320
parentBlock the sunset timer in Simple UI. (diff)
downloadanduril-e08e95797801ac453390c8f75041ab148f1bb635.tar.gz
anduril-e08e95797801ac453390c8f75041ab148f1bb635.tar.bz2
anduril-e08e95797801ac453390c8f75041ab148f1bb635.zip
Block the auto-lock function in Simple UI.
-rw-r--r--spaghetti-monster/anduril/off-mode.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/spaghetti-monster/anduril/off-mode.c b/spaghetti-monster/anduril/off-mode.c
index 4977d6b..07331f1 100644
--- a/spaghetti-monster/anduril/off-mode.c
+++ b/spaghetti-monster/anduril/off-mode.c
@@ -68,11 +68,17 @@ uint8_t off_state(Event event, uint16_t arg) {
#ifdef USE_AUTOLOCK
// lock the light after being off for N minutes
- uint16_t ticks = autolock_time * SLEEP_TICKS_PER_SECOND * 60;
- if ((autolock_time > 0) && (arg > ticks)) {
- set_state(lockout_state, 0);
+ #ifdef USE_SIMPLE_UI
+ if (! simple_ui_active) { // no auto-lock in Simple UI
+ #endif
+ uint16_t ticks = autolock_time * SLEEP_TICKS_PER_SECOND * 60;
+ if ((autolock_time > 0) && (arg > ticks)) {
+ set_state(lockout_state, 0);
+ }
+ #ifdef USE_SIMPLE_UI
}
#endif
+ #endif // ifdef USE_AUTOLOCK
return MISCHIEF_MANAGED;
}
#endif
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.