aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2018-08-30 19:47:17 -0600
committerSelene ToyKeeper2018-08-30 19:47:17 -0600
commite1104525bc8e17880e83a4a1058291dc0e5e89d7 (patch)
treec0e9c0775a66930d77fe9c4825210ca7ef97678d /spaghetti-monster
parentadded a stepped ramp calculator for Anduril, (diff)
downloadanduril-e1104525bc8e17880e83a4a1058291dc0e5e89d7.tar.gz
anduril-e1104525bc8e17880e83a4a1058291dc0e5e89d7.tar.bz2
anduril-e1104525bc8e17880e83a4a1058291dc0e5e89d7.zip
First Anduril build for Fireflies ROT66.
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/anduril.c10
-rwxr-xr-xspaghetti-monster/anduril/build-all.sh1
-rw-r--r--spaghetti-monster/anduril/cfg-ff-rot66.h51
3 files changed, 60 insertions, 2 deletions
diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c
index bf16da5..533ace4 100644
--- a/spaghetti-monster/anduril/anduril.c
+++ b/spaghetti-monster/anduril/anduril.c
@@ -20,12 +20,15 @@
/********* User-configurable options *********/
// Physical driver type (uncomment one of the following or define it at the gcc command line)
+//#define FSM_BLF_GT_DRIVER
+//#define FSM_BLF_Q8_DRIVER
+//#define FSM_EMISAR_D1_DRIVER
+//#define FSM_EMISAR_D1S_DRIVER
//#define FSM_EMISAR_D4_DRIVER
//#define FSM_EMISAR_D4S_DRIVER
//#define FSM_EMISAR_D4S_219c_DRIVER
-//#define FSM_BLF_Q8_DRIVER
+//#define FSM_FF_ROT66_DRIVER
//#define FSM_FW3A_DRIVER
-//#define FSM_BLF_GT_DRIVER
#define USE_LVP // FIXME: won't build when this option is turned off
@@ -86,6 +89,9 @@
#elif defined(FSM_EMISAR_D4S_DRIVER)
#include "cfg-emisar-d4s.h"
+#elif defined(FSM_FF_ROT66_DRIVER)
+#include "cfg-ff-rot66.h"
+
#elif defined(FSM_FW3A_DRIVER)
#include "cfg-fw3a.h"
diff --git a/spaghetti-monster/anduril/build-all.sh b/spaghetti-monster/anduril/build-all.sh
index d0c0d5c..306dabc 100755
--- a/spaghetti-monster/anduril/build-all.sh
+++ b/spaghetti-monster/anduril/build-all.sh
@@ -8,6 +8,7 @@ for TARGET in \
EMISAR_D4 \
EMISAR_D4S \
EMISAR_D4S_219c \
+ FF_ROT66 \
FW3A \
; do
echo "===== $TARGET ====="
diff --git a/spaghetti-monster/anduril/cfg-ff-rot66.h b/spaghetti-monster/anduril/cfg-ff-rot66.h
new file mode 100644
index 0000000..b001216
--- /dev/null
+++ b/spaghetti-monster/anduril/cfg-ff-rot66.h
@@ -0,0 +1,51 @@
+// Fireflies ROT66 config options for Anduril
+
+// the button lights up
+#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
+// (no, it doesn't really make sense on this light)
+//#define TICK_DURING_STANDBY
+
+#ifdef RAMP_LENGTH
+#undef RAMP_LENGTH
+#endif
+
+// driver is a FET+N+1,
+// where N=6 for the 219b version,
+// or N=13 for the XP-L HI version
+// FIXME: ramp stalls when Nx7135 turns on, start at higher PWM level there
+#if 1 // copied from FW3A
+// ../../bin/level_calc.py 1 65 7135 1 0.8 150
+// ... mixed with this:
+// ../../../bin/level_calc.py 3 150 7135 1 0.33 150 7135 4 1 850 FET 1 10 1500
+#define RAMP_LENGTH 150
+#define PWM1_LEVELS 1,1,2,2,3,3,4,4,5,6,7,8,9,10,12,13,14,15,17,19,20,22,24,26,29,31,34,36,39,42,45,48,51,55,59,62,66,70,75,79,84,89,93,99,104,110,115,121,127,134,140,147,154,161,168,176,184,192,200,209,217,226,236,245,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,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,5,7,9,11,13,15,18,20,22,24,27,29,32,34,37,39,42,45,48,50,53,56,60,63,66,69,72,76,79,83,87,90,94,98,102,106,110,114,118,122,127,131,136,140,145,149,154,159,164,169,174,180,185,190,196,201,207,213,218,224,230,236,243,249,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0
+#define PWM3_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,0,0,0,0,0,0,0,0,0,0,8,19,31,43,55,67,79,91,104,117,130,143,157,170,184,198,212,226,240,255
+#define MAX_1x7135 65
+#define MAX_Nx7135 130
+#define HALFSPEED_LEVEL 14
+#define QUARTERSPEED_LEVEL 5
+#else
+// #level_calc.py 3 150 7135 1 3.3 150 7135 1 2.0 723 FET 1 5 4500
+// level_calc.py 3 150 7135 1 3.3 150 7135 1 2.0 1140.9 FET 1 5 4500
+// (with the ramp shape set to "ninth")
+#define RAMP_LENGTH 150
+#define PWM1_LEVELS 1,1,2,2,3,4,4,5,5,6,7,8,9,10,11,12,13,14,15,16,18,19,21,23,24,26,28,30,32,35,37,40,42,45,48,51,55,58,62,66,70,74,79,83,88,93,99,105,111,117,123,130,137,145,153,161,170,179,189,198,209,220,231,243,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,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,1,2,4,6,8,10,12,14,16,18,21,23,26,29,32,35,38,41,44,48,51,55,59,63,67,72,76,81,86,91,96,102,108,114,120,126,133,140,147,154,162,170,178,186,195,204,214,224,234,244,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0
+#define PWM3_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,5,9,13,17,22,27,32,37,42,47,53,58,64,70,77,83,90,97,104,112,119,127,135,144,152,161,170,180,190,200,210,221,232,243,255
+#define MAX_1x7135 65
+#define MAX_Nx7135 115
+#define HALFSPEED_LEVEL 20
+#define QUARTERSPEED_LEVEL 5
+#endif
+
+// regulate down faster when the FET is active, slower otherwise
+#define THERM_FASTER_LEVEL MAX_Nx7135 // throttle back faster when high
+
+// don't do this
+#undef BLINK_AT_CHANNEL_BOUNDARIES
+#undef BLINK_AT_RAMP_CEILING
+