aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2024-08-04 06:03:38 -0600
committerSelene ToyKeeper2024-08-04 06:03:38 -0600
commit4f7f90df760f1bd215ce1b2ec671d62b332690c6 (patch)
tree9c1c3c393da35e989c244630bbd15823f386a9ab
parentinclude hardware-specific readme files in the release .zip (diff)
downloadanduril-4f7f90df760f1bd215ce1b2ec671d62b332690c6.tar.gz
anduril-4f7f90df760f1bd215ce1b2ec671d62b332690c6.tar.bz2
anduril-4f7f90df760f1bd215ce1b2ec671d62b332690c6.zip
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.
-rw-r--r--docs/anduril-manual.md12
-rw-r--r--ui/anduril/off-mode.c26
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();