aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2020-07-12 20:23:10 -0600
committerSelene ToyKeeper2020-07-12 20:23:10 -0600
commit41086b614b0d0732c7e246f6d1fdcb894fa7ec64 (patch)
tree6fe817255d8e13b24f3c012f4a3bce855041e494 /spaghetti-monster
parentcleaned up s/ceiling/ceil/ and s/muggle_/simple_ui_/ in config files (diff)
downloadanduril-41086b614b0d0732c7e246f6d1fdcb894fa7ec64.tar.gz
anduril-41086b614b0d0732c7e246f6d1fdcb894fa7ec64.tar.bz2
anduril-41086b614b0d0732c7e246f6d1fdcb894fa7ec64.zip
added lockout 4C -> on, lockout 4H -> floor, and strobe 5C -> momentary
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/anduril.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c
index 93ca900..250236b 100644
--- a/spaghetti-monster/anduril/anduril.c
+++ b/spaghetti-monster/anduril/anduril.c
@@ -1310,6 +1310,14 @@ uint8_t strobe_state(Event event, uint16_t arg) {
save_config();
return MISCHIEF_MANAGED;
}
+ #ifdef USE_MOMENTARY_MODE
+ // 5 clicks: go to momentary mode (momentary strobe)
+ else if (event == EV_5clicks) {
+ set_state(momentary_state, 0);
+ set_level(0);
+ return MISCHIEF_MANAGED;
+ }
+ #endif
#if defined(USE_LIGHTNING_MODE) || defined(USE_CANDLE_MODE)
// clock tick: bump the random seed
else if (event == EV_tick) {
@@ -1848,10 +1856,16 @@ uint8_t lockout_state(Event event, uint16_t arg) {
return MISCHIEF_MANAGED;
}
#endif
- // 4 clicks: exit
+ // 4 clicks: exit and turn on
else if (event == EV_4clicks) {
blink_confirm(1);
- set_state(off_state, 0);
+ set_state(steady_state, memorized_level);
+ return MISCHIEF_MANAGED;
+ }
+ // 4 clicks, but hold last: exit and start at floor
+ else if (event == EV_click4_hold) {
+ blink_confirm(1);
+ set_state(steady_state, 1);
return MISCHIEF_MANAGED;
}
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.