diff --git a/radio/src/gui/128x64/gui.h b/radio/src/gui/128x64/gui.h index ead9170f7e..8f845b70d1 100644 --- a/radio/src/gui/128x64/gui.h +++ b/radio/src/gui/128x64/gui.h @@ -260,10 +260,6 @@ void editSingleName(coord_t x, coord_t y, const char * label, char * name, uint8 uint8_t editDelay(coord_t y, event_t event, uint8_t attr, const char * str, uint8_t delay); #define EDIT_DELAY(x, y, event, attr, str, delay) editDelay(y, event, attr, str, delay) -#define WARNING_TYPE_ASTERISK 0 -#define WARNING_TYPE_CONFIRM 1 -#define WARNING_TYPE_INPUT 2 - extern const char * warningText; extern const char * warningInfoText; extern uint8_t warningInfoLength; diff --git a/radio/src/gui/128x64/model_custom_scripts.cpp b/radio/src/gui/128x64/model_custom_scripts.cpp index 44e3539c20..df8bc0f9f6 100644 --- a/radio/src/gui/128x64/model_custom_scripts.cpp +++ b/radio/src/gui/128x64/model_custom_scripts.cpp @@ -37,8 +37,8 @@ void onModelCustomScriptMenu(const char *result) POPUP_WARNING(STR_NO_SCRIPTS_ON_SD); } } - else { - // The user choosed a lua file in the list + else if (result) { + // The user chosen a lua file in the list copySelection(sd.file, result, sizeof(sd.file)); memset(sd.inputs, 0, sizeof(sd.inputs)); storageDirty(EE_MODEL); diff --git a/radio/src/gui/128x64/model_display.cpp b/radio/src/gui/128x64/model_display.cpp index caf0c79b3b..69ccad44e5 100644 --- a/radio/src/gui/128x64/model_display.cpp +++ b/radio/src/gui/128x64/model_display.cpp @@ -98,8 +98,8 @@ void onTelemetryScriptFileSelectionMenu(const char * result) POPUP_WARNING(STR_NO_SCRIPTS_ON_SD); } } - else { - // The user choosed a file in the list + else if (result != STR_EXIT) { + // The user chosen a file in the list memcpy(g_model.frsky.screens[screenIndex].script.file, result, sizeof(g_model.frsky.screens[screenIndex].script.file)); storageDirty(EE_MODEL); LUA_LOAD_MODEL_SCRIPTS(); diff --git a/radio/src/gui/128x64/model_logical_switches.cpp b/radio/src/gui/128x64/model_logical_switches.cpp index 77754b91fa..8f77d98a62 100644 --- a/radio/src/gui/128x64/model_logical_switches.cpp +++ b/radio/src/gui/128x64/model_logical_switches.cpp @@ -235,7 +235,7 @@ void onLogicalSwitchesMenu(const char *result) pushMenu(menuModelLogicalSwitchOne); } #if defined(SDCARD) - if (result == STR_COPY) { + else if (result == STR_COPY) { clipboard.type = CLIPBOARD_TYPE_CUSTOM_SWITCH; clipboard.data.csw = *cs; diff --git a/radio/src/gui/128x64/model_select.cpp b/radio/src/gui/128x64/model_select.cpp index 7d56e221eb..015ba93c31 100644 --- a/radio/src/gui/128x64/model_select.cpp +++ b/radio/src/gui/128x64/model_select.cpp @@ -55,7 +55,7 @@ void onModelSelectMenu(const char * result) SET_WARNING_INFO(modelHeaders[sub].name, sizeof(g_model.header.name), ZCHAR); } #if defined(SDCARD) - else { + else if (result != STR_EXIT) { // The user choosed a file on SD to restore storageCheck(true); POPUP_WARNING(eeRestoreModel(sub, (char *)result)); diff --git a/radio/src/gui/128x64/model_special_functions.cpp b/radio/src/gui/128x64/model_special_functions.cpp index 242ff22243..abce948f99 100644 --- a/radio/src/gui/128x64/model_special_functions.cpp +++ b/radio/src/gui/128x64/model_special_functions.cpp @@ -61,8 +61,8 @@ void onCustomFunctionsFileSelectionMenu(const char * result) POPUP_WARNING(func==FUNC_PLAY_SCRIPT ? STR_NO_SCRIPTS_ON_SD : STR_NO_SOUNDS_ON_SD); } } - else { - // The user choosed a file in the list + else if (result != STR_EXIT) { + // The user chosen a file in the list memcpy(cfn->play.name, result, sizeof(cfn->play.name)); storageDirty(eeFlags); } @@ -95,7 +95,7 @@ void onAdjustGvarSourceLongEnterPress(const char * result) CFN_PARAM(cfn) = 0; storageDirty(EE_MODEL); } - else { + else if (result != STR_EXIT) { onSourceLongEnterPress(result); } } diff --git a/radio/src/gui/128x64/popups.cpp b/radio/src/gui/128x64/popups.cpp index c8d7787e01..f16ec58a85 100644 --- a/radio/src/gui/128x64/popups.cpp +++ b/radio/src/gui/128x64/popups.cpp @@ -98,7 +98,7 @@ void runPopupWarning(event_t event) warningResult = false; drawMessageBox(); if (warningInfoText) { - lcdDrawSizedText(WARNING_LINE_X, WARNING_LINE_Y+FH, warningInfoText, warningInfoLength, WARNING_INFO_FLAGS); + lcdDrawSizedText(WARNING_LINE_X, WARNING_LINE_Y+FH, warningInfoText, warningInfoLength, warningInfoFlags); } lcdDrawText(WARNING_LINE_X, WARNING_LINE_Y+4*FH+2, warningType == WARNING_TYPE_ASTERISK ? STR_EXIT : STR_POPUPS_ENTER_EXIT); switch (event) { diff --git a/radio/src/gui/128x64/popups.h b/radio/src/gui/128x64/popups.h index 25017bb692..6fc9d72aee 100644 --- a/radio/src/gui/128x64/popups.h +++ b/radio/src/gui/128x64/popups.h @@ -21,6 +21,16 @@ #ifndef _POPUPS_H_ #define _POPUPS_H_ +#include +#include "buzzer.h" + +extern const char * warningText; +extern const char * warningInfoText; +extern uint8_t warningInfoLength; +extern uint8_t warningResult; +extern uint8_t warningType; +extern uint8_t warningInfoFlags; + #define MESSAGEBOX_X 8 #define MESSAGEBOX_Y 8 #define MESSAGEBOX_W (LCD_W - 15) @@ -33,58 +43,125 @@ #define WARNING_LINE_X 12 #define WARNING_LINE_Y MESSAGEBOX_Y + 2 +#define POPUP_MENU_MAX_LINES 12 +#define MENU_MAX_DISPLAY_LINES 6 +#define MENU_LINE_LENGTH (LEN_MODEL_NAME+12) + +enum { + MENU_OFFSET_INTERNAL, + MENU_OFFSET_EXTERNAL +}; + +typedef void (* PopupFunc)(event_t event); +extern PopupFunc popupFunc; +extern uint8_t popupMenuOffsetType; + +extern uint16_t popupMenuOffset; +extern const char * popupMenuItems[POPUP_MENU_MAX_LINES]; +extern uint16_t popupMenuItemsCount; +typedef void (* PopupMenuHandler)(const char * result); +extern PopupMenuHandler popupMenuHandler; +extern const char * popupMenuTitle; +extern uint8_t popupMenuSelectedItem; + +// Message box +void drawMessageBoxBackground(coord_t top, coord_t height); void drawMessageBox(); void showMessageBox(const char * title); -void runPopupWarning(event_t event); -#define DRAW_MESSAGE_BOX(title) (warningText = title, drawMessageBox(), warningText = NULL) +// Popup menu +const char * runPopupMenu(event_t event); +void runPopupWarning(event_t event); -extern void (*popupFunc)(event_t event); -extern uint8_t warningInfoFlags; +enum +{ + WARNING_TYPE_WAIT, + WARNING_TYPE_INFO, + WARNING_TYPE_ASTERISK, + WARNING_TYPE_CONFIRM, + WARNING_TYPE_INPUT +}; #if !defined(GUI) #define DISPLAY_WARNING(...) #define POPUP_WARNING(...) #define POPUP_CONFIRMATION(...) #define POPUP_INPUT(...) - #define WARNING_INFO_FLAGS 0 #define SET_WARNING_INFO(...) #else - #define DISPLAY_WARNING (*popupFunc) - #define POPUP_WARNING(s) (warningText = s, warningInfoText = 0, popupFunc = runPopupWarning) - #define POPUP_CONFIRMATION(s) (warningText = s, warningType = WARNING_TYPE_CONFIRM, warningInfoText = 0, popupFunc = runPopupWarning) - #define POPUP_INPUT(s, func) (warningText = s, popupFunc = func) - #define WARNING_INFO_FLAGS warningInfoFlags - #define SET_WARNING_INFO(info, len, flags) (warningInfoText = info, warningInfoLength = len, warningInfoFlags = flags) + #define DISPLAY_WARNING(evt) (*popupFunc)(evt) + // #define POPUP_CONFIRMATION(s) (warningText = s, warningType = WARNING_TYPE_CONFIRM, warningInfoText = 0, popupFunc = runPopupWarning) + // #define POPUP_INPUT(s, func) (warningText = s, popupFunc = func) #endif + + inline void POPUP_WARNING(const char * s) + { + warningText = s; + warningInfoText = nullptr; + warningType = WARNING_TYPE_ASTERISK; + popupFunc = runPopupWarning; + } + + inline void POPUP_CONFIRMATION(const char * s/*, PopupMenuHandler handler*/) + { + if (s != warningText) { + // killAllEvents(); + warningText = s; + warningInfoText = nullptr; + warningType = WARNING_TYPE_CONFIRM; + popupFunc = runPopupWarning; + // popupMenuHandler = handler; + } + } + + inline void POPUP_INPUT(const char * s, PopupFunc func) + { + warningText = s; + warningInfoText = nullptr; + warningType = WARNING_TYPE_INPUT; + popupFunc = func; + } + + inline void SET_WARNING_INFO(const char * info, uint8_t length, uint8_t flags) + { + warningInfoText = info; + warningInfoLength = length; + warningInfoFlags = flags; + } + + inline void POPUP_MENU_ADD_ITEM(const char * s) + { + popupMenuOffsetType = MENU_OFFSET_INTERNAL; + if (popupMenuItemsCount < POPUP_MENU_MAX_LINES) { + popupMenuItems[popupMenuItemsCount++] = s; + } + } + #if defined(SDCARD) #define POPUP_MENU_ADD_SD_ITEM(s) POPUP_MENU_ADD_ITEM(s) #else #define POPUP_MENU_ADD_SD_ITEM(s) #endif - #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) - #define POPUP_MENU_MAX_LINES 12 - #define MENU_MAX_DISPLAY_LINES 6 - #define MENU_LINE_LENGTH (LEN_MODEL_NAME+12) - - enum { - MENU_OFFSET_INTERNAL, - MENU_OFFSET_EXTERNAL - }; - extern uint8_t popupMenuOffsetType; - extern uint8_t s_menu_item; - -#if defined(NAVIGATION_MENUS) - extern uint16_t popupMenuOffset; - extern const char * popupMenuItems[POPUP_MENU_MAX_LINES]; - extern uint16_t popupMenuItemsCount; - const char * runPopupMenu(event_t event); - extern void (*popupMenuHandler)(const char * result); -#endif +inline void POPUP_MENU_SELECT_ITEM(uint8_t index) +{ + popupMenuSelectedItem = (index > 0 ? (index < popupMenuItemsCount ? index : popupMenuItemsCount) : 0); +} + +inline void POPUP_MENU_TITLE(const char * s) +{ + popupMenuTitle = s; +} + +inline void POPUP_MENU_START(PopupMenuHandler handler) +{ + if (handler != popupMenuHandler) { + // killAllEvents(); // not ported yet + AUDIO_KEY_PRESS(); + popupMenuHandler = handler; + } +} + #endif // _POPUPS_H_ diff --git a/radio/src/gui/212x64/gui.h b/radio/src/gui/212x64/gui.h index ce7421a5da..cfc47a5d3b 100644 --- a/radio/src/gui/212x64/gui.h +++ b/radio/src/gui/212x64/gui.h @@ -249,10 +249,6 @@ void editSingleName(coord_t x, coord_t y, const char * label, char * name, uint8 uint8_t editDelay(coord_t y, event_t event, uint8_t attr, const char * str, uint8_t delay); #define EDIT_DELAY(y, event, attr, str, delay) editDelay(y, event, attr, str, delay) -#define WARNING_TYPE_ASTERISK 0 -#define WARNING_TYPE_CONFIRM 1 -#define WARNING_TYPE_INPUT 2 - void copySelection(char * dst, const char * src, uint8_t size); extern const char * warningText; diff --git a/radio/src/gui/212x64/popups.cpp b/radio/src/gui/212x64/popups.cpp index 8aae80080e..2030ffdb53 100644 --- a/radio/src/gui/212x64/popups.cpp +++ b/radio/src/gui/212x64/popups.cpp @@ -89,7 +89,7 @@ void runPopupWarning(event_t event) drawMessageBox(warningText); if (warningInfoText) { - lcdDrawSizedText(WARNING_LINE_X, WARNING_LINE_Y+FH, warningInfoText, warningInfoLength, WARNING_INFO_FLAGS); + lcdDrawSizedText(WARNING_LINE_X, WARNING_LINE_Y+FH, warningInfoText, warningInfoLength, warningInfoFlags); } lcdDrawText(WARNING_LINE_X, WARNING_LINE_Y+2*FH, warningType == WARNING_TYPE_ASTERISK ? STR_EXIT : STR_POPUPS_ENTER_EXIT); diff --git a/radio/src/gui/212x64/popups.h b/radio/src/gui/212x64/popups.h index 5aabfb1e0a..aa8408968b 100644 --- a/radio/src/gui/212x64/popups.h +++ b/radio/src/gui/212x64/popups.h @@ -31,7 +31,6 @@ void drawMessageBox(const char * title); void showMessageBox(const char * title); void runPopupWarning(event_t event); -#define DRAW_MESSAGE_BOX(title) drawMessageBox(title) extern void (*popupFunc)(event_t event); extern uint8_t warningInfoFlags; @@ -40,11 +39,10 @@ extern uint8_t warningInfoFlags; #define POPUP_WARNING(s) (warningText = s, warningInfoText = 0, popupFunc = runPopupWarning) #define POPUP_CONFIRMATION(s) (warningText = s, warningType = WARNING_TYPE_CONFIRM, warningInfoText = 0, popupFunc = runPopupWarning) #define POPUP_INPUT(s, func) (warningText = s, popupFunc = func) -#define WARNING_INFO_FLAGS warningInfoFlags #define SET_WARNING_INFO(info, len, flags) (warningInfoText = info, warningInfoLength = len, warningInfoFlags = flags) #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_SELECT_ITEM(s) popupMenuSelectedItem = (s > 0 ? (s < popupMenuItemsCount ? s : popupMenuItemsCount) : 0) #define POPUP_MENU_START(func) do { popupMenuHandler = (func); AUDIO_KEY_PRESS(); } while (0) #define POPUP_MENU_MAX_LINES 12 #define MENU_MAX_DISPLAY_LINES 6 @@ -59,7 +57,7 @@ enum { MENU_OFFSET_EXTERNAL }; extern uint8_t popupMenuOffsetType; -extern uint8_t s_menu_item; +extern uint8_t popupMenuSelectedItem; const char * runPopupMenu(event_t event); extern void (*popupMenuHandler)(const char * result); diff --git a/radio/src/gui/common/stdlcd/popups.cpp b/radio/src/gui/common/stdlcd/popups.cpp index b787d0cd21..d4b118ecc6 100644 --- a/radio/src/gui/common/stdlcd/popups.cpp +++ b/radio/src/gui/common/stdlcd/popups.cpp @@ -24,26 +24,36 @@ uint8_t popupMenuOffsetType = MENU_OFFSET_INTERNAL; void (*popupFunc)(event_t event) = NULL; const char * popupMenuItems[POPUP_MENU_MAX_LINES]; -uint8_t s_menu_item = 0; +uint8_t popupMenuSelectedItem = 0; uint16_t popupMenuItemsCount = 0; uint8_t popupMenuFlags = 0; uint16_t popupMenuOffset = 0; void (*popupMenuHandler)(const char * result); +const char * popupMenuTitle = nullptr; const char * runPopupMenu(event_t event) { const char * result = nullptr; uint8_t display_count = min(popupMenuItemsCount, MENU_MAX_DISPLAY_LINES); - uint8_t y = LCD_H / 2 - 3 - (display_count * FH / 2); + uint8_t y = LCD_H / 2 - (popupMenuTitle ? 0 : 3) - (display_count * FH / 2); - lcdDrawFilledRect(MENU_X - 1, y - 1, MENU_W + 2, display_count * (FH+1) + 4, SOLID, ERASE); + // white background + lcdDrawFilledRect(MENU_X - 1, popupMenuTitle ? y - FH - 3 : y - 1, MENU_W + 2, display_count * (FH+1) + (popupMenuTitle ? FH + 6 : 4), SOLID, ERASE); + // title + if (popupMenuTitle) { + lcdDrawText(MENU_X + 2, y - FH, popupMenuTitle, BOLD); + lcdDrawRect(MENU_X, y - FH - 2, lcdLastRightPos - MENU_X + 2, FH + 3); + } + + // border lcdDrawRect(MENU_X, y, MENU_W, display_count * (FH+1) + 2, SOLID, FORCE); + // items for (uint32_t i=0; i display_count) { @@ -56,8 +66,8 @@ const char * runPopupMenu(event_t event) #endif case EVT_KEY_FIRST(KEY_UP): case EVT_KEY_REPT(KEY_UP): - if (s_menu_item > 0) { - s_menu_item--; + if (popupMenuSelectedItem > 0) { + popupMenuSelectedItem--; } #if defined(SDCARD) else if (popupMenuOffset > 0) { @@ -66,7 +76,7 @@ const char * runPopupMenu(event_t event) } #endif else { - s_menu_item = min(display_count, MENU_MAX_DISPLAY_LINES) - 1; + popupMenuSelectedItem = min(display_count, MENU_MAX_DISPLAY_LINES) - 1; #if defined(SDCARD) if (popupMenuItemsCount > MENU_MAX_DISPLAY_LINES) { popupMenuOffset = popupMenuItemsCount - display_count; @@ -81,8 +91,8 @@ const char * runPopupMenu(event_t event) #endif case EVT_KEY_FIRST(KEY_DOWN): case EVT_KEY_REPT(KEY_DOWN): - if (s_menu_item < display_count - 1 && popupMenuOffset + s_menu_item + 1 < popupMenuItemsCount) { - s_menu_item++; + if (popupMenuSelectedItem < display_count - 1 && popupMenuOffset + popupMenuSelectedItem + 1 < popupMenuItemsCount) { + popupMenuSelectedItem++; } #if defined(SDCARD) else if (popupMenuItemsCount > popupMenuOffset + display_count) { @@ -91,7 +101,7 @@ const char * runPopupMenu(event_t event) } #endif else { - s_menu_item = 0; + popupMenuSelectedItem = 0; #if defined(SDCARD) if (popupMenuOffset) { popupMenuOffset = 0; @@ -105,8 +115,12 @@ const char * runPopupMenu(event_t event) CASE_EVT_ROTARY_BREAK #endif case EVT_KEY_BREAK(KEY_ENTER): - result = popupMenuItems[s_menu_item + (popupMenuOffsetType == MENU_OFFSET_INTERNAL ? popupMenuOffset : 0)]; - // no break + result = popupMenuItems[popupMenuSelectedItem + (popupMenuOffsetType == MENU_OFFSET_INTERNAL ? popupMenuOffset : 0)]; + popupMenuItemsCount = 0; + popupMenuSelectedItem = 0; + popupMenuOffset = 0; + popupMenuTitle = nullptr; + break; #if defined(CASE_EVT_ROTARY_LONG) CASE_EVT_ROTARY_LONG @@ -115,10 +129,12 @@ const char * runPopupMenu(event_t event) #endif case EVT_KEY_BREAK(KEY_EXIT): + result = STR_EXIT; popupMenuItemsCount = 0; - s_menu_item = 0; + popupMenuSelectedItem = 0; popupMenuFlags = 0; popupMenuOffset = 0; + popupMenuTitle = nullptr; break; } diff --git a/radio/src/lua/interface.cpp b/radio/src/lua/interface.cpp index 69074a3080..21ba431365 100644 --- a/radio/src/lua/interface.cpp +++ b/radio/src/lua/interface.cpp @@ -733,7 +733,7 @@ void luaLoadPermanentScripts() void displayLuaError(const char * title) { #if !defined(COLORLCD) - DRAW_MESSAGE_BOX(title); + drawMessageBox(title); #endif if (lua_warning_info[0]) { char * split = strstr(lua_warning_info, ": "); diff --git a/radio/src/main.cpp b/radio/src/main.cpp index 0ced740ce1..555f958ff0 100644 --- a/radio/src/main.cpp +++ b/radio/src/main.cpp @@ -59,6 +59,7 @@ void handleUsbConnection() #if defined(USB_SERIAL) POPUP_MENU_ADD_ITEM(STR_USB_SERIAL); #endif + POPUP_MENU_TITLE(STR_SELECT_MODE); POPUP_MENU_START(onUSBConnectMenu); } else { @@ -344,8 +345,6 @@ void handleGui(event_t event) { } } -bool inPopupMenu = false; - void guiMain(event_t evt) { #if defined(LUA) @@ -390,10 +389,6 @@ void guiMain(event_t evt) else if (popupMenuItemsCount > 0) { // popup menu is active display it on top of normal menus handleGui(0); // suppress events, they are handled by the popup - if (!inPopupMenu) { - TRACE("Popup Menu started"); - inPopupMenu = true; - } const char * result = runPopupMenu(evt); if (result) { TRACE("popupMenuHandler(%s)", result); @@ -402,10 +397,6 @@ void guiMain(event_t evt) } else { // normal menus - if (inPopupMenu) { - TRACE("Popup Menu ended"); - inPopupMenu = false; - } handleGui(evt); } diff --git a/radio/src/targets/flysky/buzzer_driver.cpp b/radio/src/targets/flysky/buzzer_driver.cpp index 8d20c54e24..d441540994 100644 --- a/radio/src/targets/flysky/buzzer_driver.cpp +++ b/radio/src/targets/flysky/buzzer_driver.cpp @@ -331,7 +331,7 @@ void buzzerHeartbeat() if (buzzerState.tone.freqIncr) { uint32_t freqChange = BUZZER_BUFFER_DURATION * buzzerState.tone.freqIncr; - buzzerState.freq += limit(BEEP_MIN_FREQ, freqChange, BEEP_MAX_FREQ); + buzzerState.freq += limit(BEEP_MIN_FREQ, freqChange, BEEP_MAX_FREQ); buzzerOn(buzzerState.freq, g_eeGeneral.beepVolume); } diff --git a/radio/src/translations.cpp b/radio/src/translations.cpp index b02b640e41..944aa1845f 100644 --- a/radio/src/translations.cpp +++ b/radio/src/translations.cpp @@ -399,6 +399,7 @@ const char STR_WAV_VOLUME[] = INDENT TR_WAV_VOLUME; const char STR_PERSISTENT_MAH[] = TR_PERSISTENT_MAH; const char STR_SELECT_MODEL[] = TR_SELECT_MODEL; +const char STR_SELECT_MODE[] = TR_SELECT_MODE; const char STR_CREATE_CATEGORY[] = TR_CREATE_CATEGORY; const char STR_RENAME_CATEGORY[] = TR_RENAME_CATEGORY; const char STR_DELETE_CATEGORY[] = TR_DELETE_CATEGORY; diff --git a/radio/src/translations.h b/radio/src/translations.h index 1eeb5dbcba..e3d77cf004 100644 --- a/radio/src/translations.h +++ b/radio/src/translations.h @@ -635,6 +635,7 @@ extern const char STR_PERSISTENT_MAH[]; #define LEN_CALIB_FIELDS PSIZE(TR_BATT_CALIB) extern const char STR_SELECT_MODEL[]; + extern const char STR_SELECT_MODE[]; extern const char STR_CREATE_CATEGORY[]; extern const char STR_RENAME_CATEGORY[]; extern const char STR_DELETE_CATEGORY[]; diff --git a/radio/src/translations/cz.h.txt b/radio/src/translations/cz.h.txt index 25a7eb0c8f..62fd727f64 100644 --- a/radio/src/translations/cz.h.txt +++ b/radio/src/translations/cz.h.txt @@ -812,6 +812,7 @@ #define TR_VOLTAGE INDENT"Napětí" #define TR_CURRENT INDENT"Proud" #define TR_SELECT_MODEL "Vyber model" +#define TR_SELECT_MODE "Vybrat mód" #define TR_CREATE_CATEGORY "Nová kategorie" #define TR_RENAME_CATEGORY "Přejmenovat kategorii" #define TR_DELETE_CATEGORY "Odstranit kategorii" diff --git a/radio/src/translations/de.h.txt b/radio/src/translations/de.h.txt index 2e2d0cc2bd..3fb574e0bc 100644 --- a/radio/src/translations/de.h.txt +++ b/radio/src/translations/de.h.txt @@ -825,6 +825,7 @@ #define TR_VOLTAGE TR(INDENT "Spg", INDENT "Spannungsquelle") //9XR-Pro #define TR_CURRENT TR(INDENT "Strom", INDENT "Stromquelle") #define TR_SELECT_MODEL "Modell auswählen" +#define TR_SELECT_MODE "Wähle Mode" #define TR_CREATE_CATEGORY "Modelltyp erzeugen" #define TR_RENAME_CATEGORY "Modelltyp umbenennen" #define TR_DELETE_CATEGORY "Modelltyp löschen" diff --git a/radio/src/translations/en.h.txt b/radio/src/translations/en.h.txt index e6f225656f..7454516fc2 100644 --- a/radio/src/translations/en.h.txt +++ b/radio/src/translations/en.h.txt @@ -823,6 +823,7 @@ #define TR_VOLTAGE TR(INDENT "Voltage", INDENT "Voltage source") #define TR_CURRENT TR(INDENT "Current", INDENT "Current source") #define TR_SELECT_MODEL "Select model" +#define TR_SELECT_MODE "Select mode" #define TR_CREATE_CATEGORY "Create category" #define TR_RENAME_CATEGORY "Rename category" #define TR_DELETE_CATEGORY "Delete category" diff --git a/radio/src/translations/es.h.txt b/radio/src/translations/es.h.txt index 3f415bac30..3e977dc6b6 100644 --- a/radio/src/translations/es.h.txt +++ b/radio/src/translations/es.h.txt @@ -825,6 +825,7 @@ #define TR_VOLTAGE INDENT"Voltaje" #define TR_CURRENT INDENT"Actual" #define TR_SELECT_MODEL "Selec Modelo" +#define TR_SELECT_MODE "Select mode" #define TR_CREATE_CATEGORY "Create Category" #define TR_RENAME_CATEGORY "Rename Category" #define TR_DELETE_CATEGORY "Delete Category" diff --git a/radio/src/translations/fi.h.txt b/radio/src/translations/fi.h.txt index 996d2a6ef6..881be3b2d7 100644 --- a/radio/src/translations/fi.h.txt +++ b/radio/src/translations/fi.h.txt @@ -815,6 +815,7 @@ #define TR_VOLTAGE INDENT"Voltage" #define TR_CURRENT INDENT"Current" #define TR_SELECT_MODEL "Select Model" +#define TR_SELECT_MODE "Select mode" #define TR_CREATE_CATEGORY "Create Category" #define TR_RENAME_CATEGORY "Rename Category" #define TR_DELETE_CATEGORY "Delete Category" diff --git a/radio/src/translations/fr.h.txt b/radio/src/translations/fr.h.txt index 93de8a5afe..7e839df255 100644 --- a/radio/src/translations/fr.h.txt +++ b/radio/src/translations/fr.h.txt @@ -829,6 +829,7 @@ #define TR_VOLTAGE TR(INDENT "Tension",INDENT "Source tension") #define TR_CURRENT TR(INDENT "Courant",INDENT "Source courant") #define TR_SELECT_MODEL "Sélect. modèle" +#define TR_SELECT_MODE "Sélection mode" #define TR_CREATE_CATEGORY "Créer une catégorie" #define TR_RENAME_CATEGORY "Renommer la catégorie" #define TR_DELETE_CATEGORY "Supprimer la catégorie" diff --git a/radio/src/translations/it.h.txt b/radio/src/translations/it.h.txt index 3e9d17ebff..ce1f4d0c73 100644 --- a/radio/src/translations/it.h.txt +++ b/radio/src/translations/it.h.txt @@ -822,6 +822,7 @@ #define TR_VOLTAGE TR(INDENT "Voltagg.",INDENT "Voltaggio") #define TR_CURRENT TR(INDENT "Corrente",INDENT "Corrente") #define TR_SELECT_MODEL "Scegli Memo." +#define TR_SELECT_MODE "Seleziona modo" #define TR_CREATE_CATEGORY "Create Category" #define TR_RENAME_CATEGORY "Rename Category" #define TR_DELETE_CATEGORY "Delete Category" diff --git a/radio/src/translations/nl.h.txt b/radio/src/translations/nl.h.txt index f5eb74e69d..4767cc70c2 100644 --- a/radio/src/translations/nl.h.txt +++ b/radio/src/translations/nl.h.txt @@ -816,6 +816,7 @@ #define TR_VOLTAGE TR(INDENT "Spg", INDENT "Spanningsbron") //9XR-Pro #define TR_CURRENT TR(INDENT "Stroom", INDENT "Stroombron") #define TR_SELECT_MODEL "Kies Model" +#define TR_SELECT_MODE "Select mode" #define TR_CREATE_CATEGORY "Create Category" #define TR_RENAME_CATEGORY "Rename Category" #define TR_DELETE_CATEGORY "Delete Category" diff --git a/radio/src/translations/pl.h.txt b/radio/src/translations/pl.h.txt index ce7402593b..2711e2ff94 100644 --- a/radio/src/translations/pl.h.txt +++ b/radio/src/translations/pl.h.txt @@ -825,6 +825,7 @@ #define TR_VOLTAGE TR (INDENT"Napięcie",INDENT"Źródło Napięcia") #define TR_CURRENT TR (INDENT"Prąd",INDENT"Źródło Prądu") #define TR_SELECT_MODEL "Wybór modelu" +#define TR_SELECT_MODE "Wybierz tryb" #define TR_CREATE_CATEGORY "Create Category" #define TR_RENAME_CATEGORY "Rename Category" #define TR_DELETE_CATEGORY "Delete Category" diff --git a/radio/src/translations/pt.h.txt b/radio/src/translations/pt.h.txt index 6d57d243b7..fc8e5d0569 100644 --- a/radio/src/translations/pt.h.txt +++ b/radio/src/translations/pt.h.txt @@ -820,6 +820,7 @@ #define TR_VOLTAGE INDENT"Volts" #define TR_CURRENT INDENT"Amperes" #define TR_SELECT_MODEL "Selec. Modelo" +#define TR_SELECT_MODE "Seleção de modo" #define TR_CREATE_CATEGORY "Create Category" #define TR_RENAME_CATEGORY "Rename Category" #define TR_DELETE_CATEGORY "Delete Category" diff --git a/radio/src/translations/se.h.txt b/radio/src/translations/se.h.txt index c74a91fc50..300d6acdce 100644 --- a/radio/src/translations/se.h.txt +++ b/radio/src/translations/se.h.txt @@ -830,6 +830,7 @@ #define TR_VOLTAGE INDENT"Volt" #define TR_CURRENT INDENT"Ampere" #define TR_SELECT_MODEL "Välj Modell" +#define TR_SELECT_MODE "Välj läge" #define TR_CREATE_CATEGORY "Skapa Kategori" #define TR_RENAME_CATEGORY "Byt Kat.namn" #define TR_DELETE_CATEGORY "Ta Bort Kategori"