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:
Raphael Coeffic
2022-01-11 22:46:41 +10:00
committed by GitHub
parent cc316e5a2c
commit 71b0e72dd0
+1 -7
View File
@@ -333,13 +333,7 @@ bool isSwitchAvailable(int swtch, SwitchContext context)
#if NUM_XPOTS > 0
if (swtch >= SWSRC_FIRST_MULTIPOS_SWITCH && swtch <= SWSRC_LAST_MULTIPOS_SWITCH) {
int index = (swtch - SWSRC_FIRST_MULTIPOS_SWITCH) / XPOTS_MULTIPOS_COUNT;
if (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;
}
return IS_POT_MULTIPOS(POT1+index);
}
#endif