Remove calibration check when asserting availability of 6-pos switch positions (#1368)
Thus allowing it to show on radio when calibration is invalid
This commit is contained in:
@@ -333,13 +333,7 @@ bool isSwitchAvailable(int swtch, SwitchContext context)
|
|||||||
#if NUM_XPOTS > 0
|
#if NUM_XPOTS > 0
|
||||||
if (swtch >= SWSRC_FIRST_MULTIPOS_SWITCH && swtch <= SWSRC_LAST_MULTIPOS_SWITCH) {
|
if (swtch >= SWSRC_FIRST_MULTIPOS_SWITCH && swtch <= SWSRC_LAST_MULTIPOS_SWITCH) {
|
||||||
int index = (swtch - SWSRC_FIRST_MULTIPOS_SWITCH) / XPOTS_MULTIPOS_COUNT;
|
int index = (swtch - SWSRC_FIRST_MULTIPOS_SWITCH) / XPOTS_MULTIPOS_COUNT;
|
||||||
if (IS_POT_MULTIPOS(POT1+index)) {
|
return IS_POT_MULTIPOS(POT1+index);
|
||||||
StepsCalibData * calib = (StepsCalibData *) &g_eeGeneral.calib[POT1+index];
|
|
||||||
return (calib->count >= ((swtch - SWSRC_FIRST_MULTIPOS_SWITCH) % XPOTS_MULTIPOS_COUNT));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user