aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2020-07-14 17:01:03 -0600
committerSelene ToyKeeper2020-07-14 17:01:03 -0600
commit5c24d714eda4ab516cae50817b2808124f6e926a (patch)
tree0e84de66e69ca69dfc65e4a08a3852e66f984363 /spaghetti-monster
parentmerged trunk (diff)
downloadanduril-5c24d714eda4ab516cae50817b2808124f6e926a.tar.gz
anduril-5c24d714eda4ab516cae50817b2808124f6e926a.tar.bz2
anduril-5c24d714eda4ab516cae50817b2808124f6e926a.zip
merged Emisar D4v2.5 build targets with Noctigon KR4 build targets
(because they're close enough that they can use the same code)
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d4v2.5-219.h12
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d4v2.5-nofet.h48
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d4v2.5.h70
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-kr4-nofet.h6
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-kr4.h16
5 files changed, 19 insertions, 133 deletions
diff --git a/spaghetti-monster/anduril/cfg-emisar-d4v2.5-219.h b/spaghetti-monster/anduril/cfg-emisar-d4v2.5-219.h
deleted file mode 100644
index c0a5b17..0000000
--- a/spaghetti-monster/anduril/cfg-emisar-d4v2.5-219.h
+++ /dev/null
@@ -1,12 +0,0 @@
-// Emisar D4v2.5 (75% FET) config options for Anduril
-// (adapted from cfg-noctigon-kr4-219.h)
-#include "cfg-emisar-d4v2.5.h"
-// ATTINY: 1634
-
-// don't turn off first channel at turbo level
-#undef PWM1_LEVELS
-#define PWM1_LEVELS 0,0,1,1,2,2,3,3,4,4,5,6,7,8,9,10,11,13,14,15,17,19,20,22,24,26,28,30,33,35,38,40,43,46,49,52,55,59,62,66,70,74,78,82,86,91,96,100,105,111,116,121,127,133,139,145,151,158,165,172,179,186,193,201,209,217,225,234,243,251,261,270,280,289,299,310,320,331,342,353,364,376,388,400,412,425,438,451,464,478,492,506,521,536,551,566,582,597,614,630,647,664,681,699,717,735,754,772,792,811,831,851,871,892,913,935,956,978,1001,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023
-// 75% FET power
-#undef PWM2_LEVELS
-#define PWM2_LEVELS 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,39,60,82,104,126,149,172,195,219,243,268,293,318,343,369,396,422,449,476,504,531,560,588,617,646,676,706,737,768
-
diff --git a/spaghetti-monster/anduril/cfg-emisar-d4v2.5-nofet.h b/spaghetti-monster/anduril/cfg-emisar-d4v2.5-nofet.h
deleted file mode 100644
index 175774c..0000000
--- a/spaghetti-monster/anduril/cfg-emisar-d4v2.5-nofet.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Emisar D4v2.5 (fetless) config options for Anduril
-// (adapted from cfg-noctigon-kr4-nofet.h)
-#include "cfg-emisar-d4v2.5.h"
-// ATTINY: 1634
-
-// brightness w/ SST-20 4000K LEDs:
-// 0/1023: 0.35 lm
-// 1/1023: 2.56 lm
-// max regulated: 1740 lm
-// level_calc.py 3.0 1 150 7135 0 5 1740
-#undef PWM_CHANNELS
-#define PWM_CHANNELS 1
-#define RAMP_LENGTH 150
-#undef PWM1_LEVELS
-#define PWM1_LEVELS 0,0,1,1,2,2,3,3,4,4,5,5,6,7,8,9,10,11,12,13,15,16,17,18,20,21,23,24,26,27,29,31,33,35,37,39,41,43,45,48,50,53,55,58,61,63,66,69,72,75,79,82,85,89,92,96,100,104,108,112,116,120,125,129,134,138,143,148,153,158,163,169,174,180,185,191,197,203,209,215,222,228,235,242,248,255,263,270,277,285,292,300,308,316,324,333,341,350,359,368,377,386,395,405,414,424,434,444,454,465,475,486,497,508,519,531,542,554,566,578,590,603,615,628,641,654,667,680,694,708,722,736,750,765,779,794,809,825,840,856,872,888,904,920,937,954,971,988,1005,1023
-#undef PWM2_LEVELS
-#undef DEFAULT_LEVEL
-#define DEFAULT_LEVEL 50
-#undef MAX_1x7135
-#define MAX_1x7135 150
-
-#undef RAMP_SMOOTH_FLOOR
-#undef RAMP_SMOOTH_CEIL
-#undef RAMP_DISCRETE_FLOOR
-#undef RAMP_DISCRETE_CEIL
-#undef RAMP_DISCRETE_STEPS
-
-#define RAMP_SMOOTH_FLOOR 3 // level 1 is unreliable
-#define RAMP_SMOOTH_CEIL 130
-// 10, 30, [50], 70, 90, 110, 130 (plus [150] on turbo)
-#define RAMP_DISCRETE_FLOOR 10
-#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL
-#define RAMP_DISCRETE_STEPS 7
-
-#undef MUGGLE_FLOOR
-#undef MUGGLE_CEILING
-#define MUGGLE_FLOOR RAMP_DISCRETE_FLOOR
-#define MUGGLE_CEILING 70
-
-// make candle mode wobble more
-#define CANDLE_AMPLITUDE 32
-
-// stop panicking at ~90% power or ~1600 lm
-#undef THERM_FASTER_LEVEL
-#define THERM_FASTER_LEVEL 143
-#undef MIN_THERM_STEPDOWN
-#define MIN_THERM_STEPDOWN DEFAULT_LEVEL
-
diff --git a/spaghetti-monster/anduril/cfg-emisar-d4v2.5.h b/spaghetti-monster/anduril/cfg-emisar-d4v2.5.h
deleted file mode 100644
index bc0cf60..0000000
--- a/spaghetti-monster/anduril/cfg-emisar-d4v2.5.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Emisar D4v2.5 config options for Anduril
-// (uses KR4 driver, plus a button LED)
-#include "hwdef-Noctigon_KR4.h"
-// ATTINY: 1634
-
-// this light has three aux LED channels: R, G, B
-#define USE_AUX_RGB_LEDS
-// it also has an independent LED in the button
-#define USE_BUTTON_LED
-// the aux LEDs are front-facing, so turn them off while main LEDs are on
-// TODO: the whole "indicator LED" thing needs to be refactored into
-// "aux LED(s)" and "button LED(s)" since they work a bit differently
-//#define USE_AUX_RGB_LEDS_WHILE_ON
-#ifdef USE_INDICATOR_LED_WHILE_RAMPING
-#undef USE_INDICATOR_LED_WHILE_RAMPING
-#endif
-#define RGB_LED_OFF_DEFAULT 0x17 // low, rainbow
-#define RGB_LED_LOCKOUT_DEFAULT 0x37 // blinking, rainbow
-#define RGB_RAINBOW_SPEED 0x03 // half a second per color
-
-// 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 Noctigon KR4
-// brightness w/ SST-20 4000K LEDs:
-// 0/1023: 0.35 lm
-// 1/1023: 2.56 lm
-// max regulated: 1740 lm
-// FET: ~3700 lm
-// maxreg at 130: level_calc.py cube 2 150 7135 0 2.5 1740 FET 1 10 2565
-// maxreg at 120: level_calc.py cube 2 150 7135 0 2.5 1740 FET 1 10 3190
-#define RAMP_LENGTH 150
-#define PWM1_LEVELS 0,0,1,1,2,2,3,3,4,4,5,6,7,8,9,10,11,13,14,15,17,19,20,22,24,26,28,30,33,35,38,40,43,46,49,52,55,59,62,66,70,74,78,82,86,91,96,100,105,111,116,121,127,133,139,145,151,158,165,172,179,186,193,201,209,217,225,234,243,251,261,270,280,289,299,310,320,331,342,353,364,376,388,400,412,425,438,451,464,478,492,506,521,536,551,566,582,597,614,630,647,664,681,699,717,735,754,772,792,811,831,851,871,892,913,935,956,978,1001,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,0
-#define PWM2_LEVELS 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,51,79,109,138,168,198,229,260,292,324,357,390,423,457,492,527,562,598,634,671,708,746,784,822,861,901,941,982,1023
-#define DEFAULT_LEVEL 46
-#define MAX_1x7135 120
-#define HALFSPEED_LEVEL 10
-#define QUARTERSPEED_LEVEL 2
-
-#define RAMP_SMOOTH_FLOOR 3 // level 1 is unreliable
-#define RAMP_SMOOTH_CEIL 120
-// 10, 28, [46], 65, 83, 101, [120]
-#define RAMP_DISCRETE_FLOOR 10
-#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL
-#define RAMP_DISCRETE_STEPS 7
-
-#define MUGGLE_FLOOR RAMP_DISCRETE_FLOOR
-#define MUGGLE_CEILING 65
-
-// stop panicking at ~25% power or ~1000 lm
-#define THERM_FASTER_LEVEL 100
-#define MIN_THERM_STEPDOWN DEFAULT_LEVEL
-#define THERM_NEXT_WARNING_THRESHOLD 16 // accumulate less error before adjusting
-#define THERM_RESPONSE_MAGNITUDE 128 // bigger adjustments
-
-// easier access to thermal config mode
-#define USE_TENCLICK_THERMAL_CONFIG
-
-// slow down party strobe; this driver can't pulse for 1ms or less
-// (only needed on no-FET build)
-//#define PARTY_STROBE_ONTIME 2
-
-#define THERM_CAL_OFFSET 5
-
-// allow 13H reset for consistency with KR4
-#define USE_SOFT_FACTORY_RESET
diff --git a/spaghetti-monster/anduril/cfg-noctigon-kr4-nofet.h b/spaghetti-monster/anduril/cfg-noctigon-kr4-nofet.h
index 19cbc23..9f5f57f 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-kr4-nofet.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-kr4-nofet.h
@@ -1,4 +1,6 @@
// Noctigon KR4 (fetless) config options for Anduril
+// (and Noctigon KR1)
+// (and Emisar D4v2 E21A, a.k.a. "D4v2.5")
#include "cfg-noctigon-kr4.h"
// ATTINY: 1634
@@ -39,6 +41,10 @@
// make candle mode wobble more
#define CANDLE_AMPLITUDE 32
+// slow down party strobe; this driver can't pulse for 1ms or less
+// (only needed on no-FET build)
+#define PARTY_STROBE_ONTIME 2
+
// stop panicking at ~90% power or ~1600 lm
#undef THERM_FASTER_LEVEL
#define THERM_FASTER_LEVEL 143
diff --git a/spaghetti-monster/anduril/cfg-noctigon-kr4.h b/spaghetti-monster/anduril/cfg-noctigon-kr4.h
index dc71655..ed15bde 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-kr4.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-kr4.h
@@ -1,11 +1,20 @@
// Noctigon KR4 config options for Anduril
+// (and Emisar D4v2.5, which uses KR4 driver plus a button LED)
#include "hwdef-Noctigon_KR4.h"
// ATTINY: 1634
// this light has three aux LED channels: R, G, B
#define USE_AUX_RGB_LEDS
+// the aux LEDs are front-facing, so turn them off while main LEDs are on
//#define USE_AUX_RGB_LEDS_WHILE_ON
-//#define USE_INDICATOR_LED_WHILE_RAMPING
+// it also has an independent LED in the button (D4v2.5 titanium/brass only)
+#define USE_BUTTON_LED
+// TODO: the whole "indicator LED" thing needs to be refactored into
+// "aux LED(s)" and "button LED(s)" since they work a bit differently
+// enabling this option breaks the button LED on D4v2.5
+#ifdef USE_INDICATOR_LED_WHILE_RAMPING
+#undef USE_INDICATOR_LED_WHILE_RAMPING
+#endif
#define RGB_LED_OFF_DEFAULT 0x17 // low, rainbow
#define RGB_LED_LOCKOUT_DEFAULT 0x37 // blinking, rainbow
#define RGB_RAINBOW_SPEED 0x03 // half a second per color
@@ -46,11 +55,12 @@
#define THERM_NEXT_WARNING_THRESHOLD 16 // accumulate less error before adjusting
#define THERM_RESPONSE_MAGNITUDE 128 // bigger adjustments
-// easier access to thermal config mode, for Noctigon
+// easier access to thermal config mode
#define USE_TENCLICK_THERMAL_CONFIG
// slow down party strobe; this driver can't pulse for 1ms or less
-#define PARTY_STROBE_ONTIME 2
+// (only needed on no-FET build)
+//#define PARTY_STROBE_ONTIME 2
#define THERM_CAL_OFFSET 5
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.