aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spaghetti-monster/anduril/cfg-blf-lantern-t1616.h3
-rw-r--r--spaghetti-monster/anduril/cfg-blf-lantern.h3
-rw-r--r--spaghetti-monster/anduril/cfg-blf-q8-t1616.h3
-rw-r--r--spaghetti-monster/anduril/cfg-blf-q8.h3
-rw-r--r--spaghetti-monster/anduril/cfg-sofirn-sp10s.h18
-rw-r--r--spaghetti-monster/anduril/hank-cfg.h21
-rw-r--r--spaghetti-monster/anduril/ramp-mode.c10
-rw-r--r--spaghetti-monster/anduril/version.h2
8 files changed, 58 insertions, 5 deletions
diff --git a/spaghetti-monster/anduril/cfg-blf-lantern-t1616.h b/spaghetti-monster/anduril/cfg-blf-lantern-t1616.h
index 51c3d6a..1083596 100644
--- a/spaghetti-monster/anduril/cfg-blf-lantern-t1616.h
+++ b/spaghetti-monster/anduril/cfg-blf-lantern-t1616.h
@@ -56,6 +56,9 @@
#define SIMPLE_UI_CEIL RAMP_DISCRETE_CEIL
#define SIMPLE_UI_STEPS RAMP_DISCRETE_STEPS
+// Allow 3C in Simple UI for switching between smooth and stepped ramping
+#define USE_SIMPLE_UI_RAMPING_TOGGLE
+
#define USE_SOS_MODE
#define USE_SOS_MODE_IN_BLINKY_GROUP
diff --git a/spaghetti-monster/anduril/cfg-blf-lantern.h b/spaghetti-monster/anduril/cfg-blf-lantern.h
index 28c7dbb..6e30d55 100644
--- a/spaghetti-monster/anduril/cfg-blf-lantern.h
+++ b/spaghetti-monster/anduril/cfg-blf-lantern.h
@@ -54,6 +54,9 @@
#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL
#define RAMP_DISCRETE_STEPS 5
+// Allow 3C in Simple UI for switching between smooth and stepped ramping
+#define USE_SIMPLE_UI_RAMPING_TOGGLE
+
// LT1 can handle heat well, so don't limit simple mode
#define SIMPLE_UI_FLOOR RAMP_DISCRETE_FLOOR
#define SIMPLE_UI_CEIL RAMP_DISCRETE_CEIL
diff --git a/spaghetti-monster/anduril/cfg-blf-q8-t1616.h b/spaghetti-monster/anduril/cfg-blf-q8-t1616.h
index 6e63b8a..fe01d07 100644
--- a/spaghetti-monster/anduril/cfg-blf-q8-t1616.h
+++ b/spaghetti-monster/anduril/cfg-blf-q8-t1616.h
@@ -37,6 +37,9 @@
// also at Sofirn's request, enable 2 click turbo
#define USE_2C_MAX_TURBO
+// Allow 3C in Simple UI for switching between smooth and stepped ramping
+#define USE_SIMPLE_UI_RAMPING_TOGGLE
+
// stop panicking at ~75% power or ~3000 lm, this light has high thermal mass
#define THERM_FASTER_LEVEL (RAMP_SIZE*9/10) // throttle back faster when high
diff --git a/spaghetti-monster/anduril/cfg-blf-q8.h b/spaghetti-monster/anduril/cfg-blf-q8.h
index 45ade50..f1917ce 100644
--- a/spaghetti-monster/anduril/cfg-blf-q8.h
+++ b/spaghetti-monster/anduril/cfg-blf-q8.h
@@ -36,6 +36,9 @@
// also at Sofirn's request, enable 2 click turbo
#define USE_2C_MAX_TURBO
+// Allow 3C in Simple UI for switching between smooth and stepped ramping
+#define USE_SIMPLE_UI_RAMPING_TOGGLE
+
// stop panicking at ~75% power or ~3000 lm, this light has high thermal mass
#define THERM_FASTER_LEVEL (RAMP_SIZE*9/10) // throttle back faster when high
diff --git a/spaghetti-monster/anduril/cfg-sofirn-sp10s.h b/spaghetti-monster/anduril/cfg-sofirn-sp10s.h
index 99ed17d..350c0b5 100644
--- a/spaghetti-monster/anduril/cfg-sofirn-sp10s.h
+++ b/spaghetti-monster/anduril/cfg-sofirn-sp10s.h
@@ -21,8 +21,20 @@
#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL
#define RAMP_DISCRETE_STEPS 7
-// stop panicking at ~30% power
-#define THERM_FASTER_LEVEL 105
+// at Sofirn's request, use max (150) for the Simple UI ceiling
+#define SIMPLE_UI_FLOOR RAMP_DISCRETE_FLOOR
+#define SIMPLE_UI_CEIL 150
+#define SIMPLE_UI_STEPS 5
-// enable 2 click turbo
+// also at Sofirn's request, enable 2 click turbo
#define USE_2C_MAX_TURBO
+
+// Allow 3C in Simple UI for switching between smooth and stepped ramping
+#define USE_SIMPLE_UI_RAMPING_TOGGLE
+
+// and finally, set the default ramp style to Stepped
+#undef RAMP_STYLE
+#define RAMP_STYLE 1 // 0 = smooth, 1 = stepped
+
+// stop panicking at ~30% power
+#define THERM_FASTER_LEVEL 105 \ No newline at end of file
diff --git a/spaghetti-monster/anduril/hank-cfg.h b/spaghetti-monster/anduril/hank-cfg.h
new file mode 100644
index 0000000..b55404f
--- /dev/null
+++ b/spaghetti-monster/anduril/hank-cfg.h
@@ -0,0 +1,21 @@
+#ifndef HANK_CFG
+#define HANK_CFG
+
+// config preferences for Hank Wang of Intl-Outdoor (Emisar, Noctigon)
+
+// RGB aux LEDs should use rainbow cycling mode
+// to impress new customers
+// (people usually change it to voltage mode later though)
+#ifdef RGB_LED_OFF_DEFAULT
+#undef RGB_LED_OFF_DEFAULT
+#endif
+#define RGB_LED_OFF_DEFAULT 0x18 // low, rainbow
+
+// half a second per color in rainbow mode
+//#define RGB_RAINBOW_SPEED 0x03
+
+
+// double click while on goes to full-power turbo, not ramp ceiling
+#define USE_2C_MAX_TURBO
+
+#endif // ifndef HANK_CFG
diff --git a/spaghetti-monster/anduril/ramp-mode.c b/spaghetti-monster/anduril/ramp-mode.c
index b0a86a0..29a2de2 100644
--- a/spaghetti-monster/anduril/ramp-mode.c
+++ b/spaghetti-monster/anduril/ramp-mode.c
@@ -336,7 +336,8 @@ uint8_t steady_state(Event event, uint16_t arg) {
#endif // ifdef USE_THERMAL_REGULATION
////////// Every action below here is blocked in the simple UI //////////
- #ifdef USE_SIMPLE_UI
+ // That is, unless we specifically want to enable 3C for smooth/stepped selection in Simple UI
+ #if defined(USE_SIMPLE_UI) && !defined(USE_SIMPLE_UI_RAMPING_TOGGLE)
if (simple_ui_active) {
return EVENT_NOT_HANDLED;
}
@@ -358,6 +359,13 @@ uint8_t steady_state(Event event, uint16_t arg) {
return MISCHIEF_MANAGED;
}
+ // If we allowed 3C in Simple UI, now block further actions
+ #if defined(USE_SIMPLE_UI) && defined(USE_SIMPLE_UI_RAMPING_TOGGLE)
+ if (simple_ui_active) {
+ return EVENT_NOT_HANDLED;
+ }
+ #endif
+
#ifndef USE_TINT_RAMPING
// 3H: momentary turbo (on lights with no tint ramping)
else if (event == EV_click3_hold) {
diff --git a/spaghetti-monster/anduril/version.h b/spaghetti-monster/anduril/version.h
index 6d26f80..088df3c 100644
--- a/spaghetti-monster/anduril/version.h
+++ b/spaghetti-monster/anduril/version.h
@@ -1 +1 @@
-#define VERSION_NUMBER "20210513"
+#define VERSION_NUMBER "20210514"