diff options
| author | Selene ToyKeeper | 2020-07-12 20:23:10 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2020-07-12 20:23:10 -0600 |
| commit | 41086b614b0d0732c7e246f6d1fdcb894fa7ec64 (patch) | |
| tree | 6fe817255d8e13b24f3c012f4a3bce855041e494 /spaghetti-monster | |
| parent | cleaned up s/ceiling/ceil/ and s/muggle_/simple_ui_/ in config files (diff) | |
| download | anduril-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.c | 18 |
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; } |
