[Taranis] Channel monitor with MENU LONG in all model menus, About/stats screens navigation
This commit is contained in:
@@ -928,6 +928,11 @@ void menuModelSetup(uint8_t event)
|
|||||||
pxxFlag[INTERNAL_MODULE] = 0;
|
pxxFlag[INTERNAL_MODULE] = 0;
|
||||||
pxxFlag[EXTERNAL_MODULE] = 0;
|
pxxFlag[EXTERNAL_MODULE] = 0;
|
||||||
}
|
}
|
||||||
|
if (event == EVT_KEY_LONG(KEY_MENU)) {
|
||||||
|
pushMenu(menuChannelsView);
|
||||||
|
killEvents(event);
|
||||||
|
return;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
@@ -1708,6 +1713,14 @@ void editPhaseTrims(uint8_t x, uint8_t y, uint8_t phase, uint8_t event, uint8_t
|
|||||||
|
|
||||||
void menuModelFlightModesAll(uint8_t event)
|
void menuModelFlightModesAll(uint8_t event)
|
||||||
{
|
{
|
||||||
|
#if defined(PCBTARANIS)
|
||||||
|
if (event == EVT_KEY_LONG(KEY_MENU)) {
|
||||||
|
pushMenu(menuChannelsView);
|
||||||
|
killEvents(event);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
MENU(STR_MENUFLIGHTPHASES, menuTabModel, e_FlightModesAll, 1+MAX_PHASES+1, {0, NAVIGATION_LINE_BY_LINE|(ITEM_PHASES_LAST-2), NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, 0});
|
MENU(STR_MENUFLIGHTPHASES, menuTabModel, e_FlightModesAll, 1+MAX_PHASES+1, {0, NAVIGATION_LINE_BY_LINE|(ITEM_PHASES_LAST-2), NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, 0});
|
||||||
|
|
||||||
int8_t sub = m_posVert - 1;
|
int8_t sub = m_posVert - 1;
|
||||||
@@ -2051,6 +2064,14 @@ enum menuModelHeliItems {
|
|||||||
|
|
||||||
void menuModelHeli(uint8_t event)
|
void menuModelHeli(uint8_t event)
|
||||||
{
|
{
|
||||||
|
#if defined(PCBTARANIS)
|
||||||
|
if (event == EVT_KEY_LONG(KEY_MENU)) {
|
||||||
|
pushMenu(menuChannelsView);
|
||||||
|
killEvents(event);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
SIMPLE_MENU(STR_MENUHELISETUP, menuTabModel, e_Heli, 7);
|
SIMPLE_MENU(STR_MENUHELISETUP, menuTabModel, e_Heli, 7);
|
||||||
|
|
||||||
uint8_t sub = m_posVert - 1;
|
uint8_t sub = m_posVert - 1;
|
||||||
@@ -2301,6 +2322,10 @@ void menuModelCurveOne(uint8_t event)
|
|||||||
menuHandler = onCurveOneMenu;
|
menuHandler = onCurveOneMenu;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case EVT_KEY_LONG(KEY_MENU):
|
||||||
|
pushMenu(menuChannelsView);
|
||||||
|
killEvents(event);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawCurve(FW);
|
DrawCurve(FW);
|
||||||
@@ -2650,6 +2675,14 @@ enum ExposFields {
|
|||||||
|
|
||||||
void menuModelExpoOne(uint8_t event)
|
void menuModelExpoOne(uint8_t event)
|
||||||
{
|
{
|
||||||
|
#if defined(PCBTARANIS)
|
||||||
|
if (event == EVT_KEY_LONG(KEY_MENU)) {
|
||||||
|
pushMenu(menuChannelsView);
|
||||||
|
killEvents(event);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ExpoData *ed = expoaddress(s_currIdx);
|
ExpoData *ed = expoaddress(s_currIdx);
|
||||||
putsMixerSource(7*FW+FW/2, 0, ed->chn+1, 0);
|
putsMixerSource(7*FW+FW/2, 0, ed->chn+1, 0);
|
||||||
|
|
||||||
@@ -3288,6 +3321,14 @@ void menuModelExpoMix(uint8_t expo, uint8_t event)
|
|||||||
|
|
||||||
void menuModelExposAll(uint8_t event)
|
void menuModelExposAll(uint8_t event)
|
||||||
{
|
{
|
||||||
|
#if defined(PCBTARANIS)
|
||||||
|
if (event == EVT_KEY_LONG(KEY_MENU)) {
|
||||||
|
pushMenu(menuChannelsView);
|
||||||
|
killEvents(event);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return menuModelExpoMix(1, event);
|
return menuModelExpoMix(1, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3378,6 +3419,14 @@ void menuModelLimits(uint8_t event)
|
|||||||
{
|
{
|
||||||
uint8_t sub = m_posVert - 1;
|
uint8_t sub = m_posVert - 1;
|
||||||
|
|
||||||
|
#if defined(PCBTARANIS)
|
||||||
|
if (event == EVT_KEY_LONG(KEY_MENU)) {
|
||||||
|
pushMenu(menuChannelsView);
|
||||||
|
killEvents(event);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (sub < NUM_CHNOUT) {
|
if (sub < NUM_CHNOUT) {
|
||||||
#if defined(PPM_CENTER_ADJUSTABLE) || defined(PPM_UNIT_US)
|
#if defined(PPM_CENTER_ADJUSTABLE) || defined(PPM_UNIT_US)
|
||||||
lcd_outdezAtt(13*FW, 0, PPM_CH_CENTER(sub)+channelOutputs[sub]/2, 0);
|
lcd_outdezAtt(13*FW, 0, PPM_CH_CENTER(sub)+channelOutputs[sub]/2, 0);
|
||||||
@@ -3575,6 +3624,12 @@ void menuModelCurvesAll(uint8_t event)
|
|||||||
pushMenu(menuModelCurveOne);
|
pushMenu(menuModelCurveOne);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#if defined(PCBTARANIS)
|
||||||
|
case EVT_KEY_LONG(KEY_MENU):
|
||||||
|
pushMenu(menuChannelsView);
|
||||||
|
killEvents(event);
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
for (uint8_t i=0; i<LCD_LINES-1; i++) {
|
for (uint8_t i=0; i<LCD_LINES-1; i++) {
|
||||||
@@ -3613,6 +3668,14 @@ void menuModelCurvesAll(uint8_t event)
|
|||||||
#if LCD_W >= 212 && defined(GVARS) && defined(FLIGHT_MODES)
|
#if LCD_W >= 212 && defined(GVARS) && defined(FLIGHT_MODES)
|
||||||
void menuModelGVars(uint8_t event)
|
void menuModelGVars(uint8_t event)
|
||||||
{
|
{
|
||||||
|
#if defined(PCBTARANIS)
|
||||||
|
if (event == EVT_KEY_LONG(KEY_MENU)) {
|
||||||
|
pushMenu(menuChannelsView);
|
||||||
|
killEvents(event);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
MENU(STR_MENUGLOBALVARS, menuTabModel, e_GVars, 1+MAX_GVARS, {0, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES});
|
MENU(STR_MENUGLOBALVARS, menuTabModel, e_GVars, 1+MAX_GVARS, {0, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES});
|
||||||
|
|
||||||
uint8_t sub = m_posVert - 1;
|
uint8_t sub = m_posVert - 1;
|
||||||
@@ -3894,6 +3957,14 @@ void menuModelCustomSwitches(uint8_t event)
|
|||||||
#define CHECK_INCDEC_CSPARAM(event, var, min, max) var=checkIncDec(event,var,min,max,incdecFlag)
|
#define CHECK_INCDEC_CSPARAM(event, var, min, max) var=checkIncDec(event,var,min,max,incdecFlag)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PCBTARANIS)
|
||||||
|
if (event == EVT_KEY_LONG(KEY_MENU)) {
|
||||||
|
pushMenu(menuChannelsView);
|
||||||
|
killEvents(event);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
MENU(STR_MENUCUSTOMSWITCHES, menuTabModel, e_CustomSwitches, NUM_CSW+1, {0, NAVIGATION_LINE_BY_LINE|CSW_FIELD_LAST/*repeated...*/});
|
MENU(STR_MENUCUSTOMSWITCHES, menuTabModel, e_CustomSwitches, NUM_CSW+1, {0, NAVIGATION_LINE_BY_LINE|CSW_FIELD_LAST/*repeated...*/});
|
||||||
|
|
||||||
uint8_t y = 0;
|
uint8_t y = 0;
|
||||||
@@ -4067,6 +4138,14 @@ void onCustomFunctionsMenu(const char *result)
|
|||||||
|
|
||||||
void menuModelCustomFunctions(uint8_t event)
|
void menuModelCustomFunctions(uint8_t event)
|
||||||
{
|
{
|
||||||
|
#if defined(PCBTARANIS)
|
||||||
|
if (event == EVT_KEY_LONG(KEY_MENU)) {
|
||||||
|
pushMenu(menuChannelsView);
|
||||||
|
killEvents(event);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
MENU(STR_MENUCUSTOMFUNC, menuTabModel, e_CustomFunctions, NUM_CFN+1, {0, NAVIGATION_LINE_BY_LINE|3/*repeated*/});
|
MENU(STR_MENUCUSTOMFUNC, menuTabModel, e_CustomFunctions, NUM_CFN+1, {0, NAVIGATION_LINE_BY_LINE|3/*repeated*/});
|
||||||
|
|
||||||
uint8_t y;
|
uint8_t y;
|
||||||
|
|||||||
@@ -67,12 +67,17 @@ void menuAboutView(uint8_t event)
|
|||||||
screenIndex = 0;
|
screenIndex = 0;
|
||||||
greyIndex = 0;
|
greyIndex = 0;
|
||||||
break;
|
break;
|
||||||
case EVT_KEY_FIRST(KEY_UP):
|
|
||||||
case EVT_KEY_FIRST(KEY_DOWN):
|
case EVT_KEY_FIRST(KEY_DOWN):
|
||||||
|
screenIndex < ABOUT_PARENTS ? screenIndex++ : screenIndex = ABOUT_OPENTX;
|
||||||
|
greyIndex = 0;
|
||||||
|
break;
|
||||||
|
case EVT_KEY_FIRST(KEY_UP):
|
||||||
|
screenIndex > ABOUT_OPENTX ? screenIndex-- : screenIndex = ABOUT_PARENTS;
|
||||||
|
greyIndex = 0;
|
||||||
|
break;
|
||||||
case EVT_KEY_FIRST(KEY_EXIT):
|
case EVT_KEY_FIRST(KEY_EXIT):
|
||||||
case EVT_KEY_FIRST(KEY_ENTER):
|
|
||||||
chainMenu(menuMainView);
|
chainMenu(menuMainView);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
lcd_bmp(0, 0, about_bmp);
|
lcd_bmp(0, 0, about_bmp);
|
||||||
@@ -90,7 +95,7 @@ void menuAboutView(uint8_t event)
|
|||||||
lcd_putsAtt(62, 36, PSTR("Your donation will ensure"), SMLSIZE);
|
lcd_putsAtt(62, 36, PSTR("Your donation will ensure"), SMLSIZE);
|
||||||
lcd_putsAtt(62, 44, PSTR("that it remains free and open"), SMLSIZE);
|
lcd_putsAtt(62, 44, PSTR("that it remains free and open"), SMLSIZE);
|
||||||
lcd_putsAtt(62, 56, PSTR("The amount is up to you!"), SMLSIZE);
|
lcd_putsAtt(62, 56, PSTR("The amount is up to you!"), SMLSIZE);
|
||||||
screenDuration = 300;
|
screenDuration = 200;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ABOUT_BERTRAND:
|
case ABOUT_BERTRAND:
|
||||||
|
|||||||
@@ -42,12 +42,12 @@ void menuStatisticsView(uint8_t event)
|
|||||||
|
|
||||||
switch(event)
|
switch(event)
|
||||||
{
|
{
|
||||||
case EVT_KEY_FIRST(KEY_UP):
|
|
||||||
#if !defined(PCBTARANIS) || defined(DEBUG)
|
#if !defined(PCBTARANIS) || defined(DEBUG)
|
||||||
|
case EVT_KEY_FIRST(KEY_UP):
|
||||||
chainMenu(menuStatisticsDebug);
|
chainMenu(menuStatisticsDebug);
|
||||||
return;
|
return;
|
||||||
#endif
|
|
||||||
case EVT_KEY_FIRST(KEY_DOWN):
|
case EVT_KEY_FIRST(KEY_DOWN):
|
||||||
|
#endif
|
||||||
case EVT_KEY_FIRST(KEY_EXIT):
|
case EVT_KEY_FIRST(KEY_EXIT):
|
||||||
chainMenu(menuMainView);
|
chainMenu(menuMainView);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user