diff options
| author | Selene ToyKeeper | 2020-08-24 14:29:56 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2020-08-24 14:29:56 -0600 |
| commit | 54b804f21f4ff00300176dc9dfa99c886393c88b (patch) | |
| tree | 9ee389c98343c64d852ea0cd8ff3ff694980ab3d /spaghetti-monster | |
| parent | raised ceiling levels for simple UI in each build target (diff) | |
| download | anduril-54b804f21f4ff00300176dc9dfa99c886393c88b.tar.gz anduril-54b804f21f4ff00300176dc9dfa99c886393c88b.tar.bz2 anduril-54b804f21f4ff00300176dc9dfa99c886393c88b.zip | |
changed "Off 2H" to "ceil or turbo, based on simple UI active", and
changed "Full UI Ramp 2C" to "ceil or turbo, based on whether already ramped up or not"
Diffstat (limited to 'spaghetti-monster')
| -rw-r--r-- | spaghetti-monster/anduril/anduril-manual.txt | 5 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/off-mode.c | 8 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/ramp-mode.c | 14 |
3 files changed, 18 insertions, 9 deletions
diff --git a/spaghetti-monster/anduril/anduril-manual.txt b/spaghetti-monster/anduril/anduril-manual.txt index 9f7f295..9d888de 100644 --- a/spaghetti-monster/anduril/anduril-manual.txt +++ b/spaghetti-monster/anduril/anduril-manual.txt @@ -566,7 +566,8 @@ Mode UI Button Action Off Any 1C On (ramp mode, memorized level) Off Any 1H On (ramp mode, floor level) Off Any 2C On (ramp mode, ceiling level) -Off Any 2H On (momentary ceiling level) +Off Simple 2H On (momentary ceiling level) +Off Full 2H On (momentary turbo) Off Any 3C Battcheck mode Off Full 3H Strobe mode (whichever was used last) Off Any 4C Lockout mode @@ -583,7 +584,7 @@ Ramp Any 1C Off Ramp Any 1H Ramp (up, with reversing) Ramp Any 2H Ramp (down) Ramp Simple 2C Go to/from ceiling -Ramp Full 2C Go to/from turbo +Ramp Full 2C Go to/from ceiling (or turbo if at ceil already) Ramp Full 3C Change ramp style (smooth / stepped) Ramp Any 3H Tint ramping (on some lights) Ramp Any 4C Lockout mode diff --git a/spaghetti-monster/anduril/off-mode.c b/spaghetti-monster/anduril/off-mode.c index c650be4..ab6156a 100644 --- a/spaghetti-monster/anduril/off-mode.c +++ b/spaghetti-monster/anduril/off-mode.c @@ -136,9 +136,13 @@ uint8_t off_state(Event event, uint16_t arg) { set_state(steady_state, memorized_level); return MISCHIEF_MANAGED; } - // click, hold: momentary at ceiling level + // click, hold: momentary at ceiling or turbo else if (event == EV_click2_hold) { - set_level(nearest_level(MAX_LEVEL)); + if (simple_ui_active) { + set_level(nearest_level(MAX_LEVEL)); + } else { + set_level(MAX_LEVEL); + } return MISCHIEF_MANAGED; } else if (event == EV_click2_hold_release) { diff --git a/spaghetti-monster/anduril/ramp-mode.c b/spaghetti-monster/anduril/ramp-mode.c index 1429cc0..78cf9af 100644 --- a/spaghetti-monster/anduril/ramp-mode.c +++ b/spaghetti-monster/anduril/ramp-mode.c @@ -100,12 +100,16 @@ uint8_t steady_state(Event event, uint16_t arg) { } // 2 clicks: go to/from highest level else if (event == EV_2clicks) { + // simple UI: to/from ceiling + // full UI: to/from ceiling if mem < ceiling, + // or to/from turbo if mem >= ceiling uint8_t turbo_level; - #ifdef USE_SIMPLE_UI - if (simple_ui_active) { turbo_level = mode_max; } - else - #endif - turbo_level = MAX_LEVEL; + if ((memorized_level < mode_max) + #ifdef USE_SIMPLE_UI + || simple_ui_active + #endif + ) { turbo_level = mode_max; } + else { turbo_level = MAX_LEVEL; } if (actual_level < turbo_level) { // true turbo, not the mode-specific ceiling |
