From 4f7f90df760f1bd215ce1b2ec671d62b332690c6 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sun, 4 Aug 2024 06:03:38 -0600 Subject: removed "Off -> 3H" strobe/mood mode access from Extended Simple UI fixes #85 The Simple UI is meant to be relatively child-safe, and the strobe modes are not. Users who want unsafe features enabled should use the full UI instead... and the strobe + mood modes should also have some safety features added, on drivers which have enough ROM to hold extra code. --- docs/anduril-manual.md | 12 ++++-------- ui/anduril/off-mode.c | 26 +++++++++++++------------- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/docs/anduril-manual.md b/docs/anduril-manual.md index 68c577c..cdf0dd1 100644 --- a/docs/anduril-manual.md +++ b/docs/anduril-manual.md @@ -142,17 +142,13 @@ manufacturer's request. This typically includes: - `Ramp -> 3C`: Toggle smooth or stepped ramp shape. - `Ramp -> 5H`: Sunset timer. - - `Off -> 3H`: Access the strobe/mood modes. - `Off -> 7C/7H`: Change the aux LED pattern. - `Lockout -> 7C/7H`: Change the aux LED pattern. -If your light uses Extended Simple UI, *think twice about letting kids use it*, -because the strobe/mood modes were not intended to be used in simple mode, and -can reach full power with no thermal regulation. - -It is likely that strobe/mood modes will be removed from Extended Simple UI in -the future, for safety reasons, or maybe have already been removed. But that -doesn't help with older firmware, so be careful. +Old versions (before 2024-08) also allowed access to strobe/mood modes, which +can be dangerous, so if you have one of those, *think twice about letting kids +use it*. Those modes were never intended to be child-safe, and can reach full +power with no thermal regulation. ### Configuring Simple UI diff --git a/ui/anduril/off-mode.c b/ui/anduril/off-mode.c index 36d771c..f699c89 100644 --- a/ui/anduril/off-mode.c +++ b/ui/anduril/off-mode.c @@ -264,19 +264,6 @@ uint8_t off_state(Event event, uint16_t arg) { #endif // ifndef USE_EXTENDED_SIMPLE_UI #endif // ifdef USE_SIMPLE_UI - // click, click, long-click: strobe mode - #ifdef USE_STROBE_STATE - else if (event == EV_click3_hold) { - set_state(strobe_state, 0); - return EVENT_HANDLED; - } - #elif defined(USE_BORING_STROBE_STATE) - else if (event == EV_click3_hold) { - set_state(boring_strobe_state, 0); - return EVENT_HANDLED; - } - #endif - #ifdef USE_INDICATOR_LED // 7 clicks: change indicator LED mode else if (event == EV_7clicks) { @@ -334,6 +321,19 @@ uint8_t off_state(Event event, uint16_t arg) { } #endif // ifdef USE_EXTENDED_SIMPLE_UI + // click, click, long-click: strobe mode + #ifdef USE_STROBE_STATE + else if (event == EV_click3_hold) { + set_state(strobe_state, 0); + return EVENT_HANDLED; + } + #elif defined(USE_BORING_STROBE_STATE) + else if (event == EV_click3_hold) { + set_state(boring_strobe_state, 0); + return EVENT_HANDLED; + } + #endif + // 10 clicks: enable simple UI else if (event == EV_10clicks) { blink_once(); -- cgit v1.2.3