aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spaghetti-monster/anduril/MODELS5
-rw-r--r--spaghetti-monster/anduril/anduril-manual.txt5
-rw-r--r--spaghetti-monster/anduril/config-default.h4
-rw-r--r--spaghetti-monster/anduril/config-mode.c12
4 files changed, 24 insertions, 2 deletions
diff --git a/spaghetti-monster/anduril/MODELS b/spaghetti-monster/anduril/MODELS
index f4a0531..11f7dfa 100644
--- a/spaghetti-monster/anduril/MODELS
+++ b/spaghetti-monster/anduril/MODELS
@@ -11,6 +11,8 @@ Model numbers:
0132 emisar-d4s-219c
0133 emisar-d4sv2
0134 emisar-d4sv2-219
+0135 emisar-d4sv2-tintramp
+0136 emisar-d4sv2-tintramp-fet
0141 emisar-d18
0142 emisar-d18-219
0211 noctigon-kr4
@@ -23,6 +25,9 @@ Model numbers:
0261 noctigon-k9.3
0262 noctigon-k9.3-nofet
0263 noctigon-k9.3-219
+0265 noctigon-k9.3-tintramp-nofet
+0266 noctigon-k9.3-tintramp-fet
+0267 noctigon-k9.3-tintramp-219
0311 fw3a
0312 fw3a-219
0313 fw3a-nofet
diff --git a/spaghetti-monster/anduril/anduril-manual.txt b/spaghetti-monster/anduril/anduril-manual.txt
index ef0ad5f..2b5f589 100644
--- a/spaghetti-monster/anduril/anduril-manual.txt
+++ b/spaghetti-monster/anduril/anduril-manual.txt
@@ -533,6 +533,11 @@ menu item, the light follows the same pattern:
to enter a number. It will keep buzzing until the user stops
clicking, so there is no need to hurry.
+ The actions here are:
+ - click: add 1
+ - hold: add 10 (only in versions 2021-09 or later)
+ - wait: exit
+
After entering a number, or after skipping every menu item, it waits
until the button is released then exits the menu. It should return to
whatever mode the light was in before entering the config menu.
diff --git a/spaghetti-monster/anduril/config-default.h b/spaghetti-monster/anduril/config-default.h
index 5b9897c..406e98b 100644
--- a/spaghetti-monster/anduril/config-default.h
+++ b/spaghetti-monster/anduril/config-default.h
@@ -181,6 +181,10 @@
#define USE_MOMENTARY_MODE
+// enable a shortcut for +10 in number entry mode
+// (click for +1, hold for +10)
+#define USE_NUMBER_ENTRY_PLUS10
+
// cut clock speed at very low modes for better efficiency
// (defined here so config files can override it)
#define USE_DYNAMIC_UNDERCLOCKING
diff --git a/spaghetti-monster/anduril/config-mode.c b/spaghetti-monster/anduril/config-mode.c
index f89a922..3af2a1c 100644
--- a/spaghetti-monster/anduril/config-mode.c
+++ b/spaghetti-monster/anduril/config-mode.c
@@ -146,9 +146,17 @@ uint8_t number_entry_state(Event event, uint16_t arg) {
return MISCHIEF_MANAGED;
}
- // count clicks
- else if (event == EV_click1_release) {
+ // count clicks: click = +1, hold = +10
+ else if ((event == EV_click1_release)
+ #ifdef USE_NUMBER_ENTRY_PLUS10
+ || (event == EV_click1_hold_release)
+ #endif
+ ) {
entry_step = 1; // in case user clicked during initial delay
+ #ifdef USE_NUMBER_ENTRY_PLUS10
+ if (event == EV_click1_hold_release) number_entry_value += 10;
+ else
+ #endif
number_entry_value ++; // update the result
empty_event_sequence(); // reset FSM's click count
set_level(RAMP_SIZE/2); // flash briefly