mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 01:05:10 +03:00
Cosmetics
This commit is contained in:
parent
ce028e7fe4
commit
19eca80d4a
1 changed files with 5 additions and 2 deletions
|
@ -268,7 +268,6 @@ 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)
|
||||
|
@ -276,12 +275,16 @@ 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))
|
||||
#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)
|
||||
#else
|
||||
#define IS_POT_MULTIPOS(x) (false)
|
||||
#define IS_POT_WITHOUT_DETENT(x) (true)
|
||||
#define IS_POT_SLIDER_AVAILABLE(x) (true)
|
||||
#define IS_MULTIPOS_CALIBRATED(cal) (false)
|
||||
#endif
|
||||
|
||||
#if NUM_XPOTS > 0
|
||||
#define IS_SWITCH_MULTPOS(x) (SWSRC_FIRST_MULTIPOS_SWITCH <= (x) && (x) <= SWSRC_LAST_MULTIPOS_SWITCH)
|
||||
#else
|
||||
#define IS_SWITCH_MULTPOS(x) (false)
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue