feat: MIN constant as a source option (#3639)
* feature request #1635 - added MIN (-MAX -> -1024) as source * fix rebase * fix rebase * change to use language strings for MIN/MAX instead of instance updated CN and TX language file for MINuse -RESX for MIN instead of magi numbercode cleanup * updated test sources * updated JP language * JP language: changed translation text * updated HE language translations
This commit is contained in:
@@ -91,6 +91,8 @@ void onSourceLongEnterPress(const char * result)
|
||||
checkIncDecSelection = MIXSRC_FIRST_STICK;
|
||||
else if (result == STR_MENU_POTS)
|
||||
checkIncDecSelection = MIXSRC_FIRST_POT;
|
||||
else if (result == STR_MENU_MIN)
|
||||
checkIncDecSelection = MIXSRC_MIN;
|
||||
else if (result == STR_MENU_MAX)
|
||||
checkIncDecSelection = MIXSRC_MAX;
|
||||
else if (result == STR_MENU_HELI)
|
||||
|
||||
@@ -146,6 +146,7 @@ int checkIncDec(event_t event, int val, int i_min, int i_max,
|
||||
#endif
|
||||
if (i_min <= MIXSRC_FIRST_STICK && i_max >= MIXSRC_FIRST_STICK) POPUP_MENU_ADD_ITEM(STR_MENU_STICKS);
|
||||
if (i_min <= MIXSRC_FIRST_POT && i_max >= MIXSRC_FIRST_POT) POPUP_MENU_ADD_ITEM(STR_MENU_POTS);
|
||||
if (i_min <= MIXSRC_MIN && i_max >= MIXSRC_MIN) POPUP_MENU_ADD_ITEM(STR_MENU_MIN);
|
||||
if (i_min <= MIXSRC_MAX && i_max >= MIXSRC_MAX) POPUP_MENU_ADD_ITEM(STR_MENU_MAX);
|
||||
#if defined(HELI)
|
||||
if (modelHeliEnabled())
|
||||
@@ -173,7 +174,7 @@ int checkIncDec(event_t event, int val, int i_min, int i_max,
|
||||
}
|
||||
if (checkIncDecSelection != 0) {
|
||||
newval = checkIncDecSelection;
|
||||
if (checkIncDecSelection != MIXSRC_MAX)
|
||||
if (checkIncDecSelection != MIXSRC_MIN && checkIncDecSelection != MIXSRC_MAX)
|
||||
s_editMode = EDIT_MODIFY_FIELD;
|
||||
checkIncDecSelection = 0;
|
||||
}
|
||||
|
||||
@@ -159,6 +159,7 @@ int checkIncDec(event_t event, int val, int i_min, int i_max,
|
||||
#endif
|
||||
if (i_min <= MIXSRC_FIRST_STICK && i_max >= MIXSRC_FIRST_STICK) POPUP_MENU_ADD_ITEM(STR_MENU_STICKS);
|
||||
if (i_min <= MIXSRC_FIRST_POT && i_max >= MIXSRC_FIRST_POT) POPUP_MENU_ADD_ITEM(STR_MENU_POTS);
|
||||
if (i_min <= MIXSRC_MIN && i_max >= MIXSRC_MIN) POPUP_MENU_ADD_ITEM(STR_MENU_MIN);
|
||||
if (i_min <= MIXSRC_MAX && i_max >= MIXSRC_MAX) POPUP_MENU_ADD_ITEM(STR_MENU_MAX);
|
||||
#if defined(HELI)
|
||||
if (modelHeliEnabled())
|
||||
@@ -186,7 +187,7 @@ int checkIncDec(event_t event, int val, int i_min, int i_max,
|
||||
}
|
||||
if (checkIncDecSelection != 0) {
|
||||
newval = checkIncDecSelection;
|
||||
if (checkIncDecSelection != MIXSRC_MAX)
|
||||
if (checkIncDecSelection != MIXSRC_MIN && checkIncDecSelection != MIXSRC_MAX)
|
||||
s_editMode = EDIT_MODIFY_FIELD;
|
||||
checkIncDecSelection = 0;
|
||||
}
|
||||
|
||||
@@ -155,6 +155,7 @@ int checkIncDec(event_t event, int val, int i_min, int i_max,
|
||||
#endif
|
||||
if (i_min <= MIXSRC_FIRST_STICK && i_max >= MIXSRC_FIRST_STICK) POPUP_MENU_ADD_ITEM(STR_MENU_STICKS);
|
||||
if (i_min <= MIXSRC_FIRST_POT && i_max >= MIXSRC_FIRST_POT) POPUP_MENU_ADD_ITEM(STR_MENU_POTS);
|
||||
if (i_min <= MIXSRC_MIN && i_max >= MIXSRC_MIN) POPUP_MENU_ADD_ITEM(STR_MENU_MIN);
|
||||
if (i_min <= MIXSRC_MAX && i_max >= MIXSRC_MAX) POPUP_MENU_ADD_ITEM(STR_MENU_MAX);
|
||||
#if defined(HELI)
|
||||
if (modelHeliEnabled())
|
||||
@@ -182,7 +183,7 @@ int checkIncDec(event_t event, int val, int i_min, int i_max,
|
||||
}
|
||||
if (checkIncDecSelection != 0) {
|
||||
newval = checkIncDecSelection;
|
||||
if (checkIncDecSelection != MIXSRC_MAX)
|
||||
if (checkIncDecSelection != MIXSRC_MIN && checkIncDecSelection != MIXSRC_MAX)
|
||||
s_editMode = EDIT_MODIFY_FIELD;
|
||||
checkIncDecSelection = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user