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)
|
||||
|
||||
Reference in New Issue
Block a user