Taranis calibration better fix
This commit is contained in:
@@ -1587,7 +1587,8 @@ void menuCommonCalib(uint8_t event)
|
|||||||
for (uint8_t i=POT1; i<=POT_LAST; i++) {
|
for (uint8_t i=POT1; i<=POT_LAST; i++) {
|
||||||
int idx = i - POT1;
|
int idx = i - POT1;
|
||||||
int count = reusableBuffer.calib.xpotsCalib[idx].stepsCount;
|
int count = reusableBuffer.calib.xpotsCalib[idx].stepsCount;
|
||||||
if (IS_POT_MULTIPOS(i) && count > 1 && count <= XPOTS_MULTIPOS_COUNT) {
|
if (IS_POT_MULTIPOS(i)) {
|
||||||
|
if (count > 1 && count <= XPOTS_MULTIPOS_COUNT) {
|
||||||
for (int j=0; j<count; j++) {
|
for (int j=0; j<count; j++) {
|
||||||
for (int k=j+1; k<count; k++) {
|
for (int k=j+1; k<count; k++) {
|
||||||
if (reusableBuffer.calib.xpotsCalib[idx].steps[k] < reusableBuffer.calib.xpotsCalib[idx].steps[j]) {
|
if (reusableBuffer.calib.xpotsCalib[idx].steps[k] < reusableBuffer.calib.xpotsCalib[idx].steps[j]) {
|
||||||
@@ -1605,6 +1606,7 @@ void menuCommonCalib(uint8_t event)
|
|||||||
g_eeGeneral.potsType &= ~(0x03<<(2*idx));
|
g_eeGeneral.potsType &= ~(0x03<<(2*idx));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
g_eeGeneral.chkSum = evalChkSum();
|
g_eeGeneral.chkSum = evalChkSum();
|
||||||
eeDirty(EE_GENERAL);
|
eeDirty(EE_GENERAL);
|
||||||
|
|||||||
Reference in New Issue
Block a user