aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/cfg-blf-lantern.h23
-rw-r--r--spaghetti-monster/fsm-main.c4
2 files changed, 6 insertions, 21 deletions
diff --git a/spaghetti-monster/anduril/cfg-blf-lantern.h b/spaghetti-monster/anduril/cfg-blf-lantern.h
index 28c7dbb..48ed1f7 100644
--- a/spaghetti-monster/anduril/cfg-blf-lantern.h
+++ b/spaghetti-monster/anduril/cfg-blf-lantern.h
@@ -1,16 +1,7 @@
// BLF Lantern config options for Anduril
#define MODEL_NUMBER "0621"
-/* BLF Lantern pinout
- * ----
- * Reset -|1 8|- VCC
- * eswitch -|2 7|- powerbank enable?
- * aux LED -|3 6|- PWM (5000K)
- * GND -|4 5|- PWM (3000K)
- * ----
- */
-
-// basically the same as a Q8... sort of
-#include "hwdef-BLF_Q8.h"
+#include "hwdef-BLF_LT1.h"
+// ATTINY: 85
// the button lights up
#define USE_INDICATOR_LED
@@ -56,7 +47,7 @@
// 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
+#define SIMPLE_UI_CEIL RAMP_DISCRETE_CEIL
#define SIMPLE_UI_STEPS RAMP_DISCRETE_STEPS
#define USE_SOS_MODE
@@ -68,14 +59,6 @@
#undef USE_THERMAL_REGULATION
#endif
-// also, the set_level_gradually() thing isn't compatible with tint ramping
-// (but unsetting it here doesn't actually do anything, because the thermal
-// regulation define enables it later... so this is mostly just a note to
-// make this compatibility issue explicit)
-#ifdef USE_SET_LEVEL_GRADUALLY
-#undef USE_SET_LEVEL_GRADUALLY
-#endif
-
// don't blink while ramping
#ifdef BLINK_AT_RAMP_MIDDLE
#undef BLINK_AT_RAMP_MIDDLE
diff --git a/spaghetti-monster/fsm-main.c b/spaghetti-monster/fsm-main.c
index f3c319c..7031009 100644
--- a/spaghetti-monster/fsm-main.c
+++ b/spaghetti-monster/fsm-main.c
@@ -47,7 +47,9 @@ static inline void hw_setup() {
TCCR0B = 0x01; // pre-scaler for timer (1 => 1, 2 => 8, 3 => 64...)
TCCR0A = PHASE;
#endif
- #if PWM_CHANNELS >= 2
+ // tint ramping needs second channel enabled,
+ // despite PWM_CHANNELS being only 1
+ #if (PWM_CHANNELS >= 2) || defined(USE_TINT_RAMPING)
DDRB |= (1 << PWM2_PIN);
#endif
#if PWM_CHANNELS >= 3