diff options
| author | Selene ToyKeeper | 2020-10-16 20:45:24 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2020-10-16 20:45:24 -0600 |
| commit | 338b96bf13e2e3dedc72391cf92fdaafa93c2605 (patch) | |
| tree | 3c13cdee624b48a20a84b8714c145716a1bcece3 | |
| parent | improved docs, changed blinky order: Battcheck, Tempcheck, Beacon, SOS (diff) | |
| download | anduril-338b96bf13e2e3dedc72391cf92fdaafa93c2605.tar.gz anduril-338b96bf13e2e3dedc72391cf92fdaafa93c2605.tar.bz2 anduril-338b96bf13e2e3dedc72391cf92fdaafa93c2605.zip | |
added ramp 3H -> momentary turbo
| -rw-r--r-- | spaghetti-monster/anduril/anduril-manual.txt | 2 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/ramp-mode.c | 14 |
2 files changed, 16 insertions, 0 deletions
diff --git a/spaghetti-monster/anduril/anduril-manual.txt b/spaghetti-monster/anduril/anduril-manual.txt index faa8b19..b3a1cef 100644 --- a/spaghetti-monster/anduril/anduril-manual.txt +++ b/spaghetti-monster/anduril/anduril-manual.txt @@ -158,6 +158,7 @@ While the light is on, a few actions are available: - 3C: Switch to the other ramp style. (smooth / stepped) - 3H: Tint ramping (on lights which have it). + - 3H: Momentary turbo (on lights with no tint ramping). - 4C: Go to lockout mode. @@ -690,6 +691,7 @@ Ramp Simple 2C Go to/from ceiling 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 3H Momentary turbo (on lights without tint ramping) Ramp Any 4C Lockout mode Ramp Full 5C Momentary mode Ramp Full 5H Sunset timer on, and add 5 minutes diff --git a/spaghetti-monster/anduril/ramp-mode.c b/spaghetti-monster/anduril/ramp-mode.c index 34c2511..9d6eba9 100644 --- a/spaghetti-monster/anduril/ramp-mode.c +++ b/spaghetti-monster/anduril/ramp-mode.c @@ -358,6 +358,20 @@ uint8_t steady_state(Event event, uint16_t arg) { return MISCHIEF_MANAGED; } + #ifndef USE_TINT_RAMPING + // 3H: momentary turbo (on lights with no tint ramping) + else if (event == EV_click3_hold) { + if (! arg) { // first frame only, to allow thermal regulation to work + set_level_and_therm_target(MAX_LEVEL); + } + return MISCHIEF_MANAGED; + } + else if (event == EV_click3_hold_release) { + set_level_and_therm_target(memorized_level); + return MISCHIEF_MANAGED; + } + #endif // ifndef USE_TINT_RAMPING + #ifdef USE_MOMENTARY_MODE // 5 clicks: shortcut to momentary mode else if (event == EV_5clicks) { |
