diff options
Diffstat (limited to 'spaghetti-monster/werner')
| -rwxr-xr-x | spaghetti-monster/werner/build-all.sh | 18 | ||||
| -rw-r--r-- | spaghetti-monster/werner/werner.c | 23 |
2 files changed, 12 insertions, 29 deletions
diff --git a/spaghetti-monster/werner/build-all.sh b/spaghetti-monster/werner/build-all.sh index 43879bb..87d4f0d 100755 --- a/spaghetti-monster/werner/build-all.sh +++ b/spaghetti-monster/werner/build-all.sh @@ -4,16 +4,10 @@ cp -av ../anduril/cfg*.h . UI=werner -for TARGET in \ - BLF_GT \ - BLF_Q8 \ - EMISAR_D1 \ - EMISAR_D1S \ - EMISAR_D4 \ - EMISAR_D4S \ - FW3A \ - ; do - echo "===== $TARGET =====" - ../../../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/werner/werner.c b/spaghetti-monster/werner/werner.c index b6cdf12..7c47cd7 100644 --- a/spaghetti-monster/werner/werner.c +++ b/spaghetti-monster/werner/werner.c @@ -20,10 +20,7 @@ /********* User-configurable options *********/ // Physical driver type (uncomment one of the following or define it at the gcc command line) -//#define FSM_EMISAR_D4_DRIVER -//#define FSM_BLF_Q8_DRIVER -//#define FSM_FW3A_DRIVER -//#define FSM_BLF_GT_DRIVER +//#define CONFIGFILE cfg-emisar-d4.h #define USE_LVP // FIXME: won't build when this option is turned off @@ -37,21 +34,13 @@ //#define BATTCHECK_4bars // FIXME: breaks build /***** specific settings for known driver types *****/ -#if defined(FSM_BLF_GT_DRIVER) -#include "cfg-blf-gt.h" - -#elif defined(FSM_BLF_Q8_DRIVER) -#include "cfg-blf-q8.h" - -#elif defined(FSM_EMISAR_D4_DRIVER) -#include "cfg-emisar-d4.h" - -#elif defined(FSM_FW3A_DRIVER) -#include "cfg-fw3a.h" - +#ifdef CONFIGFILE +#include "tk.h" +#include incfile(CONFIGFILE) +#else +#error You need to define CONFIGFILE #endif - // thermal properties, if not defined per-driver #ifndef MIN_THERM_STEPDOWN #define MIN_THERM_STEPDOWN MAX_1x7135 // lowest value it'll step down to |
