aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spaghetti-monster/anduril/aux-leds.c19
-rw-r--r--spaghetti-monster/anduril/aux-leds.h2
-rw-r--r--spaghetti-monster/anduril/cfg-blf-gt-mini.h2
-rw-r--r--spaghetti-monster/anduril/cfg-blf-gt.h2
-rw-r--r--spaghetti-monster/anduril/cfg-blf-lantern-t1616.h4
-rw-r--r--spaghetti-monster/anduril/cfg-blf-lantern.h4
-rw-r--r--spaghetti-monster/anduril/cfg-blf-q8-t1616.h11
-rw-r--r--spaghetti-monster/anduril/cfg-blf-q8.h11
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d18.h1
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d1v2.h2
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d4.h1
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d4s.h5
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d4sv2.h6
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d4v2.h6
-rw-r--r--spaghetti-monster/anduril/cfg-ff-pl47.h8
-rw-r--r--spaghetti-monster/anduril/cfg-ff-pl47g2.h5
-rw-r--r--spaghetti-monster/anduril/cfg-ff-rot66.h10
-rw-r--r--spaghetti-monster/anduril/cfg-ff-rot66g2.h4
-rw-r--r--spaghetti-monster/anduril/cfg-fw3x-lume1.h8
-rw-r--r--spaghetti-monster/anduril/cfg-gchart-fet1-t1616.h4
-rw-r--r--spaghetti-monster/anduril/cfg-mateminco-mf01-mini.h4
-rw-r--r--spaghetti-monster/anduril/cfg-mateminco-mf01s.h4
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-k1-12v.h5
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-k1-sbt90.h8
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-k1.h5
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-k9.3.h6
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-kr4.h5
-rw-r--r--spaghetti-monster/anduril/load-save-config-fsm.h13
-rw-r--r--spaghetti-monster/anduril/load-save-config.c26
-rw-r--r--spaghetti-monster/anduril/off-mode.c4
-rw-r--r--spaghetti-monster/anduril/ramp-mode.c3
-rw-r--r--spaghetti-monster/anduril/tint-ramping.h4
-rw-r--r--spaghetti-monster/anduril/version.h2
-rw-r--r--spaghetti-monster/fireflies-ui/fireflies-ui.c1
-rw-r--r--spaghetti-monster/rampingios/rampingiosv3.c1
35 files changed, 70 insertions, 136 deletions
diff --git a/spaghetti-monster/anduril/aux-leds.c b/spaghetti-monster/anduril/aux-leds.c
index 73d163e..3195fdc 100644
--- a/spaghetti-monster/anduril/aux-leds.c
+++ b/spaghetti-monster/anduril/aux-leds.c
@@ -29,15 +29,9 @@ void indicator_blink(uint8_t arg) {
// turn off aux LEDs when battery is empty
if (voltage < VOLTAGE_LOW) { indicator_led(0); return; }
- #ifdef USE_FANCIER_BLINKING_INDICATOR
-
- // fancy blink, set off/low/high levels here:
- static const uint8_t seq[] = {0, 1, 2, 1, 0, 0, 0, 0,
- 0, 0, 1, 0, 0, 0, 0, 0};
- indicator_led(seq[arg & 15]);
-
- #else // basic blink, 1/8th duty cycle
+ #ifdef USE_OLD_BLINKING_INDICATOR
+ // basic blink, 1/8th duty cycle
if (! (arg & 7)) {
indicator_led(2);
}
@@ -45,7 +39,14 @@ void indicator_blink(uint8_t arg) {
indicator_led(0);
}
- #endif
+ #else
+
+ // fancy blink, set off/low/high levels here:
+ static const uint8_t seq[] = {0, 1, 2, 1, 0, 0, 0, 0,
+ 0, 0, 1, 0, 0, 0, 0, 0};
+ indicator_led(seq[arg & 15]);
+
+ #endif // ifdef USE_OLD_BLINKING_INDICATOR
}
#endif
diff --git a/spaghetti-monster/anduril/aux-leds.h b/spaghetti-monster/anduril/aux-leds.h
index 94dc3c0..664cbf1 100644
--- a/spaghetti-monster/anduril/aux-leds.h
+++ b/spaghetti-monster/anduril/aux-leds.h
@@ -65,6 +65,8 @@ uint8_t rgb_led_off_mode = RGB_LED_OFF_DEFAULT;
uint8_t rgb_led_lockout_mode = RGB_LED_LOCKOUT_DEFAULT;
#endif
+//#define USE_OLD_BLINKING_INDICATOR
+//#define USE_FANCIER_BLINKING_INDICATOR
#ifdef USE_INDICATOR_LED
// bits 2-3 control lockout mode
// bits 0-1 control "off" mode
diff --git a/spaghetti-monster/anduril/cfg-blf-gt-mini.h b/spaghetti-monster/anduril/cfg-blf-gt-mini.h
index 45dfe36..af16f2c 100644
--- a/spaghetti-monster/anduril/cfg-blf-gt-mini.h
+++ b/spaghetti-monster/anduril/cfg-blf-gt-mini.h
@@ -9,6 +9,4 @@
#define USE_INDICATOR_LED
// the button is visible while main LEDs are on
#define USE_INDICATOR_LED_WHILE_RAMPING
-// enable blinking indicator LED while off
-#define TICK_DURING_STANDBY
diff --git a/spaghetti-monster/anduril/cfg-blf-gt.h b/spaghetti-monster/anduril/cfg-blf-gt.h
index 061685c..7f880dd 100644
--- a/spaghetti-monster/anduril/cfg-blf-gt.h
+++ b/spaghetti-monster/anduril/cfg-blf-gt.h
@@ -6,8 +6,6 @@
#define USE_INDICATOR_LED
// the button is visible while main LEDs are on
#define USE_INDICATOR_LED_WHILE_RAMPING
-// enable blinking indicator LED while off
-#define TICK_DURING_STANDBY
// don't blink during ramp, it's irrelevant and annoying on this light
#undef BLINK_AT_RAMP_CEIL
diff --git a/spaghetti-monster/anduril/cfg-blf-lantern-t1616.h b/spaghetti-monster/anduril/cfg-blf-lantern-t1616.h
index d602641..51c3d6a 100644
--- a/spaghetti-monster/anduril/cfg-blf-lantern-t1616.h
+++ b/spaghetti-monster/anduril/cfg-blf-lantern-t1616.h
@@ -13,10 +13,6 @@
#define USE_INDICATOR_LED
// the button is visible while main LEDs are on
#define USE_INDICATOR_LED_WHILE_RAMPING
-// enable blinking indicator LED while off
-#define TICK_DURING_STANDBY
-#define STANDBY_TICK_SPEED 3 // every 0.128 s
-#define USE_FANCIER_BLINKING_INDICATOR
// off mode: high (2)
// lockout: blinking (3)
#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 2)
diff --git a/spaghetti-monster/anduril/cfg-blf-lantern.h b/spaghetti-monster/anduril/cfg-blf-lantern.h
index 6be8ec7..28c7dbb 100644
--- a/spaghetti-monster/anduril/cfg-blf-lantern.h
+++ b/spaghetti-monster/anduril/cfg-blf-lantern.h
@@ -16,10 +16,6 @@
#define USE_INDICATOR_LED
// the button is visible while main LEDs are on
#define USE_INDICATOR_LED_WHILE_RAMPING
-// enable blinking indicator LED while off
-#define TICK_DURING_STANDBY
-#define STANDBY_TICK_SPEED 3 // every 0.128 s
-#define USE_FANCIER_BLINKING_INDICATOR
// off mode: high (2)
// lockout: blinking (3)
#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 2)
diff --git a/spaghetti-monster/anduril/cfg-blf-q8-t1616.h b/spaghetti-monster/anduril/cfg-blf-q8-t1616.h
index 73702a9..6e63b8a 100644
--- a/spaghetti-monster/anduril/cfg-blf-q8-t1616.h
+++ b/spaghetti-monster/anduril/cfg-blf-q8-t1616.h
@@ -7,10 +7,6 @@
#define USE_INDICATOR_LED
// the button is visible while main LEDs are on
#define USE_INDICATOR_LED_WHILE_RAMPING
-// enable blinking indicator LED while off
-#define TICK_DURING_STANDBY
-#define STANDBY_TICK_SPEED 3 // every 0.128 s
-#define USE_FANCIER_BLINKING_INDICATOR
// off mode: high (2)
// lockout: blinking (3)
#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 2)
@@ -33,11 +29,14 @@
#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
+
// 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 408c305..45ade50 100644
--- a/spaghetti-monster/anduril/cfg-blf-q8.h
+++ b/spaghetti-monster/anduril/cfg-blf-q8.h
@@ -6,10 +6,6 @@
#define USE_INDICATOR_LED
// the button is visible while main LEDs are on
#define USE_INDICATOR_LED_WHILE_RAMPING
-// enable blinking indicator LED while off
-#define TICK_DURING_STANDBY
-#define STANDBY_TICK_SPEED 3 // every 0.128 s
-#define USE_FANCIER_BLINKING_INDICATOR
// off mode: high (2)
// lockout: blinking (3)
#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 2)
@@ -32,11 +28,14 @@
#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
+
// 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-emisar-d18.h b/spaghetti-monster/anduril/cfg-emisar-d18.h
index 6aaa693..2147dc5 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d18.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d18.h
@@ -1,6 +1,7 @@
// Emisar D18 (FET+13+1) config options for Anduril
#define MODEL_NUMBER "0141"
#include "hwdef-Emisar_D18.h"
+#include "hank-cfg.h"
// level_calc.py seventh 3 150 7135 1 1.4 117.99 7135 6 1 1706.86 FET 3 10 13000
// (designed to make 1x hit at level 50, and Nx hit at level 100)
diff --git a/spaghetti-monster/anduril/cfg-emisar-d1v2.h b/spaghetti-monster/anduril/cfg-emisar-d1v2.h
index c2815fd..48a3ef0 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d1v2.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d1v2.h
@@ -9,8 +9,6 @@
#undef USE_AUX_RGB_LEDS
// ... and no button LED
#undef USE_BUTTON_LED
-// no aux LEDs means no need for sleep ticks
-#undef TICK_DURING_STANDBY
// safe limit ~50% power
#undef SIMPLE_UI_CEIL
diff --git a/spaghetti-monster/anduril/cfg-emisar-d4.h b/spaghetti-monster/anduril/cfg-emisar-d4.h
index caabb0e..b21c6a3 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d4.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d4.h
@@ -1,6 +1,7 @@
// Emisar D4 config options for Anduril
#define MODEL_NUMBER "0111"
#include "hwdef-Emisar_D4.h"
+#include "hank-cfg.h"
// ../../bin/level_calc.py 1 65 7135 1 0.8 150
// ... mixed with this:
diff --git a/spaghetti-monster/anduril/cfg-emisar-d4s.h b/spaghetti-monster/anduril/cfg-emisar-d4s.h
index fdab906..f224377 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d4s.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d4s.h
@@ -1,6 +1,7 @@
// Emisar D4S config options for Anduril
#define MODEL_NUMBER "0131"
#include "hwdef-Emisar_D4S.h"
+#include "hank-cfg.h"
// the button lights up
#define USE_INDICATOR_LED
@@ -8,10 +9,6 @@
#ifdef USE_INDICATOR_LED_WHILE_RAMPING
#undef USE_INDICATOR_LED_WHILE_RAMPING
#endif
-// enable blinking indicator LED while off
-#define TICK_DURING_STANDBY
-#define STANDBY_TICK_SPEED 3 // every 0.128 s
-#define USE_FANCIER_BLINKING_INDICATOR
#ifdef RAMP_LENGTH
#undef RAMP_LENGTH
diff --git a/spaghetti-monster/anduril/cfg-emisar-d4sv2.h b/spaghetti-monster/anduril/cfg-emisar-d4sv2.h
index ad6de03..5f18fbc 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d4sv2.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d4sv2.h
@@ -1,6 +1,7 @@
// Emisar D4S V2 config options for Anduril
#define MODEL_NUMBER "0133"
#include "hwdef-Emisar_D4Sv2.h"
+#include "hank-cfg.h"
// ATTINY: 1634
// this light has three aux LED channels: R, G, B
@@ -9,11 +10,6 @@
#ifdef USE_INDICATOR_LED_WHILE_RAMPING
#undef USE_INDICATOR_LED_WHILE_RAMPING
#endif
-// enable blinking aux LEDs
-#define TICK_DURING_STANDBY
-#define STANDBY_TICK_SPEED 3 // every 0.128 s
-//#define STANDBY_TICK_SPEED 4 // every 0.256 s
-//#define STANDBY_TICK_SPEED 5 // every 0.512 s
// 1x7135 + 3x7135 + FET
diff --git a/spaghetti-monster/anduril/cfg-emisar-d4v2.h b/spaghetti-monster/anduril/cfg-emisar-d4v2.h
index 6e389aa..4121465 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d4v2.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d4v2.h
@@ -1,6 +1,7 @@
// Emisar D4 config options for Anduril
#define MODEL_NUMBER "0113"
#include "hwdef-Emisar_D4v2.h"
+#include "hank-cfg.h"
// ATTINY: 1634
// this light has three aux LED channels: R, G, B
@@ -13,11 +14,6 @@
#ifdef USE_INDICATOR_LED_WHILE_RAMPING
#undef USE_INDICATOR_LED_WHILE_RAMPING
#endif
-// enable blinking aux LEDs
-#define TICK_DURING_STANDBY
-#define STANDBY_TICK_SPEED 3 // every 0.128 s
-//#define STANDBY_TICK_SPEED 4 // every 0.256 s
-//#define STANDBY_TICK_SPEED 5 // every 0.512 s
// copied from original D4, since it's also a FET+1 and has the same host
diff --git a/spaghetti-monster/anduril/cfg-ff-pl47.h b/spaghetti-monster/anduril/cfg-ff-pl47.h
index 1bb6a2f..1d46801 100644
--- a/spaghetti-monster/anduril/cfg-ff-pl47.h
+++ b/spaghetti-monster/anduril/cfg-ff-pl47.h
@@ -9,10 +9,7 @@
#undef USE_INDICATOR_LED_WHILE_RAMPING
#endif
//#define USE_INDICATOR_LED_WHILE_RAMPING
-// enable blinking indicator LED while off?
-#define TICK_DURING_STANDBY
-// If TICK_DURING_STANDBY is enabled...
// off mode: high (2)
// lockout: blinking (3)
#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 2)
@@ -22,11 +19,6 @@
// Fireflies wants to skip aux LED mode 1 (low)
#define INDICATOR_LED_SKIP_LOW
-// ... or if TICK_DURING_STANDBY is turned off:
-// off mode: high (2)
-// lockout: off (0)
-//#define INDICATOR_LED_DEFAULT_MODE ((0<<2) + 2)
-
#define RAMP_LENGTH 150
diff --git a/spaghetti-monster/anduril/cfg-ff-pl47g2.h b/spaghetti-monster/anduril/cfg-ff-pl47g2.h
index 7e63ec3..8d80555 100644
--- a/spaghetti-monster/anduril/cfg-ff-pl47g2.h
+++ b/spaghetti-monster/anduril/cfg-ff-pl47g2.h
@@ -8,12 +8,7 @@
#ifdef USE_INDICATOR_LED_WHILE_RAMPING
#undef USE_INDICATOR_LED_WHILE_RAMPING
#endif
-// enable blinking indicator LED while off?
-#define TICK_DURING_STANDBY
-#define STANDBY_TICK_SPEED 3 // every 0.128 s
-#define USE_FANCIER_BLINKING_INDICATOR
-// If TICK_DURING_STANDBY is enabled...
// off mode: low (1)
// lockout: blinking (3)
#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 1)
diff --git a/spaghetti-monster/anduril/cfg-ff-rot66.h b/spaghetti-monster/anduril/cfg-ff-rot66.h
index 9922681..652c98b 100644
--- a/spaghetti-monster/anduril/cfg-ff-rot66.h
+++ b/spaghetti-monster/anduril/cfg-ff-rot66.h
@@ -6,18 +6,10 @@
#define USE_INDICATOR_LED
// the button is visible while main LEDs are on
#define USE_INDICATOR_LED_WHILE_RAMPING
-// enable blinking indicator LED while off?
-//#define TICK_DURING_STANDBY
-// If TICK_DURING_STANDBY is enabled...
// off mode: high (2)
// lockout: blinking (3)
-//#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 2)
-
-// ... or if TICK_DURING_STANDBY is turned off:
-// off mode: high (2)
-// lockout: off (0)
-#define INDICATOR_LED_DEFAULT_MODE ((0<<2) + 2)
+#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 2)
// driver is a FET+N+1,
diff --git a/spaghetti-monster/anduril/cfg-ff-rot66g2.h b/spaghetti-monster/anduril/cfg-ff-rot66g2.h
index 9a70498..9737cc4 100644
--- a/spaghetti-monster/anduril/cfg-ff-rot66g2.h
+++ b/spaghetti-monster/anduril/cfg-ff-rot66g2.h
@@ -7,10 +7,6 @@
#ifdef INDICATOR_LED_SKIP_LOW
#undef INDICATOR_LED_SKIP_LOW
#endif
-// enable blinking indicator LED while off
-#define TICK_DURING_STANDBY
-#define STANDBY_TICK_SPEED 3 // every 0.128 s
-#define USE_FANCIER_BLINKING_INDICATOR
// lockout: blinking (3), off: low (1)
#ifdef INDICATOR_LED_DEFAULT_MODE
diff --git a/spaghetti-monster/anduril/cfg-fw3x-lume1.h b/spaghetti-monster/anduril/cfg-fw3x-lume1.h
index 75853ec..2f90920 100644
--- a/spaghetti-monster/anduril/cfg-fw3x-lume1.h
+++ b/spaghetti-monster/anduril/cfg-fw3x-lume1.h
@@ -27,14 +27,6 @@
#ifdef USE_INDICATOR_LED_WHILE_RAMPING
#undef USE_INDICATOR_LED_WHILE_RAMPING
#endif
-#define RGB_LED_OFF_DEFAULT 0x18 // low, voltage
-#define RGB_LED_LOCKOUT_DEFAULT 0x37 // blinking, rainbow
-
-// enable blinking aux LEDs
-#define TICK_DURING_STANDBY
-#define STANDBY_TICK_SPEED 3 // every 0.128 s
-//#define STANDBY_TICK_SPEED 4 // every 0.256 s
-//#define STANDBY_TICK_SPEED 5 // every 0.512 s
// ../../bin/level_calc.py cube 1 149 7135 0 0.5 1000, with 0 appended to the end.
// for FET PWM (PWM2), all values are 0, except for last value of 1023
diff --git a/spaghetti-monster/anduril/cfg-gchart-fet1-t1616.h b/spaghetti-monster/anduril/cfg-gchart-fet1-t1616.h
index 101f25a..192307e 100644
--- a/spaghetti-monster/anduril/cfg-gchart-fet1-t1616.h
+++ b/spaghetti-monster/anduril/cfg-gchart-fet1-t1616.h
@@ -7,10 +7,6 @@
#define USE_INDICATOR_LED
// the button is visible while main LEDs are on
#define USE_INDICATOR_LED_WHILE_RAMPING
-// enable blinking indicator LED while off
-#define TICK_DURING_STANDBY
-#define STANDBY_TICK_SPEED 3 // every 0.128 s
-#define USE_FANCIER_BLINKING_INDICATOR
// off mode: low (1)
// lockout: blinking (3)
#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 1)
diff --git a/spaghetti-monster/anduril/cfg-mateminco-mf01-mini.h b/spaghetti-monster/anduril/cfg-mateminco-mf01-mini.h
index c66525c..de5da88 100644
--- a/spaghetti-monster/anduril/cfg-mateminco-mf01-mini.h
+++ b/spaghetti-monster/anduril/cfg-mateminco-mf01-mini.h
@@ -7,10 +7,6 @@
//#define INDICATOR_LED_SKIP_LOW // low mode doesn't work on this driver
// the button is visible while main LEDs are on
//#define USE_INDICATOR_LED_WHILE_RAMPING
-// enable blinking indicator LED while off
-#define TICK_DURING_STANDBY
-#define STANDBY_TICK_SPEED 3 // every 0.128 s
-#define USE_FANCIER_BLINKING_INDICATOR
// off mode: low (1)
// lockout: blinking (3)
#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 1)
diff --git a/spaghetti-monster/anduril/cfg-mateminco-mf01s.h b/spaghetti-monster/anduril/cfg-mateminco-mf01s.h
index 9a8b641..b1f3b6e 100644
--- a/spaghetti-monster/anduril/cfg-mateminco-mf01s.h
+++ b/spaghetti-monster/anduril/cfg-mateminco-mf01s.h
@@ -6,10 +6,6 @@
#define USE_INDICATOR_LED
// the button is visible while main LEDs are on
//#define USE_INDICATOR_LED_WHILE_RAMPING
-// enable blinking indicator LED while off
-#define TICK_DURING_STANDBY
-#define STANDBY_TICK_SPEED 3 // every 0.128 s
-#define USE_FANCIER_BLINKING_INDICATOR
// off mode: low (1)
// lockout: blinking (3)
#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 1)
diff --git a/spaghetti-monster/anduril/cfg-noctigon-k1-12v.h b/spaghetti-monster/anduril/cfg-noctigon-k1-12v.h
index b1a12eb..7f8f4cf 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-k1-12v.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-k1-12v.h
@@ -1,6 +1,7 @@
// Noctigon K1 12V config options for Anduril
#define MODEL_NUMBER "0253"
#include "hwdef-Noctigon_K1-12V.h"
+#include "hank-cfg.h"
// ATTINY: 1634
// Most K1 lights can run hotter than default, but the 12V model
@@ -16,10 +17,6 @@
#define USE_AUX_RGB_LEDS_WHILE_ON
#define USE_INDICATOR_LED_WHILE_RAMPING
-// enable blinking aux LEDs
-#define TICK_DURING_STANDBY
-#define STANDBY_TICK_SPEED 3 // every 0.128 s
-
// level_calc.py cube 1 150 7135 0 4 1300
// (with max_pwm set to 1023)
diff --git a/spaghetti-monster/anduril/cfg-noctigon-k1-sbt90.h b/spaghetti-monster/anduril/cfg-noctigon-k1-sbt90.h
index 99813d1..9207dbc 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-k1-sbt90.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-k1-sbt90.h
@@ -2,6 +2,7 @@
// (is a K1 host with a KR4-like driver and a really high-powered LED)
#define MODEL_NUMBER "0252"
#include "hwdef-Noctigon_K1-SBT90.h"
+#include "hank-cfg.h"
// ATTINY: 1634
// this light can safely run a bit hotter than most
@@ -12,11 +13,6 @@
#define USE_AUX_RGB_LEDS
#define USE_AUX_RGB_LEDS_WHILE_ON
#define USE_INDICATOR_LED_WHILE_RAMPING
-#define RGB_RAINBOW_SPEED 0x03 // half a second per color in rainbow mode
-
-// enable blinking aux LEDs
-#define TICK_DURING_STANDBY
-#define STANDBY_TICK_SPEED 3 // every 0.128 s
// brightness:
@@ -52,7 +48,7 @@
//#define THERM_NEXT_WARNING_THRESHOLD 16 // accumulate less error before adjusting
//#define THERM_RESPONSE_MAGNITUDE 128 // bigger adjustments
-// slow down party strobe; this driver can't pulse for 1ms or less
+// normal party strobe speed; this driver can pulse very quickly
//#define PARTY_STROBE_ONTIME 2
#define THERM_CAL_OFFSET 5
diff --git a/spaghetti-monster/anduril/cfg-noctigon-k1.h b/spaghetti-monster/anduril/cfg-noctigon-k1.h
index 6531ecd..fb2a89c 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-k1.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-k1.h
@@ -2,6 +2,7 @@
#define MODEL_NUMBER "0251"
// (originally known as Emisar D1S v2)
#include "hwdef-Noctigon_K1.h"
+#include "hank-cfg.h"
// ATTINY: 1634
// this light can safely run a bit hotter than most
@@ -13,10 +14,6 @@
#define USE_AUX_RGB_LEDS_WHILE_ON
#define USE_INDICATOR_LED_WHILE_RAMPING
-// enable blinking aux LEDs
-#define TICK_DURING_STANDBY
-#define STANDBY_TICK_SPEED 3 // every 0.128 s
-
// ../../bin/level_calc.py cube 1 150 7135 1 4 1300
// (with max_pwm set to 1023)
diff --git a/spaghetti-monster/anduril/cfg-noctigon-k9.3.h b/spaghetti-monster/anduril/cfg-noctigon-k9.3.h
index e61ea13..f3a6cdd 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-k9.3.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-k9.3.h
@@ -1,6 +1,7 @@
// Noctigon K9.3 config options for Anduril
#define MODEL_NUMBER "0261"
#include "hwdef-Noctigon_K9.3.h"
+#include "hank-cfg.h"
// ATTINY: 1634
// this model requires some special code
#define OVERRIDES_FILE cfg-noctigon-k9.3.c
@@ -11,7 +12,6 @@ inline void set_level_override(uint8_t level);
// this light has three aux LED channels: R, G, B
#define USE_AUX_RGB_LEDS
-#define RGB_LED_OFF_DEFAULT 0x18 // low, rainbow
// the aux LEDs are front-facing, so turn them off while main LEDs are on
//#define USE_AUX_RGB_LEDS_WHILE_ON
// it also has an independent LED in the button
@@ -23,10 +23,6 @@ inline void set_level_override(uint8_t level);
#undef USE_INDICATOR_LED_WHILE_RAMPING
#endif
-// enable blinking aux LEDs
-#define TICK_DURING_STANDBY
-#define STANDBY_TICK_SPEED 3 // every 0.128 s
-
// has two channels of independent LEDs
#define USE_TINT_RAMPING
// ... but it doesn't make sense to ramp between; only toggle
diff --git a/spaghetti-monster/anduril/cfg-noctigon-kr4.h b/spaghetti-monster/anduril/cfg-noctigon-kr4.h
index 17c3c00..82b8df5 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-kr4.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-kr4.h
@@ -2,6 +2,7 @@
// (and Emisar D4v2.5, which uses KR4 driver plus a button LED)
#define MODEL_NUMBER "0211"
#include "hwdef-Noctigon_KR4.h"
+#include "hank-cfg.h"
// ATTINY: 1634
// this light has three aux LED channels: R, G, B
@@ -17,10 +18,6 @@
#undef USE_INDICATOR_LED_WHILE_RAMPING
#endif
-// enable blinking aux LEDs
-#define TICK_DURING_STANDBY
-#define STANDBY_TICK_SPEED 3 // every 0.128 s
-
// brightness w/ SST-20 4000K LEDs:
// 0/1023: 0.35 lm
diff --git a/spaghetti-monster/anduril/load-save-config-fsm.h b/spaghetti-monster/anduril/load-save-config-fsm.h
index 885fb72..9d3dd86 100644
--- a/spaghetti-monster/anduril/load-save-config-fsm.h
+++ b/spaghetti-monster/anduril/load-save-config-fsm.h
@@ -32,13 +32,16 @@ typedef enum {
ramp_discrete_steps_e,
#endif
#ifdef USE_MANUAL_MEMORY
- manual_memory_e,
- #ifdef USE_MANUAL_MEMORY_TIMER
- manual_memory_timer_e,
- #endif
+ manual_memory_e,
+ #ifdef USE_MANUAL_MEMORY_TIMER
+ manual_memory_timer_e,
+ #endif
+ #ifdef USE_TINT_RAMPING
+ manual_memory_tint_e,
+ #endif
#endif
#ifdef USE_TINT_RAMPING
- tint_e,
+ tint_e,
#endif
#ifdef USE_STROBE_STATE
strobe_type_e,
diff --git a/spaghetti-monster/anduril/load-save-config.c b/spaghetti-monster/anduril/load-save-config.c
index 2880c6d..3823521 100644
--- a/spaghetti-monster/anduril/load-save-config.c
+++ b/spaghetti-monster/anduril/load-save-config.c
@@ -34,13 +34,16 @@ void load_config() {
ramp_stepss[1] = eeprom[ramp_discrete_steps_e];
#endif
#ifdef USE_MANUAL_MEMORY
- manual_memory = eeprom[manual_memory_e];
- #ifdef USE_MANUAL_MEMORY_TIMER
- manual_memory_timer = eeprom[manual_memory_timer_e];
- #endif
+ manual_memory = eeprom[manual_memory_e];
+ #ifdef USE_MANUAL_MEMORY_TIMER
+ manual_memory_timer = eeprom[manual_memory_timer_e];
+ #endif
+ #ifdef USE_TINT_RAMPING
+ manual_memory_tint = eeprom[manual_memory_tint_e];
+ #endif
#endif
#ifdef USE_TINT_RAMPING
- tint = eeprom[tint_e];
+ tint = eeprom[tint_e];
#endif
#if defined(USE_PARTY_STROBE_MODE) || defined(USE_TACTICAL_STROBE_MODE)
strobe_type = eeprom[strobe_type_e]; // TODO: move this to eeprom_wl?
@@ -94,13 +97,16 @@ void save_config() {
eeprom[ramp_discrete_steps_e] = ramp_stepss[1];
#endif
#ifdef USE_MANUAL_MEMORY
- eeprom[manual_memory_e] = manual_memory;
- #ifdef USE_MANUAL_MEMORY_TIMER
- eeprom[manual_memory_timer_e] = manual_memory_timer;
- #endif
+ eeprom[manual_memory_e] = manual_memory;
+ #ifdef USE_MANUAL_MEMORY_TIMER
+ eeprom[manual_memory_timer_e] = manual_memory_timer;
+ #endif
+ #ifdef USE_TINT_RAMPING
+ eeprom[manual_memory_tint_e] = manual_memory_tint;
+ #endif
#endif
#ifdef USE_TINT_RAMPING
- eeprom[tint_e] = tint;
+ eeprom[tint_e] = tint;
#endif
#if defined(USE_PARTY_STROBE_MODE) || defined(USE_TACTICAL_STROBE_MODE)
eeprom[strobe_type_e] = strobe_type; // TODO: move this to eeprom_wl?
diff --git a/spaghetti-monster/anduril/off-mode.c b/spaghetti-monster/anduril/off-mode.c
index e37f08d..094cca8 100644
--- a/spaghetti-monster/anduril/off-mode.c
+++ b/spaghetti-monster/anduril/off-mode.c
@@ -133,8 +133,8 @@ uint8_t off_state(Event event, uint16_t arg) {
&& (off_time >= (manual_memory_timer * SLEEP_TICKS_PER_MINUTE))
#endif
) {
- #if defined(USE_MANUAL_MEMORY_TIMER_FOR_TINT) && defined(USE_TINT_RAMPING) && defined(TINT_RAMP_TOGGLE_ONLY)
- tint = 0;
+ #ifdef USE_TINT_RAMPING
+ tint = manual_memory_tint;
#endif
set_level(nearest_level(manual_memory));
} else
diff --git a/spaghetti-monster/anduril/ramp-mode.c b/spaghetti-monster/anduril/ramp-mode.c
index 9d6eba9..b0a86a0 100644
--- a/spaghetti-monster/anduril/ramp-mode.c
+++ b/spaghetti-monster/anduril/ramp-mode.c
@@ -393,6 +393,9 @@ uint8_t steady_state(Event event, uint16_t arg) {
else if (event == EV_10clicks) {
// turn on manual memory and save current brightness
manual_memory = actual_level;
+ #ifdef USE_TINT_RAMPING
+ manual_memory_tint = tint; // remember tint too
+ #endif
save_config();
blink_once();
return MISCHIEF_MANAGED;
diff --git a/spaghetti-monster/anduril/tint-ramping.h b/spaghetti-monster/anduril/tint-ramping.h
index bd86659..e482999 100644
--- a/spaghetti-monster/anduril/tint-ramping.h
+++ b/spaghetti-monster/anduril/tint-ramping.h
@@ -20,6 +20,10 @@
#ifndef TINT_RAMPING_H
#define TINT_RAMPING_H
+#ifdef USE_MANUAL_MEMORY
+uint8_t manual_memory_tint;
+#endif
+
// not actually a mode, more of a fallback under other modes
uint8_t tint_ramping_state(Event event, uint16_t arg);
diff --git a/spaghetti-monster/anduril/version.h b/spaghetti-monster/anduril/version.h
index dd9c703..6d26f80 100644
--- a/spaghetti-monster/anduril/version.h
+++ b/spaghetti-monster/anduril/version.h
@@ -1 +1 @@
-#define VERSION_NUMBER "20210503"
+#define VERSION_NUMBER "20210513"
diff --git a/spaghetti-monster/fireflies-ui/fireflies-ui.c b/spaghetti-monster/fireflies-ui/fireflies-ui.c
index 2c3e60b..93a3180 100644
--- a/spaghetti-monster/fireflies-ui/fireflies-ui.c
+++ b/spaghetti-monster/fireflies-ui/fireflies-ui.c
@@ -2107,6 +2107,7 @@ void blip() {
#if defined(USE_INDICATOR_LED) && defined(TICK_DURING_STANDBY)
// beacon-like mode for the indicator LED
void indicator_blink(uint8_t arg) {
+ #define USE_FANCIER_BLINKING_INDICATOR
#ifdef USE_FANCIER_BLINKING_INDICATOR
// fancy blink, set off/low/high levels here:
diff --git a/spaghetti-monster/rampingios/rampingiosv3.c b/spaghetti-monster/rampingios/rampingiosv3.c
index 7f03e77..7b6baee 100644
--- a/spaghetti-monster/rampingios/rampingiosv3.c
+++ b/spaghetti-monster/rampingios/rampingiosv3.c
@@ -1106,6 +1106,7 @@ void blink_confirm(uint8_t num) {
#if defined(USE_INDICATOR_LED) && defined(TICK_DURING_STANDBY)
// beacon-like mode for the indicator LED
void indicator_blink(uint8_t arg) {
+ #define USE_FANCIER_BLINKING_INDICATOR
#ifdef USE_FANCIER_BLINKING_INDICATOR
// fancy blink, set off/low/high levels here:
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.