#1549 (Firmware part)
This commit is contained in:
+9
-6
@@ -348,17 +348,20 @@ extern void boardInit();
|
||||
|
||||
enum PotType {
|
||||
POT_TYPE_NONE,
|
||||
POT_TYPE_POT,
|
||||
POT_TYPE_DETENT,
|
||||
POT_TYPE_MULTIPOS,
|
||||
POT_TYPE_MAX=POT_TYPE_MULTIPOS
|
||||
POT_TYPE_NO_DETENT,
|
||||
POT_TYPE_MAX=POT_TYPE_NO_DETENT
|
||||
};
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define IS_POT_AVAILABLE(x) ((x)!=POT3 || (g_eeGeneral.potsType & (0x03 << (2*((x)-POT1))))!=POT_TYPE_NONE)
|
||||
#define IS_POT_MULTIPOS(x) ((x)>=POT1 && (x)<=POT_LAST && ((g_eeGeneral.potsType>>(2*((x)-POT1)))&0x03)==POT_TYPE_MULTIPOS)
|
||||
#define IS_POT_AVAILABLE(x) ((x)!=POT3 || (g_eeGeneral.potsType & (0x03 << (2*((x)-POT1))))!=POT_TYPE_NONE)
|
||||
#define IS_POT_MULTIPOS(x) ((x)>=POT1 && (x)<=POT_LAST && ((g_eeGeneral.potsType>>(2*((x)-POT1)))&0x03)==POT_TYPE_MULTIPOS)
|
||||
#define IS_POT_WITHOUT_DETENT(x) ((x)>=POT1 && (x)<=POT_LAST && ((g_eeGeneral.potsType>>(2*((x)-POT1)))&0x03)==POT_TYPE_NO_DETENT)
|
||||
#else
|
||||
#define IS_POT_AVAILABLE(x) (true)
|
||||
#define IS_POT_MULTIPOS(x) (false)
|
||||
#define IS_POT_AVAILABLE(x) (true)
|
||||
#define IS_POT_MULTIPOS(x) (false)
|
||||
#define IS_POT_WITHOUT_DETENT(x) (true)
|
||||
#endif
|
||||
|
||||
#define GET_LOWRES_POT_POSITION(i) (getValue(MIXSRC_FIRST_POT+(i)) >> 4)
|
||||
|
||||
Reference in New Issue
Block a user