diff --git a/radio/src/gui/128x64/model_inputs_mixes.cpp b/radio/src/gui/128x64/model_inputs_mixes.cpp index 6535b8821..c35954d9d 100644 --- a/radio/src/gui/128x64/model_inputs_mixes.cpp +++ b/radio/src/gui/128x64/model_inputs_mixes.cpp @@ -524,7 +524,6 @@ void menuModelMixOne(event_t event) #define MIX_LINE_SWITCH_POS 16*FW #define MIX_LINE_DELAY_POS 19*FW+7 -#if defined(NAVIGATION_MENUS) void onExpoMixMenu(const char *result) { bool expo = (menuHandlers[menuLevel] == menuModelExposAll); @@ -551,7 +550,6 @@ void onExpoMixMenu(const char *result) deleteExpoMix(expo, s_currIdx); } } -#endif void displayMixInfos(coord_t y, MixData *md) { @@ -672,7 +670,6 @@ void menuModelExpoMix(uint8_t expo, event_t event) } else { if (s_copyMode) s_currCh = 0; -#if defined(NAVIGATION_MENUS) if (s_currCh) { if (reachExpoMixCountLimit(expo)) break; insertExpoMix(expo, s_currIdx); @@ -691,15 +688,6 @@ void menuModelExpoMix(uint8_t expo, event_t event) POPUP_MENU_ADD_ITEM(STR_DELETE); POPUP_MENU_START(onExpoMixMenu); } -#else - if (s_currCh) { - if (reachExpoMixCountLimit(expo)) break; - insertExpoMix(expo, s_currIdx); - } - pushMenu(expo ? menuModelExpoOne : menuModelMixOne); - s_copyMode = 0; - return; -#endif } } break; diff --git a/radio/src/gui/128x64/model_select.cpp b/radio/src/gui/128x64/model_select.cpp index 09a31eb2e..ce6649c17 100644 --- a/radio/src/gui/128x64/model_select.cpp +++ b/radio/src/gui/128x64/model_select.cpp @@ -22,7 +22,6 @@ #define MODELSEL_W LCD_W -#if defined(NAVIGATION_MENUS) void onModelSelectMenu(const char * result) { int8_t sub = menuVerticalPosition; @@ -67,7 +66,6 @@ void onModelSelectMenu(const char * result) } #endif } -#endif void menuModelSelect(event_t event) { @@ -194,7 +192,6 @@ void menuModelSelect(event_t event) else if (event == EVT_KEY_LONG(KEY_ENTER) || IS_ROTARY_BREAK(event)) { s_copyMode = 0; killEvents(event); -#if defined(NAVIGATION_MENUS) if (g_eeGeneral.currModel != sub) { if (eeModelExists(sub)) { POPUP_MENU_ADD_ITEM(STR_SELECT_MODEL); @@ -218,11 +215,6 @@ void menuModelSelect(event_t event) POPUP_MENU_ADD_ITEM(STR_MOVE_MODEL); } POPUP_MENU_START(onModelSelectMenu); -#else - if (g_eeGeneral.currModel != sub) { - selectModel(sub); - } -#endif } else if (eeModelExists(sub)) { s_copyMode = (s_copyMode == COPY_MODE ? MOVE_MODE : COPY_MODE); diff --git a/radio/src/gui/128x64/view_main.cpp b/radio/src/gui/128x64/view_main.cpp index 36ea906eb..79c49be53 100644 --- a/radio/src/gui/128x64/view_main.cpp +++ b/radio/src/gui/128x64/view_main.cpp @@ -258,7 +258,6 @@ void displayVoltageOrAlarm() #define EVT_KEY_STATISTICS EVT_KEY_LONG(KEY_UP) #endif -#if defined(NAVIGATION_MENUS) void onMainViewMenu(const char *result) { if (result == STR_RESET_TIMER1) { @@ -299,7 +298,6 @@ void onMainViewMenu(const char *result) chainMenu(menuAboutView); } } -#endif void menuMainView(event_t event) { @@ -334,7 +332,6 @@ void menuMainView(event_t event) } break; -#if defined(NAVIGATION_MENUS) case EVT_KEY_CONTEXT_MENU: killEvents(event); @@ -348,7 +345,6 @@ void menuMainView(event_t event) POPUP_MENU_ADD_ITEM(STR_ABOUT_US); POPUP_MENU_START(onMainViewMenu); break; -#endif #if MENUS_LOCK != 2 /*no menus*/ #if defined(EVT_KEY_LAST_MENU) @@ -407,19 +403,8 @@ void menuMainView(event_t event) if (gvarDisplayTimer > 0) { gvarDisplayTimer = 0; } -#endif -#if !defined(NAVIGATION_MENUS) - if (view == VIEW_TIMER2) { - timerReset(1); - } #endif break; - -#if !defined(NAVIGATION_MENUS) - case EVT_KEY_LONG(KEY_EXIT): - flightReset(); - break; -#endif } { diff --git a/radio/src/gui/212x64/popups.cpp b/radio/src/gui/212x64/popups.cpp index 82ff6b464..93b8693bf 100644 --- a/radio/src/gui/212x64/popups.cpp +++ b/radio/src/gui/212x64/popups.cpp @@ -86,18 +86,21 @@ void showAlertBox(const char * title, const char * text, const char * action, ui void runPopupWarning(event_t event) { - warningResult = false; drawMessageBox(warningText); + if (warningInfoText) { lcdDrawSizedText(WARNING_LINE_X, WARNING_LINE_Y+FH, warningInfoText, warningInfoLength, WARNING_INFO_FLAGS); } + lcdDrawText(WARNING_LINE_X, WARNING_LINE_Y+2*FH, warningType == WARNING_TYPE_INFO ? STR_OK : (warningType == WARNING_TYPE_ASTERISK ? STR_EXIT : STR_POPUPS_ENTER_EXIT)); + switch (event) { case EVT_KEY_BREAK(KEY_ENTER): if (warningType == WARNING_TYPE_ASTERISK) break; + if (warningType != WARNING_TYPE_INFO) - warningResult = true; + popupMenuHandler(STR_OK); // no break case EVT_KEY_BREAK(KEY_EXIT): diff --git a/radio/src/gui/212x64/popups.h b/radio/src/gui/212x64/popups.h index 3ee4dea46..65f0881b4 100644 --- a/radio/src/gui/212x64/popups.h +++ b/radio/src/gui/212x64/popups.h @@ -44,7 +44,6 @@ extern uint8_t warningInfoFlags; #define WARNING_INFO_FLAGS warningInfoFlags #define SET_WARNING_INFO(info, len, flags) (warningInfoText = info, warningInfoLength = len, warningInfoFlags = flags) -#define NAVIGATION_MENUS #define POPUP_MENU_ADD_ITEM(s) do { popupMenuOffsetType = MENU_OFFSET_INTERNAL; if (popupMenuItemsCount < POPUP_MENU_MAX_LINES) popupMenuItems[popupMenuItemsCount++] = s; } while (0) #define POPUP_MENU_SELECT_ITEM(s) s_menu_item = (s > 0 ? (s < popupMenuItemsCount ? s : popupMenuItemsCount) : 0) #define POPUP_MENU_START(func) do { popupMenuHandler = (func); AUDIO_KEY_PRESS(); } while (0) diff --git a/radio/src/gui/480x272/menus.h b/radio/src/gui/480x272/menus.h index aa5d9e045..b38db2616 100644 --- a/radio/src/gui/480x272/menus.h +++ b/radio/src/gui/480x272/menus.h @@ -488,7 +488,6 @@ extern uint8_t warningInfoFlags; #define WARNING_INFO_FLAGS warningInfoFlags #define SET_WARNING_INFO(info, len, flags) (warningInfoText = info, warningInfoLength = len, warningInfoFlags = flags) -#define NAVIGATION_MENUS #define POPUP_MENU_ADD_ITEM(s) do { popupMenuOffsetType = MENU_OFFSET_INTERNAL; if (popupMenuItemsCount < POPUP_MENU_MAX_LINES) popupMenuItems[popupMenuItemsCount++] = s; } while (0) #define POPUP_MENU_SELECT_ITEM(s) s_menu_item = (s > 0 ? (s < popupMenuItemsCount ? s : popupMenuItemsCount) : 0) #define POPUP_MENU_START(func) do { popupMenuHandler = (func); AUDIO_KEY_PRESS(); } while(0) diff --git a/radio/src/gui/common/stdlcd/popups.cpp b/radio/src/gui/common/stdlcd/popups.cpp index b47dfe1b0..0937d0a5c 100644 --- a/radio/src/gui/common/stdlcd/popups.cpp +++ b/radio/src/gui/common/stdlcd/popups.cpp @@ -23,7 +23,6 @@ uint8_t popupMenuOffsetType = MENU_OFFSET_INTERNAL; void (*popupFunc)(event_t event) = NULL; -#if defined(NAVIGATION_MENUS) const char * popupMenuItems[POPUP_MENU_MAX_LINES]; uint8_t s_menu_item = 0; uint16_t popupMenuItemsCount = 0; @@ -135,4 +134,3 @@ const char * runPopupMenu(event_t event) return result; } -#endif diff --git a/radio/src/translations.cpp b/radio/src/translations.cpp index 010436cb8..a9cab7c68 100644 --- a/radio/src/translations.cpp +++ b/radio/src/translations.cpp @@ -407,7 +407,6 @@ const char STR_WAV_VOLUME[] = INDENT TR_WAV_VOLUME; const char STR_BG_VOLUME[] = INDENT TR_BG_VOLUME; const char STR_PERSISTENT_MAH[] = TR_PERSISTENT_MAH; -#if defined(NAVIGATION_MENUS) const char STR_SELECT_MODEL[] = TR_SELECT_MODEL; const char STR_CREATE_CATEGORY[] = TR_CREATE_CATEGORY; const char STR_RENAME_CATEGORY[] = TR_RENAME_CATEGORY; @@ -437,7 +436,6 @@ const char STR_USB_MASS_STORAGE[] = TR_USB_MASS_STORAGE; const char STR_USB_SERIAL[] = TR_USB_SERIAL; const char STR_SETUP_SCREENS[] = TR_SETUP_SCREENS; const char STR_MONITOR_SCREENS[] = TR_MONITOR_SCREENS; -#endif #if defined(MULTIMODULE) const char STR_MULTI_CUSTOM[] = TR_MULTI_CUSTOM; diff --git a/radio/src/translations.h b/radio/src/translations.h index a35f847aa..62e7d11e7 100644 --- a/radio/src/translations.h +++ b/radio/src/translations.h @@ -629,7 +629,6 @@ extern const char STR_PERSISTENT_MAH[]; #define LEN_CALIB_FIELDS PSIZE(TR_BATT_CALIB) #endif -#if defined(NAVIGATION_MENUS) extern const char STR_SELECT_MODEL[]; extern const char STR_CREATE_CATEGORY[]; extern const char STR_RENAME_CATEGORY[]; @@ -659,7 +658,6 @@ extern const char STR_PERSISTENT_MAH[]; extern const char STR_USB_SERIAL[]; extern const char STR_SETUP_SCREENS[]; extern const char STR_MONITOR_SCREENS[]; -#endif extern const char STR_RESET_BTN[]; extern const char STR_DEBUG[];