aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
Diffstat (limited to 'spaghetti-monster')
-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.h10
-rw-r--r--spaghetti-monster/anduril/cfg-blf-q8.h10
-rw-r--r--spaghetti-monster/anduril/cfg-sofirn-sp10s.h18
-rw-r--r--spaghetti-monster/anduril/factory-reset.c4
-rw-r--r--spaghetti-monster/anduril/ramp-mode.c10
-rw-r--r--spaghetti-monster/anduril/version.h5
8 files changed, 51 insertions, 12 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 002e8e3..fe01d07 100644
--- a/spaghetti-monster/anduril/cfg-blf-q8-t1616.h
+++ b/spaghetti-monster/anduril/cfg-blf-q8-t1616.h
@@ -29,11 +29,17 @@
#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL
#define RAMP_DISCRETE_STEPS 7
-// safe limit ~50% power
+// at Sofirn's request, use max (150) for the Simple UI ceiling
#define SIMPLE_UI_FLOOR RAMP_DISCRETE_FLOOR
-#define SIMPLE_UI_CEIL RAMP_DISCRETE_CEIL
+#define SIMPLE_UI_CEIL 150
#define SIMPLE_UI_STEPS 5
+// 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 d4243ee..f1917ce 100644
--- a/spaghetti-monster/anduril/cfg-blf-q8.h
+++ b/spaghetti-monster/anduril/cfg-blf-q8.h
@@ -28,11 +28,17 @@
#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL
#define RAMP_DISCRETE_STEPS 7
-// safe limit ~50% power
+// at Sofirn's request, use max (150) for the Simple UI ceiling
#define SIMPLE_UI_FLOOR RAMP_DISCRETE_FLOOR
-#define SIMPLE_UI_CEIL RAMP_DISCRETE_CEIL
+#define SIMPLE_UI_CEIL 150
#define SIMPLE_UI_STEPS 5
+// 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/factory-reset.c b/spaghetti-monster/anduril/factory-reset.c
index c327e65..f05b5eb 100644
--- a/spaghetti-monster/anduril/factory-reset.c
+++ b/spaghetti-monster/anduril/factory-reset.c
@@ -44,8 +44,12 @@ void factory_reset() {
// explode, if button pressed long enough
if (reset) {
#ifdef USE_THERMAL_REGULATION
+ #ifdef AVRXMEGA3 // AVR 1-Series has factory calibrated thermal sensor, remove the offset
+ thermal_config_save(1,temperature - therm_cal_offset); // this will cancel out the offset
+ #else
// auto-calibrate temperature... assume current temperature is 21 C
thermal_config_save(1, 21);
+ #endif // AVRXMEGA3
#endif
// save all settings to eeprom
// (assuming they're all at default because we haven't loaded them yet)
diff --git a/spaghetti-monster/anduril/ramp-mode.c b/spaghetti-monster/anduril/ramp-mode.c
index 0baffde..968b304 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 8cf3c90..088df3c 100644
--- a/spaghetti-monster/anduril/version.h
+++ b/spaghetti-monster/anduril/version.h
@@ -1,4 +1 @@
-// this file is replaced automatically by the build script
-// set your own date here if you're not using the build script
-// otherwise, default to first human contact with the moon
-#define VERSION_NUMBER "19690720"
+#define VERSION_NUMBER "20210514"