1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-26 01:35:21 +03:00

[X7D] Compilation fix

This commit is contained in:
Bertrand Songis 2016-09-04 22:27:36 +02:00
parent d178982ec5
commit fd138cf22a
2 changed files with 22 additions and 15 deletions

View file

@ -298,24 +298,24 @@
void memswap(void * a, void * b, uint8_t size);
#if defined(PCBTARANIS) || defined(PCBHORUS)
#if defined(PCBX9D) || defined(PCBX9DP) || defined(PCBX9E) || defined(PCBHORUS)
#define POT_CONFIG(x) ((g_eeGeneral.potsConfig >> (2*((x)-POT1)))&0x03)
#define IS_POT_MULTIPOS(x) (IS_POT(x) && POT_CONFIG(x)==POT_MULTIPOS_SWITCH)
#define IS_POT_WITHOUT_DETENT(x) (IS_POT(x) && POT_CONFIG(x)==POT_WITHOUT_DETENT)
#define IS_SLIDER_AVAILABLE(x) ((x) == SLIDER1 || (x) == SLIDER2 || (IS_SLIDER(x) && (g_eeGeneral.slidersConfig & (0x01 << ((x)-SLIDER1)))))
#define IS_POT_AVAILABLE(x) (IS_POT(x) && POT_CONFIG(x)!=POT_NONE)
#define IS_POT_OR_SLIDER_AVAILABLE(x) (IS_POT_AVAILABLE(x) || IS_SLIDER_AVAILABLE(x))
#define IS_MULTIPOS_CALIBRATED(cal) (cal->count>0 && cal->count<XPOTS_MULTIPOS_COUNT)
#define IS_POT_OR_SLIDER_AVAILABLE(x) (IS_POT_AVAILABLE(x) || IS_SLIDER_AVAILABLE(x))
#define IS_MULTIPOS_CALIBRATED(cal) (cal->count>0 && cal->count<XPOTS_MULTIPOS_COUNT)
#elif defined(PCBFLAMENCO)
#define IS_POT_MULTIPOS(x) (false)
#define IS_POT_WITHOUT_DETENT(x) (false)
#define IS_POT_OR_SLIDER_AVAILABLE(x) (true)
#define IS_MULTIPOS_CALIBRATED(cal) (false)
#define IS_POT_OR_SLIDER_AVAILABLE(x) (true)
#define IS_MULTIPOS_CALIBRATED(cal) (false)
#else
#define IS_POT_MULTIPOS(x) (false)
#define IS_POT_WITHOUT_DETENT(x) (true)
#define IS_POT_OR_SLIDER_AVAILABLE(x) (true)
#define IS_MULTIPOS_CALIBRATED(cal) (false)
#define IS_POT_OR_SLIDER_AVAILABLE(x) (true)
#define IS_MULTIPOS_CALIBRATED(cal) (false)
#endif
#if defined(PCBFLAMENCO) || defined(PCBHORUS) || defined(PCBX9E) || defined(PCBX7D)

View file

@ -63,7 +63,21 @@ make -j2 firmware
make -j2 simu
make -j2 gtests ; ./gtests
# OpenTX on Taranis
# OpenTX on X7D
rm -rf *
cmake ${COMMON_OPTIONS} -DPCB=X7D -DHELI=YES ${SRCDIR}
make -j2 firmware
make -j2 simu
make -j2 gtests ; ./gtests
# OpenTX on X9D
rm -rf *
cmake ${COMMON_OPTIONS} -DPCB=X9D -DHELI=YES -DLUA=YES -DWARNINGS_AS_ERRORS=YES ${SRCDIR}
make -j2 firmware
make -j2 simu
make -j2 gtests ; ./gtests
# OpenTX on X9D+
rm -rf *
cmake ${COMMON_OPTIONS} -DPCB=X9D -DHELI=YES -DLUA=YES -DWARNINGS_AS_ERRORS=YES ${SRCDIR}
make -j2 firmware
@ -77,13 +91,6 @@ make -j2 firmware
make -j2 simu
make -j2 gtests ; ./gtests
# OpenTX on Taranis Plus
rm -rf *
cmake ${COMMON_OPTIONS} -DPCB=X9D+ -DHELI=YES -DLUA=YES -DWARNINGS_AS_ERRORS=YES -DCURVES=YES ${SRCDIR}
make -j2 firmware
make -j2 simu
make -j2 gtests ; ./gtests
# OpenTX on Horus beta boards
rm -rf *
cmake ${COMMON_OPTIONS} -DPCB=HORUS -DPCBREV=10 -DHELI=NO -DUSB=SERIAL -DCLI=YES -DDEBUG=YES -DGVARS=YES ${SRCDIR}