diff options
Diffstat (limited to 'spaghetti-monster')
| -rw-r--r-- | spaghetti-monster/anduril/anduril.c | 64 | ||||
| -rwxr-xr-x | spaghetti-monster/anduril/build-all.sh | 27 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-blf-gt-mini.h | 1 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-blf-gt.h | 1 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-blf-q8.h | 1 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-emisar-d1.h | 2 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-emisar-d1s.h | 2 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-emisar-d4-219c.h | 1 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-emisar-d4.h | 1 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-emisar-d4s-219c.h | 1 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-emisar-d4s.h | 1 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-ff-pl47-219.h | 1 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-ff-pl47.h | 1 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-ff-rot66-219.h | 1 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-ff-rot66.h | 1 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-fw3a.h | 1 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-sofirn-sp36.h | 6 |
17 files changed, 25 insertions, 88 deletions
diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c index ed4cb6d..85390e2 100644 --- a/spaghetti-monster/anduril/anduril.c +++ b/spaghetti-monster/anduril/anduril.c @@ -19,20 +19,8 @@ */ /********* 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_GT_MINI_DRIVER -//#define FSM_BLF_Q8_DRIVER -//#define FSM_EMISAR_D1_DRIVER -//#define FSM_EMISAR_D1S_DRIVER -//#define FSM_EMISAR_D4_DRIVER -//#define FSM_EMISAR_D4_219C_DRIVER -//#define FSM_EMISAR_D4S_DRIVER -//#define FSM_EMISAR_D4S_219C_DRIVER -//#define FSM_FF_ROT66_DRIVER -//#define FSM_FF_ROT66_219_DRIVER -//#define FSM_FW3A_DRIVER -//#define FSM_SOFIRN_SP36_DRIVER +// Anduril config file name (set it here or define it at the gcc command line) +//#define CONFIGFILE cfg-blf-q8.h #define USE_LVP // FIXME: won't build when this option is turned off @@ -76,52 +64,8 @@ //#define START_AT_MEMORIZED_LEVEL /***** specific settings for known driver types *****/ -#if defined(FSM_BLF_GT_DRIVER) -#include "cfg-blf-gt.h" - -#elif defined(FSM_BLF_GT_MINI_DRIVER) -#include "cfg-blf-gt-mini.h" - -#elif defined(FSM_BLF_Q8_DRIVER) -#include "cfg-blf-q8.h" - -#elif defined(FSM_EMISAR_D1_DRIVER) -#include "cfg-emisar-d1.h" - -#elif defined(FSM_EMISAR_D1S_DRIVER) -#include "cfg-emisar-d1s.h" - -#elif defined(FSM_EMISAR_D4_219C_DRIVER) -#include "cfg-emisar-d4-219c.h" - -#elif defined(FSM_EMISAR_D4_DRIVER) -#include "cfg-emisar-d4.h" - -#elif defined(FSM_EMISAR_D4S_219C_DRIVER) -#include "cfg-emisar-d4s-219c.h" - -#elif defined(FSM_EMISAR_D4S_DRIVER) -#include "cfg-emisar-d4s.h" - -#elif defined(FSM_FF_PL47_DRIVER) -#include "cfg-ff-pl47.h" - -#elif defined(FSM_FF_PL47_219_DRIVER) -#include "cfg-ff-pl47-219.h" - -#elif defined(FSM_FF_ROT66_DRIVER) -#include "cfg-ff-rot66.h" - -#elif defined(FSM_FF_ROT66_219_DRIVER) -#include "cfg-ff-rot66-219.h" - -#elif defined(FSM_FW3A_DRIVER) -#include "cfg-fw3a.h" - -#elif defined(FSM_SOFIRN_SP36_DRIVER) -#include "cfg-sofirn-sp36.h" - -#endif +#include "tk.h" +#include incfile(CONFIGFILE) // thermal properties, if not defined per-driver diff --git a/spaghetti-monster/anduril/build-all.sh b/spaghetti-monster/anduril/build-all.sh index 2f94c00..c355f1e 100755 --- a/spaghetti-monster/anduril/build-all.sh +++ b/spaghetti-monster/anduril/build-all.sh @@ -2,25 +2,10 @@ UI=anduril -for TARGET in \ - BLF_GT \ - BLF_GT_MINI \ - BLF_Q8 \ - EMISAR_D1 \ - EMISAR_D1S \ - EMISAR_D4 \ - EMISAR_D4_219C \ - EMISAR_D4S \ - EMISAR_D4S_219C \ - FF_PL47 \ - FF_PL47_219 \ - FF_ROT66 \ - FF_ROT66_219 \ - FW3A \ - SOFIRN_SP36 \ - ; do - echo "===== $TARGET =====" - echo ../../../bin/build.sh 85 "$UI" "-DFSM_${TARGET}_DRIVER" - ../../../bin/build.sh 85 "$UI" "-DFSM_${TARGET}_DRIVER" - mv -f "$UI".hex "$UI".$TARGET.hex +for TARGET in cfg-*.h ; do + NAME=$(echo "$TARGET" | perl -ne '/cfg-(.*).h/ && print "$1\n";') + echo "===== $NAME =====" + echo ../../../bin/build.sh 85 "$UI" "-DCONFIGFILE=${TARGET}" + ../../../bin/build.sh 85 "$UI" "-DCONFIGFILE=${TARGET}" + mv -f "$UI".hex "$UI".$NAME.hex done diff --git a/spaghetti-monster/anduril/cfg-blf-gt-mini.h b/spaghetti-monster/anduril/cfg-blf-gt-mini.h index 885024a..3728f98 100644 --- a/spaghetti-monster/anduril/cfg-blf-gt-mini.h +++ b/spaghetti-monster/anduril/cfg-blf-gt-mini.h @@ -1,4 +1,5 @@ // BLF/Lumintop GT Mini config options for Anduril +#include "hwdef-BLF_GT_Mini.h" // Same as an Emisar D1S, except it has a lighted button #include "cfg-emisar-d1s.h" diff --git a/spaghetti-monster/anduril/cfg-blf-gt.h b/spaghetti-monster/anduril/cfg-blf-gt.h index a29d7e7..b8f4d6d 100644 --- a/spaghetti-monster/anduril/cfg-blf-gt.h +++ b/spaghetti-monster/anduril/cfg-blf-gt.h @@ -1,4 +1,5 @@ // BLF GT config options for Anduril +#include "hwdef-BLF_GT.h" // the button lights up #define USE_INDICATOR_LED diff --git a/spaghetti-monster/anduril/cfg-blf-q8.h b/spaghetti-monster/anduril/cfg-blf-q8.h index 90099c3..970fedb 100644 --- a/spaghetti-monster/anduril/cfg-blf-q8.h +++ b/spaghetti-monster/anduril/cfg-blf-q8.h @@ -1,4 +1,5 @@ // BLF Q8 config options for Anduril +#include "hwdef-BLF_Q8.h" // the button lights up #define USE_INDICATOR_LED diff --git a/spaghetti-monster/anduril/cfg-emisar-d1.h b/spaghetti-monster/anduril/cfg-emisar-d1.h index d35480c..35e91db 100644 --- a/spaghetti-monster/anduril/cfg-emisar-d1.h +++ b/spaghetti-monster/anduril/cfg-emisar-d1.h @@ -1,4 +1,6 @@ // Emisar D1 config options for Anduril +#include "hwdef-Emisar_D1.h" +// same as Emisar D4, mostly #include "cfg-emisar-d4.h" // stop panicking at ~75% power or ~1000 lm (D1 has a decent power-to-thermal-mass ratio) diff --git a/spaghetti-monster/anduril/cfg-emisar-d1s.h b/spaghetti-monster/anduril/cfg-emisar-d1s.h index eb98c2e..56200a2 100644 --- a/spaghetti-monster/anduril/cfg-emisar-d1s.h +++ b/spaghetti-monster/anduril/cfg-emisar-d1s.h @@ -1,4 +1,6 @@ // Emisar D1S config options for Anduril +#include "hwdef-Emisar_D1S.h" +// same as Emisar D4, mostly #include "cfg-emisar-d4.h" // stop panicking at ~90% power or ~1200 lm (D1S has a good power-to-thermal-mass ratio) diff --git a/spaghetti-monster/anduril/cfg-emisar-d4-219c.h b/spaghetti-monster/anduril/cfg-emisar-d4-219c.h index 55ae1eb..cf245a2 100644 --- a/spaghetti-monster/anduril/cfg-emisar-d4-219c.h +++ b/spaghetti-monster/anduril/cfg-emisar-d4-219c.h @@ -1,7 +1,6 @@ // Emisar D4-219C config options for Anduril // same as D4S but with FET modes limited to 80% power // to avoid destroying the LEDs -#define FSM_EMISAR_D4_DRIVER #include "cfg-emisar-d4.h" #undef PWM2_LEVELS diff --git a/spaghetti-monster/anduril/cfg-emisar-d4.h b/spaghetti-monster/anduril/cfg-emisar-d4.h index e83c62d..2f4df49 100644 --- a/spaghetti-monster/anduril/cfg-emisar-d4.h +++ b/spaghetti-monster/anduril/cfg-emisar-d4.h @@ -1,4 +1,5 @@ // Emisar D4 config options for Anduril +#include "hwdef-Emisar_D4.h" // ../../bin/level_calc.py 1 65 7135 1 0.8 150 // ... mixed with this: diff --git a/spaghetti-monster/anduril/cfg-emisar-d4s-219c.h b/spaghetti-monster/anduril/cfg-emisar-d4s-219c.h index c02274d..0c68bc4 100644 --- a/spaghetti-monster/anduril/cfg-emisar-d4s-219c.h +++ b/spaghetti-monster/anduril/cfg-emisar-d4s-219c.h @@ -1,7 +1,6 @@ // Emisar D4S-219C config options for Anduril // same as D4S but with FET modes limited to 80% power // to avoid destroying the LEDs -#define FSM_EMISAR_D4S_DRIVER #include "cfg-emisar-d4s.h" #undef PWM2_LEVELS diff --git a/spaghetti-monster/anduril/cfg-emisar-d4s.h b/spaghetti-monster/anduril/cfg-emisar-d4s.h index 1070ee7..e26634a 100644 --- a/spaghetti-monster/anduril/cfg-emisar-d4s.h +++ b/spaghetti-monster/anduril/cfg-emisar-d4s.h @@ -1,4 +1,5 @@ // Emisar D4S config options for Anduril +#include "hwdef-Emisar_D4S.h" // the button lights up #define USE_INDICATOR_LED diff --git a/spaghetti-monster/anduril/cfg-ff-pl47-219.h b/spaghetti-monster/anduril/cfg-ff-pl47-219.h index ea701bd..3ded2aa 100644 --- a/spaghetti-monster/anduril/cfg-ff-pl47-219.h +++ b/spaghetti-monster/anduril/cfg-ff-pl47-219.h @@ -1,7 +1,6 @@ // Fireflies PL47-219B config options for Anduril // same as PL47 but with FET modes limited to 67% power // to avoid destroying the LEDs -#define FSM_FF_PL47_DRIVER #include "cfg-ff-pl47.h" #undef PWM2_LEVELS diff --git a/spaghetti-monster/anduril/cfg-ff-pl47.h b/spaghetti-monster/anduril/cfg-ff-pl47.h index 2e5647d..8e21013 100644 --- a/spaghetti-monster/anduril/cfg-ff-pl47.h +++ b/spaghetti-monster/anduril/cfg-ff-pl47.h @@ -1,4 +1,5 @@ // Fireflies PL47 config options for Anduril +#include "hwdef-FF_PL47.h" // the button lights up #define USE_INDICATOR_LED diff --git a/spaghetti-monster/anduril/cfg-ff-rot66-219.h b/spaghetti-monster/anduril/cfg-ff-rot66-219.h index 46ceb9f..efaad94 100644 --- a/spaghetti-monster/anduril/cfg-ff-rot66-219.h +++ b/spaghetti-monster/anduril/cfg-ff-rot66-219.h @@ -1,6 +1,5 @@ // Fireflies ROT66-219 (7x7135) config options for Anduril // same as regular ROT66, but calibrated for Nichia 219B with 7x7135 chips -#define FSM_FF_ROT66_DRIVER #include "cfg-ff-rot66.h" // driver is a FET+N+1, diff --git a/spaghetti-monster/anduril/cfg-ff-rot66.h b/spaghetti-monster/anduril/cfg-ff-rot66.h index 165b2ba..78d7f66 100644 --- a/spaghetti-monster/anduril/cfg-ff-rot66.h +++ b/spaghetti-monster/anduril/cfg-ff-rot66.h @@ -1,4 +1,5 @@ // Fireflies ROT66 (14x7135) config options for Anduril +#include "hwdef-FF_ROT66.h" // the button lights up #define USE_INDICATOR_LED diff --git a/spaghetti-monster/anduril/cfg-fw3a.h b/spaghetti-monster/anduril/cfg-fw3a.h index efa70ae..dd77137 100644 --- a/spaghetti-monster/anduril/cfg-fw3a.h +++ b/spaghetti-monster/anduril/cfg-fw3a.h @@ -1,4 +1,5 @@ // FW3A config options for Anduril +#include "hwdef-FW3A.h" // ../../bin/level_calc.py 1 65 7135 1 0.8 150 // ... mixed with this: diff --git a/spaghetti-monster/anduril/cfg-sofirn-sp36.h b/spaghetti-monster/anduril/cfg-sofirn-sp36.h index 2d6717f..1150a62 100644 --- a/spaghetti-monster/anduril/cfg-sofirn-sp36.h +++ b/spaghetti-monster/anduril/cfg-sofirn-sp36.h @@ -1,11 +1,11 @@ // Sofirn SP36 (small Q8) config options for Anduril +// same as the BLF Q8, mostly +#include "cfg-blf-q8.h" // voltage readings were a little high with the Q8 value +#undef VOLTAGE_FUDGE_FACTOR #define VOLTAGE_FUDGE_FACTOR 5 // add 0.25V, not 0.35V -#define FSM_BLF_Q8_DRIVER -#include "cfg-blf-q8.h" - // the high button LED mode on this light uses too much power // off mode: low (1) // lockout: blinking (3) |
