Confirmation screen when inverting the Thr channel in LIMITS menu.
This commit is contained in:
+32
-2
@@ -1864,7 +1864,17 @@ void menuProcMixAll(uint8_t event)
|
||||
return menuProcExpoMix(0, event);
|
||||
}
|
||||
|
||||
void menuProcLimits(uint8_t event)
|
||||
bool thrOutput(uint8_t ch)
|
||||
{
|
||||
for (uint8_t i=0; i<MAX_MIXERS; i++) {
|
||||
MixData *mix = mixaddress(i);
|
||||
if (mix->destCh==ch && mix->srcRaw==MIXSRC_Thr)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void menuProcLimits(uint8_t _event)
|
||||
{
|
||||
#ifdef PPM_CENTER_ADJUSTABLE
|
||||
#define LIMITS_ITEMS_COUNT 4
|
||||
@@ -1872,6 +1882,8 @@ void menuProcLimits(uint8_t event)
|
||||
#define LIMITS_ITEMS_COUNT 3
|
||||
#endif
|
||||
|
||||
uint8_t event = (s_warning ? 0 : _event);
|
||||
|
||||
MENU(STR_MENULIMITS, menuTabModel, e_Limits, 1+NUM_CHNOUT+1, {0, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, LIMITS_ITEMS_COUNT, 0});
|
||||
|
||||
uint8_t sub = m_posVert - 1;
|
||||
@@ -1883,6 +1895,13 @@ void menuProcLimits(uint8_t event)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (s_confirmation) {
|
||||
LimitData *ld = limitaddress(sub);
|
||||
ld->revert = !ld->revert;
|
||||
s_confirmation = 0;
|
||||
AUDIO_WARNING2();
|
||||
}
|
||||
|
||||
for (uint8_t i=0; i<7; i++) {
|
||||
uint8_t y = (i+1)*FH;
|
||||
uint8_t k = i+s_pgOfs;
|
||||
@@ -1970,7 +1989,14 @@ void menuProcLimits(uint8_t event)
|
||||
lcd_putsiAtt(18*FW, y, STR_MMMINV, ld->revert, attr);
|
||||
#endif
|
||||
if (active) {
|
||||
CHECK_INCDEC_MODELVAR(event, ld->revert, 0, 1);
|
||||
bool revert_new = checkIncDecModel(event, ld->revert, 0, 1);
|
||||
if (checkIncDec_Ret && thrOutput(k)) {
|
||||
s_warning = STR_INVERT_THR;
|
||||
killEvents(event);
|
||||
_event = 0;
|
||||
}
|
||||
else
|
||||
ld->revert = revert_new;
|
||||
}
|
||||
break;
|
||||
#ifdef PPM_CENTER_ADJUSTABLE
|
||||
@@ -1984,6 +2010,10 @@ void menuProcLimits(uint8_t event)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (s_warning) {
|
||||
displayConfirmation(_event);
|
||||
}
|
||||
}
|
||||
|
||||
void menuProcCurvesAll(uint8_t event)
|
||||
|
||||
@@ -275,6 +275,8 @@ const pm_char STR_RXNUM[] PROGMEM = TR_RXNUM;
|
||||
const pm_char STR_SYNCMENU[] PROGMEM = TR_SYNCMENU;
|
||||
#endif
|
||||
|
||||
const pm_char STR_INVERT_THR[] PROGMEM = TR_INVERT_THR;
|
||||
|
||||
#if defined(ROTARY_ENCODERS)
|
||||
const pm_char STR_BACK[] PROGMEM = TR_BACK;
|
||||
const pm_char STR_MIXERWEIGHT[] PROGMEM = TR_MIXERWEIGHT;
|
||||
|
||||
@@ -345,6 +345,7 @@ extern const pm_char STR_MENUSTAT[];
|
||||
extern const pm_char STR_MENUDEBUG[];
|
||||
extern const pm_char STR_RXNUM[];
|
||||
extern const pm_char STR_SYNCMENU[];
|
||||
extern const pm_char STR_INVERT_THR[];
|
||||
|
||||
#if defined(ROTARY_ENCODERS)
|
||||
extern const pm_char STR_BACK[];
|
||||
|
||||
@@ -397,3 +397,4 @@
|
||||
#define TR_THROTTLEWARN "PLYNU"
|
||||
#define TR_ALARMSWARN "ALARMU"
|
||||
#define TR_SWITCHWARN "POZICE"
|
||||
#define TR_INVERT_THR "Invert Thr?"
|
||||
|
||||
@@ -392,3 +392,4 @@
|
||||
#define TR_THROTTLEWARN "GAS"
|
||||
#define TR_ALARMSWARN "ALARM"
|
||||
#define TR_SWITCHWARN "SCHALTER"
|
||||
#define TR_INVERT_THR "Invert Thr?"
|
||||
|
||||
@@ -397,3 +397,4 @@
|
||||
#define TR_THROTTLEWARN "THROTTLE"
|
||||
#define TR_ALARMSWARN "ALARMS"
|
||||
#define TR_SWITCHWARN "SWITCH"
|
||||
#define TR_INVERT_THR "Invert Thr?"
|
||||
|
||||
@@ -396,3 +396,4 @@
|
||||
#define TR_THROTTLEWARN "GAZ"
|
||||
#define TR_ALARMSWARN "ALARMES"
|
||||
#define TR_SWITCHWARN "INTERS"
|
||||
#define TR_INVERT_THR "Inverser Gaz?"
|
||||
|
||||
@@ -397,3 +397,4 @@
|
||||
#define TR_THROTTLEWARN "MOTORE"
|
||||
#define TR_ALARMSWARN "ALLARMI"
|
||||
#define TR_SWITCHWARN "SWITCH"
|
||||
#define TR_INVERT_THR "Invert Thr?"
|
||||
|
||||
@@ -395,3 +395,4 @@
|
||||
#define TR_THROTTLEWARN "GAS"
|
||||
#define TR_ALARMSWARN "ALARM"
|
||||
#define TR_SWITCHWARN "BRYTARE"
|
||||
#define TR_INVERT_THR "Invert Thr?"
|
||||
|
||||
Reference in New Issue
Block a user