1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 16:55:20 +03:00

Prevent multipos switch to be returned as a source

This commit is contained in:
3djc 2021-01-19 08:24:02 +01:00
parent 6eb1ade135
commit 233d1d2630
2 changed files with 2 additions and 1 deletions

View file

@ -268,6 +268,7 @@ void memswap(void * a, void * b, uint8_t size);
#define IS_POT_AVAILABLE(x) (IS_POT(x) && POT_CONFIG(x)!=POT_NONE)
#define IS_POT_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_SWITCH_MULTPOS(x) (SWSRC_FIRST_MULTIPOS_SWITCH <= (x) && (x) <= SWSRC_LAST_MULTIPOS_SWITCH)
#elif defined(PCBX7) || defined(PCBXLITE)
#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)