aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spaghetti-monster/anduril/anduril-manual.txt5
-rw-r--r--spaghetti-monster/anduril/off-mode.c8
-rw-r--r--spaghetti-monster/anduril/ramp-mode.c14
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