From dcfabb7ad335568b375217991f2b64d9393f0363 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sun, 9 Aug 2020 10:31:45 -0600 Subject: remapped "Off -> 2H" to momentary ceiling (instead of going to ceiling in ramp mode, and ramping down) --- spaghetti-monster/anduril/anduril-manual.txt | 6 ++++-- spaghetti-monster/anduril/off-mode.c | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/spaghetti-monster/anduril/anduril-manual.txt b/spaghetti-monster/anduril/anduril-manual.txt index b415972..82a76a9 100644 --- a/spaghetti-monster/anduril/anduril-manual.txt +++ b/spaghetti-monster/anduril/anduril-manual.txt @@ -113,7 +113,8 @@ There are four ways to access ramping mode when the light is off: - 1H: Turn on at the floor level. Let go after the light turns on to stay at the floor level, or keep holding to ramp up. - 2C: Turn on at the ceiling level. - - 2H: Turn on at the ceiling level, then ramp down. + - 2H: Turn on at the ceiling level, turn off when released. + (momentary high mode) While the light is on, a few basic actions are available: @@ -565,7 +566,7 @@ 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 (ramp mode, ceiling level, then ramp down) +Off Any 2H On (momentary ceiling level) Off Any 3C Lockout mode Off Full 3H Strobe mode (whichever was used last) Off Any 4C Battcheck mode @@ -602,6 +603,7 @@ Lockout Full 7H Aux LEDs: Next color Strobe (any) Full 1C Off Strobe (any) Full 2C Next strobe mode +Strobe (any) Full 3H Tint ramping (on some lights) Strobe (any) Full 5C Momentary mode (using current strobe) Candle Full 1H/2H Brighter / dimmer diff --git a/spaghetti-monster/anduril/off-mode.c b/spaghetti-monster/anduril/off-mode.c index fafc8b2..4284b08 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: go to highest level (ceiling) (for ramping down) + // click, hold: momentary at ceiling level else if (event == EV_click2_hold) { - set_state(steady_state, MAX_LEVEL); + set_level(nearest_level(MAX_LEVEL)); + return MISCHIEF_MANAGED; + } + else if (event == EV_click2_hold_release) { + set_level(0); return MISCHIEF_MANAGED; } // 2 clicks: highest mode (ceiling) -- cgit v1.2.3