[9XR-PRO] Navigation issue in FlightModeOne screen

This commit is contained in:
Bertrand Songis
2017-02-27 14:04:44 +01:00
parent 4d847e6943
commit 9f3898ae1e
+3 -3
View File
@@ -84,7 +84,7 @@ bool isTrimModeAvailable(int mode)
return (mode < 0 || (mode%2) == 0 || (mode/2) != s_currIdx); return (mode < 0 || (mode%2) == 0 || (mode/2) != s_currIdx);
} }
void menuModelPhaseOne(event_t event) void menuModelFlightModeOne(event_t event)
{ {
FlightModeData * fm = flightModeAddress(s_currIdx); FlightModeData * fm = flightModeAddress(s_currIdx);
drawFlightMode(13*FW, 0, s_currIdx+1, (getFlightMode()==s_currIdx ? BOLD : 0)); drawFlightMode(13*FW, 0, s_currIdx+1, (getFlightMode()==s_currIdx ? BOLD : 0));
@@ -140,7 +140,7 @@ void menuModelPhaseOne(event_t event)
#if defined(CPUARM) #if defined(CPUARM)
for (uint8_t t = 0; t < NUM_STICKS; t++) { for (uint8_t t = 0; t < NUM_STICKS; t++) {
drawTrimMode(MIXES_2ND_COLUMN + (t*2*FW), y, s_currIdx, t, menuHorizontalPosition == t ? attr : 0); drawTrimMode(MIXES_2ND_COLUMN + (t*2*FW), y, s_currIdx, t, menuHorizontalPosition == t ? attr : 0);
if (s_editMode && attr && menuHorizontalPosition == t) { if (s_editMode >= 0 && attr && menuHorizontalPosition == t) {
trim_t & v = fm->trim[t]; trim_t & v = fm->trim[t];
v.mode = checkIncDec(event, v.mode==TRIM_MODE_NONE ? -1 : v.mode, -1, k==0 ? 0 : 2*MAX_FLIGHT_MODES-1, EE_MODEL, isTrimModeAvailable); v.mode = checkIncDec(event, v.mode==TRIM_MODE_NONE ? -1 : v.mode, -1, k==0 ? 0 : 2*MAX_FLIGHT_MODES-1, EE_MODEL, isTrimModeAvailable);
} }
@@ -276,7 +276,7 @@ void menuModelFlightModesAll(event_t event)
#endif #endif
if (sub >= 0 && sub < MAX_FLIGHT_MODES) { if (sub >= 0 && sub < MAX_FLIGHT_MODES) {
s_currIdx = sub; s_currIdx = sub;
pushMenu(menuModelPhaseOne); pushMenu(menuModelFlightModeOne);
} }
break; break;
} }