diff --git a/companion/src/firmwares/customfunctiondata.cpp b/companion/src/firmwares/customfunctiondata.cpp index c5f06ae5da2..c1547ab2993 100644 --- a/companion/src/firmwares/customfunctiondata.cpp +++ b/companion/src/firmwares/customfunctiondata.cpp @@ -261,7 +261,6 @@ bool CustomFunctionData::isFuncAvailable(const int index, const ModelData * mode ((index >= FuncRangeCheckInternalModule && index <= FuncBindExternalModule) && !fw->getCapability(DangerousFunctions)) || ((index >= FuncAdjustGV1 && index <= FuncAdjustGVLast) && !fw->getCapability(Gvars)) || ((index == FuncDisableTouch) && !IS_HORUS_OR_TARANIS(fw->getBoard())) || - ((index == FuncSetScreen && !Boards::getCapability(fw->getBoard(), Board::HasColorLcd))) || ((index == FuncDisableAudioAmp && !Boards::getCapability(fw->getBoard(), Board::HasAudioMuteGPIO))) || ((index == FuncRGBLed && !Boards::getCapability(fw->getBoard(), Board::HasLedStripGPIO))) || ((index == FuncLCDtoVideo && !IS_FATFISH_F16(fw->getBoard()))) || @@ -424,6 +423,19 @@ AbstractStaticItemModel * CustomFunctionData::repeatLuaItemModel() return mdl; } +// static +AbstractStaticItemModel * CustomFunctionData::repeatSetScreenItemModel() +{ + AbstractStaticItemModel * mdl = new AbstractStaticItemModel(); + mdl->setName("customfunctiondata.repeatSetScreen"); + + mdl->appendToItemList(repeatToString(-1, false), -1); + mdl->appendToItemList(repeatToString(0, false), 0); + + mdl->loadItemList(); + return mdl; +} + // static AbstractStaticItemModel * CustomFunctionData::playSoundItemModel() { diff --git a/companion/src/firmwares/customfunctiondata.h b/companion/src/firmwares/customfunctiondata.h index 0e82b3ad581..d4f824e8898 100644 --- a/companion/src/firmwares/customfunctiondata.h +++ b/companion/src/firmwares/customfunctiondata.h @@ -141,6 +141,7 @@ class CustomFunctionData { static QString gvarAdjustModeToString(const int value); static AbstractStaticItemModel * repeatItemModel(); static AbstractStaticItemModel * repeatLuaItemModel(); + static AbstractStaticItemModel * repeatSetScreenItemModel(); static AbstractStaticItemModel * playSoundItemModel(); static AbstractStaticItemModel * harpicItemModel(); static AbstractStaticItemModel * gvarAdjustModeItemModel(); diff --git a/companion/src/modeledit/customfunctions.cpp b/companion/src/modeledit/customfunctions.cpp index 633b67d0dde..1d27330ce6e 100644 --- a/companion/src/modeledit/customfunctions.cpp +++ b/companion/src/modeledit/customfunctions.cpp @@ -41,6 +41,7 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData * model, harpicId = tabModelFactory->registerItemModel(CustomFunctionData::harpicItemModel()); repeatId = tabModelFactory->registerItemModel(CustomFunctionData::repeatItemModel()); repeatLuaId = tabModelFactory->registerItemModel(CustomFunctionData::repeatLuaItemModel()); + repeatSetScreenId = tabModelFactory->registerItemModel(CustomFunctionData::repeatSetScreenItemModel()); gvarAdjustModeId = tabModelFactory->registerItemModel(CustomFunctionData::gvarAdjustModeItemModel()); tabFilterFactory = new FilteredItemModelFactory(); @@ -209,6 +210,8 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData * model, fswtchRepeat[i]->setProperty("index", i); if (functions[i].func == FuncPlayScript || functions[i].func == FuncRGBLed) fswtchRepeat[i]->setModel(tabModelFactory->getItemModel(repeatLuaId)); + else if (functions[i].func == FuncSetScreen && !Boards::getCapability(firmware->getBoard(), Board::HasColorLcd)) + fswtchRepeat[i]->setModel(tabModelFactory->getItemModel(repeatSetScreenId)); else fswtchRepeat[i]->setModel(tabModelFactory->getItemModel(repeatId)); fswtchRepeat[i]->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed); @@ -550,14 +553,24 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified) widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM; } else if (func == FuncSetScreen) { - if (modified) + if (modified) { cfn.param = (uint8_t)fswtchParam[i]->value(); + cfn.repeatParam = fswtchRepeat[i]->currentData().toInt(); + } fswtchParam[i]->setDecimals(0); - fswtchParam[i]->setMinimum(1); - if(model) - fswtchParam[i]->setMaximum(model->getCustomScreensCount()); - else - fswtchParam[i]->setMaximum(1); + if (Boards::getCapability(firmware->getBoard(), Board::HasColorLcd)) { + fswtchParam[i]->setMinimum(1); + if(model) + fswtchParam[i]->setMaximum(model->getCustomScreensCount()); + else + fswtchParam[i]->setMaximum(1); + } else { + fswtchParam[i]->setMinimum(0); + fswtchParam[i]->setMaximum(4); + widgetsMask |= CUSTOM_FUNCTION_REPEAT; + fswtchRepeat[i]->setModel(tabModelFactory->getItemModel(repeatSetScreenId)); + fswtchRepeat[i]->setCurrentIndex(fswtchRepeat[i]->findData(cfn.repeatParam)); + } fswtchParam[i]->setSingleStep(1); fswtchParam[i]->setValue(cfn.param); widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM; diff --git a/companion/src/modeledit/customfunctions.h b/companion/src/modeledit/customfunctions.h index a629a7fc143..c64ef860cf6 100644 --- a/companion/src/modeledit/customfunctions.h +++ b/companion/src/modeledit/customfunctions.h @@ -89,6 +89,7 @@ class CustomFunctionsPanel : public GenericPanel int harpicId; int repeatId; int repeatLuaId; + int repeatSetScreenId; int gvarAdjustModeId; QSet tracksSet; diff --git a/radio/src/cfn_sort.cpp b/radio/src/cfn_sort.cpp index 15ff8b874af..70f0ee9f697 100644 --- a/radio/src/cfn_sort.cpp +++ b/radio/src/cfn_sort.cpp @@ -68,6 +68,9 @@ Functions cfn_sorted[] = { /* Push CS */ FUNC_PUSH_CUST_SWITCH, #endif /* RGB LED 灯 */ FUNC_RGB_LED, +#if !defined(COLORLCD) + /* Set Screen */ FUNC_SET_SCREEN, +#endif /* Vario传感器 */ FUNC_VARIO, #elif defined(TRANSLATIONS_CZ) #if defined(COLORLCD) @@ -100,6 +103,9 @@ Functions cfn_sorted[] = { #endif /* Reset */ FUNC_RESET, /* RGB světlo */ FUNC_RGB_LED, +#if !defined(COLORLCD) + /* Set Screen */ FUNC_SET_SCREEN, +#endif /* Snímek LCD */ FUNC_SCREENSHOT, #if defined(DEBUG) /* Test */ FUNC_TEST, @@ -141,6 +147,9 @@ Functions cfn_sorted[] = { /* RGB led */ FUNC_RGB_LED, /* Ræs tilstand */ FUNC_RACING_MODE, /* SD Log */ FUNC_LOGS, +#if !defined(COLORLCD) + /* Set Screen */ FUNC_SET_SCREEN, +#endif #if defined(OLED_SCREEN) /* Skarphed */ FUNC_BACKLIGHT, #endif @@ -194,6 +203,9 @@ Functions cfn_sorted[] = { /* SetFailsafe */ FUNC_SET_FAILSAFE, #if defined(COLORLCD) /* Set Main Screen */ FUNC_SET_SCREEN, +#endif +#if !defined(COLORLCD) + /* Set Screen */ FUNC_SET_SCREEN, #endif /* Setze */ FUNC_SET_TIMER, /* Spiel Töne */ FUNC_PLAY_SOUND, @@ -244,6 +256,9 @@ Functions cfn_sorted[] = { #if defined(COLORLCD) /* Set Main Screen */ FUNC_SET_SCREEN, #endif +#if !defined(COLORLCD) + /* Set Screen */ FUNC_SET_SCREEN, +#endif #if defined(DEBUG) /* Test */ FUNC_TEST, #endif @@ -288,6 +303,9 @@ Functions cfn_sorted[] = { #if defined(COLORLCD) /* Set Main Screen */ FUNC_SET_SCREEN, #endif +#if !defined(COLORLCD) + /* Set Screen */ FUNC_SET_SCREEN, +#endif #if defined(DEBUG) /* Test */ FUNC_TEST, #endif @@ -332,6 +350,9 @@ Functions cfn_sorted[] = { #endif /* RGB leds */ FUNC_RGB_LED, /* Script Lua */ FUNC_PLAY_SCRIPT, +#if !defined(COLORLCD) + /* Set Screen */ FUNC_SET_SCREEN, +#endif #if defined(DEBUG) /* Test */ FUNC_TEST, #endif @@ -367,6 +388,9 @@ Functions cfn_sorted[] = { /* SD Logs */ FUNC_LOGS, /* Set */ FUNC_SET_TIMER, /* SetFailsafe */ FUNC_SET_FAILSAFE, +#if !defined(COLORLCD) + /* Set Screen */ FUNC_SET_SCREEN, +#endif #if defined(DEBUG) /* Test */ FUNC_TEST, #endif @@ -418,6 +442,9 @@ Functions cfn_sorted[] = { /* Script Lua */ FUNC_PLAY_SCRIPT, /* Set */ FUNC_SET_TIMER, /* SetFailsafe */ FUNC_SET_FAILSAFE, +#if !defined(COLORLCD) + /* Set Screen */ FUNC_SET_SCREEN, +#endif #if defined(COLORLCD) /* Setta Schermo Princ. */ FUNC_SET_SCREEN, #endif @@ -444,6 +471,9 @@ Functions cfn_sorted[] = { #endif /* RGB LED */ FUNC_RGB_LED, /* SDログ出力 */ FUNC_LOGS, +#if !defined(COLORLCD) + /* Set Screen */ FUNC_SET_SCREEN, +#endif /* オーディオアンプ OFF */ FUNC_DISABLE_AUDIO_AMP, /* サウンド再生 */ FUNC_PLAY_SOUND, /* ダイヤル */ FUNC_VOLUME, @@ -512,6 +542,9 @@ Functions cfn_sorted[] = { #if defined(COLORLCD) /* Set Main Screen */ FUNC_SET_SCREEN, #endif +#if !defined(COLORLCD) + /* Set Screen */ FUNC_SET_SCREEN, +#endif #if defined(DEBUG) /* Test */ FUNC_TEST, #endif @@ -551,6 +584,9 @@ Functions cfn_sorted[] = { /* RGB ledy */ FUNC_RGB_LED, #if defined(COLORLCD) /* Set Main Screen */ FUNC_SET_SCREEN, +#endif +#if !defined(COLORLCD) + /* Set Screen */ FUNC_SET_SCREEN, #endif /* SetFailsafe */ FUNC_SET_FAILSAFE, /* SkryptyLua */ FUNC_PLAY_SCRIPT, @@ -598,6 +634,9 @@ Functions cfn_sorted[] = { /* Rep Valor */ FUNC_PLAY_VALUE, /* Reset */ FUNC_RESET, /* Script Lua */ FUNC_PLAY_SCRIPT, +#if !defined(COLORLCD) + /* Set Screen */ FUNC_SET_SCREEN, +#endif /* Sobrescrv */ FUNC_OVERRIDE_CHANNEL, #if defined(DEBUG) /* Test */ FUNC_TEST, @@ -621,6 +660,9 @@ Functions cfn_sorted[] = { #endif /* RGB подсветка */ FUNC_RGB_LED, /* SD логи */ FUNC_LOGS, +#if !defined(COLORLCD) + /* Set Screen */ FUNC_SET_SCREEN, +#endif /* Авар управ */ FUNC_SET_FAILSAFE, /* Варио */ FUNC_VARIO, /* Вибро */ FUNC_HAPTIC, @@ -679,6 +721,9 @@ Functions cfn_sorted[] = { /* Pausa Musik */ FUNC_BACKGND_MUSIC_PAUSE, /* Range check */ FUNC_RANGECHECK, /* RGB ledljus */ FUNC_RGB_LED, +#if !defined(COLORLCD) + /* Set Screen */ FUNC_SET_SCREEN, +#endif /* Skärmbild */ FUNC_SCREENSHOT, /* Spara trimmar */ FUNC_INSTANT_TRIM, /* Spela ljud */ FUNC_PLAY_SOUND, @@ -705,6 +750,9 @@ Functions cfn_sorted[] = { /* Push CS */ FUNC_PUSH_CUST_SWITCH, #endif /* RGB led燈 */ FUNC_RGB_LED, +#if !defined(COLORLCD) + /* Set Screen */ FUNC_SET_SCREEN, +#endif /* Vario傳感器 */ FUNC_VARIO, #if defined(OLED_SCREEN) /* 亮度 */ FUNC_BACKLIGHT, @@ -789,6 +837,9 @@ Functions cfn_sorted[] = { #endif /* RGB leds */ FUNC_RGB_LED, /* SD лог */ FUNC_LOGS, +#if !defined(COLORLCD) + /* Set Screen */ FUNC_SET_SCREEN, +#endif #else /* Adjust */ FUNC_ADJUST_GVAR, /* Audio Amp Off */ FUNC_DISABLE_AUDIO_AMP, @@ -828,6 +879,9 @@ Functions cfn_sorted[] = { #if defined(COLORLCD) /* Set Main Screen */ FUNC_SET_SCREEN, #endif +#if !defined(COLORLCD) + /* Set Screen */ FUNC_SET_SCREEN, +#endif #if defined(DEBUG) /* Test */ FUNC_TEST, #endif diff --git a/radio/src/dataconstants.h b/radio/src/dataconstants.h index bd878d2d3d6..20057eeb9d7 100644 --- a/radio/src/dataconstants.h +++ b/radio/src/dataconstants.h @@ -681,8 +681,8 @@ enum Functions { FUNC_RACING_MODE, #if defined(COLORLCD) || defined(CFN_ONLY) FUNC_DISABLE_TOUCH, - FUNC_SET_SCREEN, #endif + FUNC_SET_SCREEN, FUNC_DISABLE_AUDIO_AMP, FUNC_RGB_LED, #if defined(VIDEO_SWITCH) || defined(CFN_ONLY) diff --git a/radio/src/edgetx.h b/radio/src/edgetx.h index 41e99b10206..6e992ad1251 100644 --- a/radio/src/edgetx.h +++ b/radio/src/edgetx.h @@ -845,7 +845,7 @@ enum TelemetryViews { TELEMETRY_VIEW_MAX = TELEMETRY_CUSTOM_SCREEN_4 }; -extern uint8_t s_frsky_view; +extern uint8_t selectedTelemView; constexpr uint32_t EARTH_RADIUS = 6371009; diff --git a/radio/src/functions.cpp b/radio/src/functions.cpp index 8d9021fc50e..93e7572db8c 100644 --- a/radio/src/functions.cpp +++ b/radio/src/functions.cpp @@ -428,16 +428,19 @@ void evalFunctions(CustomFunctionData * functions, CustomFunctionsContext & func newActiveFunctions |= (1u << FUNCTION_DISABLE_AUDIO_AMP); break; #endif -#if defined(COLORLCD) case FUNC_SET_SCREEN: if (isRepeatDelayElapsed(functions, functionsContext, i)) { TRACE("SET VIEW %d", (CFN_PARAM(cfn))); +#if defined(COLORLCD) int8_t screenNumber = max(0, CFN_PARAM(cfn) - 1); setRequestedMainView(screenNumber); mainRequestFlags |= (1u << REQUEST_MAIN_VIEW); +#else + extern void showTelemScreen(uint8_t index); + showTelemScreen(CFN_PARAM(cfn)); +#endif } break; -#endif #if defined(VIDEO_SWITCH) case FUNC_LCD_TO_VIDEO: switchToVideo(); @@ -559,9 +562,9 @@ const char* funcGetLabel(uint8_t func) #if defined(COLORLCD) case FUNC_DISABLE_TOUCH: return STR_SF_DISABLE_TOUCH; +#endif case FUNC_SET_SCREEN: return STR_SF_SET_SCREEN; -#endif #if defined(AUDIO_MUTE_GPIO) case FUNC_DISABLE_AUDIO_AMP: return STR_SF_DISABLE_AUDIO_AMP; diff --git a/radio/src/gui/128x64/model_special_functions.cpp b/radio/src/gui/128x64/model_special_functions.cpp index bd9e93f8656..107402d0608 100644 --- a/radio/src/gui/128x64/model_special_functions.cpp +++ b/radio/src/gui/128x64/model_special_functions.cpp @@ -326,6 +326,11 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF lcdDrawTextAtIndex(MODEL_SPECIAL_FUNC_3RD_COLUMN, y, STR_FUNCSOUNDS, val_displayed, attr); } #endif + else if (func == FUNC_SET_SCREEN) { + val_min = 0; + val_max = 4; + lcdDrawNumber(MODEL_SPECIAL_FUNC_3RD_COLUMN + 3*FW, y, val_displayed, attr|LEFT); + } #if defined(HAPTIC) else if (func == FUNC_HAPTIC) { val_max = 3; @@ -496,7 +501,11 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF else { lcdDrawNumber(MODEL_SPECIAL_FUNC_4TH_COLUMN+2+FW, y, CFN_PLAY_REPEAT(cfn)*CFN_PLAY_REPEAT_MUL, RIGHT | attr); } - if (active) CFN_PLAY_REPEAT(cfn) = checkIncDec(event, CFN_PLAY_REPEAT(cfn)==CFN_PLAY_REPEAT_NOSTART?-1:CFN_PLAY_REPEAT(cfn), -1, 60/CFN_PLAY_REPEAT_MUL, eeFlags); + if (active) + CFN_PLAY_REPEAT(cfn) = checkIncDec(event, CFN_PLAY_REPEAT(cfn)==CFN_PLAY_REPEAT_NOSTART?-1:CFN_PLAY_REPEAT(cfn), + -1, + (func == FUNC_SET_SCREEN ? 0 : 60/CFN_PLAY_REPEAT_MUL), + eeFlags); } } else if (attr) { diff --git a/radio/src/gui/128x64/view_telemetry.cpp b/radio/src/gui/128x64/view_telemetry.cpp index 250a9be2edc..1fd982b7bc5 100644 --- a/radio/src/gui/128x64/view_telemetry.cpp +++ b/radio/src/gui/128x64/view_telemetry.cpp @@ -23,7 +23,7 @@ #define STATUS_BAR_Y (7*FH+1) -uint8_t s_frsky_view = 0; +uint8_t selectedTelemView = 0; #define BAR_LEFT 25 #define BAR_WIDTH 100 @@ -163,7 +163,7 @@ bool displayCustomTelemetryScreen(uint8_t index) { TelemetryScreenData & screen = g_model.screens[index]; - if (IS_BARS_SCREEN(s_frsky_view)) { + if (IS_BARS_SCREEN(selectedTelemView)) { return displayGaugesTelemetryScreen(screen); } @@ -175,19 +175,19 @@ bool displayCustomTelemetryScreen(uint8_t index) bool displayTelemetryScreen() { #if defined(LUA) - if (TELEMETRY_SCREEN_TYPE(s_frsky_view) == TELEMETRY_SCREEN_TYPE_SCRIPT) { + if (TELEMETRY_SCREEN_TYPE(selectedTelemView) == TELEMETRY_SCREEN_TYPE_SCRIPT) { return isTelemetryScriptAvailable(); // contents will be drawn by Lua Task } #endif - if (TELEMETRY_SCREEN_TYPE(s_frsky_view) == TELEMETRY_SCREEN_TYPE_NONE) { + if (TELEMETRY_SCREEN_TYPE(selectedTelemView) == TELEMETRY_SCREEN_TYPE_NONE) { return false; } drawTelemetryTopBar(); - if (s_frsky_view < MAX_TELEMETRY_SCREENS) { - return displayCustomTelemetryScreen(s_frsky_view); + if (selectedTelemView < MAX_TELEMETRY_SCREENS) { + return displayCustomTelemetryScreen(selectedTelemView); } return true; diff --git a/radio/src/gui/212x64/model_special_functions.cpp b/radio/src/gui/212x64/model_special_functions.cpp index 6291cd49cb5..792689fe666 100644 --- a/radio/src/gui/212x64/model_special_functions.cpp +++ b/radio/src/gui/212x64/model_special_functions.cpp @@ -307,6 +307,11 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF val_max = AU_SPECIAL_SOUND_LAST-AU_SPECIAL_SOUND_FIRST-1; lcdDrawTextAtIndex(MODEL_SPECIAL_FUNC_3RD_COLUMN, y, STR_FUNCSOUNDS, val_displayed, attr); } + else if (func == FUNC_SET_SCREEN) { + val_min = 0; + val_max = 4; + lcdDrawNumber(MODEL_SPECIAL_FUNC_3RD_COLUMN + 3*FW, y, val_displayed, attr|LEFT); + } #if defined(HAPTIC) else if (func == FUNC_HAPTIC) { val_max = 3; @@ -447,7 +452,11 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF lcdDrawNumber(MODEL_SPECIAL_FUNC_4TH_COLUMN+2+FW, y, CFN_PLAY_REPEAT(cfn)*CFN_PLAY_REPEAT_MUL, attr|RIGHT); lcdDrawChar(MODEL_SPECIAL_FUNC_4TH_COLUMN+2+FW, y, 's', attr); } - if (active) CFN_PLAY_REPEAT(cfn) = checkIncDec(event, CFN_PLAY_REPEAT(cfn)==CFN_PLAY_REPEAT_NOSTART?-1:CFN_PLAY_REPEAT(cfn), -1, 60/CFN_PLAY_REPEAT_MUL, eeFlags); + if (active) + CFN_PLAY_REPEAT(cfn) = checkIncDec(event, CFN_PLAY_REPEAT(cfn)==CFN_PLAY_REPEAT_NOSTART?-1:CFN_PLAY_REPEAT(cfn), + -1, + (func == FUNC_SET_SCREEN ? 0 : 60/CFN_PLAY_REPEAT_MUL), + eeFlags); } } else if (attr) { diff --git a/radio/src/gui/212x64/view_telemetry.cpp b/radio/src/gui/212x64/view_telemetry.cpp index 7c1bb728df5..6bc79c7e890 100644 --- a/radio/src/gui/212x64/view_telemetry.cpp +++ b/radio/src/gui/212x64/view_telemetry.cpp @@ -23,7 +23,7 @@ #define STATUS_BAR_Y (7*FH+1) -uint8_t s_frsky_view = 0; +uint8_t selectedTelemView = 0; #define BAR_LEFT 30 #define BAR_WIDTH 152 @@ -167,7 +167,7 @@ void displayCustomTelemetryScreen(uint8_t index) { TelemetryScreenData & screen = g_model.screens[index]; - if (IS_BARS_SCREEN(s_frsky_view)) { + if (IS_BARS_SCREEN(selectedTelemView)) { return displayGaugesTelemetryScreen(screen); } @@ -177,19 +177,19 @@ void displayCustomTelemetryScreen(uint8_t index) bool displayTelemetryScreen() { #if defined(LUA) - if (TELEMETRY_SCREEN_TYPE(s_frsky_view) == TELEMETRY_SCREEN_TYPE_SCRIPT) { + if (TELEMETRY_SCREEN_TYPE(selectedTelemView) == TELEMETRY_SCREEN_TYPE_SCRIPT) { return isTelemetryScriptAvailable(); // contents will be drawn by Lua Task } #endif - if (TELEMETRY_SCREEN_TYPE(s_frsky_view) == TELEMETRY_SCREEN_TYPE_NONE) { + if (TELEMETRY_SCREEN_TYPE(selectedTelemView) == TELEMETRY_SCREEN_TYPE_NONE) { return false; } drawTelemetryTopBar(); - if (s_frsky_view < MAX_TELEMETRY_SCREENS) { - displayCustomTelemetryScreen(s_frsky_view); + if (selectedTelemView < MAX_TELEMETRY_SCREENS) { + displayCustomTelemetryScreen(selectedTelemView); } return true; diff --git a/radio/src/gui/common/stdlcd/view_telemetry.cpp b/radio/src/gui/common/stdlcd/view_telemetry.cpp index 7cdeb44b026..45abc5ff83f 100644 --- a/radio/src/gui/common/stdlcd/view_telemetry.cpp +++ b/radio/src/gui/common/stdlcd/view_telemetry.cpp @@ -53,7 +53,7 @@ void menuViewTelemetry(event_t event) { enum NavigationDirection direction = NAVIGATION_DIRECTION_NONE; - if (event == EVT_KEY_BREAK(KEY_EXIT) && TELEMETRY_SCREEN_TYPE(s_frsky_view) != TELEMETRY_SCREEN_TYPE_SCRIPT) { + if (event == EVT_KEY_BREAK(KEY_EXIT) && TELEMETRY_SCREEN_TYPE(selectedTelemView) != TELEMETRY_SCREEN_TYPE_SCRIPT) { chainMenu(menuMainView); } #if defined(LUA) @@ -75,12 +75,12 @@ void menuViewTelemetry(event_t event) for (int i=0; i<=TELEMETRY_SCREEN_TYPE_MAX; i++) { if (direction == NAVIGATION_DIRECTION_UP) { - if (s_frsky_view-- == 0) - s_frsky_view = TELEMETRY_VIEW_MAX; + if (selectedTelemView-- == 0) + selectedTelemView = TELEMETRY_VIEW_MAX; } else if (direction == NAVIGATION_DIRECTION_DOWN) { - if (s_frsky_view++ == TELEMETRY_VIEW_MAX) - s_frsky_view = 0; + if (selectedTelemView++ == TELEMETRY_VIEW_MAX) + selectedTelemView = 0; } else { direction = NAVIGATION_DIRECTION_DOWN; @@ -95,5 +95,20 @@ void menuViewTelemetry(event_t event) displayRssiLine(); } +void showTelemScreen(uint8_t index) +{ + if (menuHandlers[menuLevel] == menuViewTelemetry || menuHandlers[menuLevel] == menuMainView) { + if (index == 0) { + chainMenu(menuMainView); + } else { + index -= 1; + if ((index >= 0 && index <= TELEMETRY_SCREEN_TYPE_MAX) && (TELEMETRY_SCREEN_TYPE(index) != TELEMETRY_SCREEN_TYPE_NONE)) { + selectedTelemView = index; + chainMenu(menuViewTelemetry); + } + } + } +} + #undef EVT_KEY_PREVIOUS_VIEW #undef EVT_KEY_NEXT_VIEW diff --git a/radio/src/lua/api_general.cpp b/radio/src/lua/api_general.cpp index 86cb4ad4ce1..54d722d2a1d 100644 --- a/radio/src/lua/api_general.cpp +++ b/radio/src/lua/api_general.cpp @@ -3102,9 +3102,9 @@ LROT_BEGIN(etxcst, NULL, 0) #if defined(FUNCTION_SWITCHES) LROT_NUMENTRY( FUNC_PUSH_CUST_SWITCH, FUNC_PUSH_CUST_SWITCH ) #endif + LROT_NUMENTRY( FUNC_SET_SCREEN, FUNC_SET_SCREEN ) #if defined(COLORLCD) LROT_NUMENTRY( FUNC_DISABLE_TOUCH, FUNC_DISABLE_TOUCH ) - LROT_NUMENTRY( FUNC_SET_SCREEN, FUNC_SET_SCREEN ) LROT_NUMENTRY( SHADOWED, SHADOWED ) // ZoneType::Integer == INPUT_TYPE_VALUE - use VALUE in widget options diff --git a/radio/src/lua/interface.cpp b/radio/src/lua/interface.cpp index 61034e79242..aa6989b67df 100644 --- a/radio/src/lua/interface.cpp +++ b/radio/src/lua/interface.cpp @@ -695,7 +695,7 @@ bool isTelemetryScriptAvailable() #if defined(PCBTARANIS) for (int i = 0; i < luaScriptsCount; i++) { ScriptInternalData & sid = scriptInternalData[i]; - if (sid.reference == SCRIPT_TELEMETRY_FIRST + s_frsky_view) { + if (sid.reference == SCRIPT_TELEMETRY_FIRST + selectedTelemView) { return true; } } @@ -1040,7 +1040,7 @@ static bool resumeLua(bool init, bool allowLcdUsage) if (allowLcdUsage) { #if defined(PCBTARANIS) if ((menuHandlers[menuLevel] == menuViewTelemetry && - ref == SCRIPT_TELEMETRY_FIRST + s_frsky_view) || + ref == SCRIPT_TELEMETRY_FIRST + selectedTelemView) || ref == SCRIPT_STANDALONE) { #else if (ref == SCRIPT_STANDALONE) { diff --git a/radio/src/main.cpp b/radio/src/main.cpp index 4d3a76f281b..e84762c4282 100644 --- a/radio/src/main.cpp +++ b/radio/src/main.cpp @@ -407,7 +407,7 @@ bool handleGui(event_t event) #if defined(LUA) bool isTelemView = menuHandlers[menuLevel] == menuViewTelemetry && - TELEMETRY_SCREEN_TYPE(s_frsky_view) == TELEMETRY_SCREEN_TYPE_SCRIPT; + TELEMETRY_SCREEN_TYPE(selectedTelemView) == TELEMETRY_SCREEN_TYPE_SCRIPT; bool isStandalone = scriptInternalData[0].reference == SCRIPT_STANDALONE; if ((isTelemView || isStandalone) && event) { luaPushEvent(event); diff --git a/radio/src/myeeprom.h b/radio/src/myeeprom.h index bfbbc56c9c2..3100f48136d 100644 --- a/radio/src/myeeprom.h +++ b/radio/src/myeeprom.h @@ -47,11 +47,7 @@ #define IS_HAPTIC_FUNC(func) (0) #endif -#if defined(COLORLCD) #define HAS_REPEAT_PARAM(func) (IS_PLAY_FUNC(func) || IS_HAPTIC_FUNC(func) || func == FUNC_PLAY_SCRIPT || func == FUNC_SET_SCREEN) -#else -#define HAS_REPEAT_PARAM(func) (IS_PLAY_FUNC(func) || IS_HAPTIC_FUNC(func) || func == FUNC_PLAY_SCRIPT) -#endif #define CFN_EMPTY(p) (!(p)->swtch) #define CFN_SWITCH(p) ((p)->swtch) diff --git a/radio/src/storage/yaml/yaml_datastructs_128x64.cpp b/radio/src/storage/yaml/yaml_datastructs_128x64.cpp index 8d34d3473ea..f98c7c6617f 100644 --- a/radio/src/storage/yaml/yaml_datastructs_128x64.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_128x64.cpp @@ -82,6 +82,7 @@ const struct YamlIdStr enum_Functions[] = { { FUNC_BACKLIGHT, "BACKLIGHT" }, { FUNC_SCREENSHOT, "SCREENSHOT" }, { FUNC_RACING_MODE, "RACING_MODE" }, + { FUNC_SET_SCREEN, "SET_SCREEN" }, { FUNC_DISABLE_AUDIO_AMP, "DISABLE_AUDIO_AMP" }, { FUNC_RGB_LED, "RGB_LED" }, { FUNC_TEST, "TEST" }, diff --git a/radio/src/storage/yaml/yaml_datastructs_funcs.cpp b/radio/src/storage/yaml/yaml_datastructs_funcs.cpp index 29dfa8cd87b..6e62f7d6f40 100644 --- a/radio/src/storage/yaml/yaml_datastructs_funcs.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_funcs.cpp @@ -1619,9 +1619,7 @@ static void r_customFn(void* user, uint8_t* data, uint32_t bitoffs, } break; -#if defined(COLORLCD) case FUNC_SET_SCREEN: -#endif case FUNC_HAPTIC: case FUNC_LOGS: // 10th of seconds CFN_PARAM(cfn) = yaml_str2uint(val, l_sep); @@ -1837,9 +1835,7 @@ static bool w_customFn(void* user, uint8_t* data, uint32_t bitoffs, break; #endif -#if defined(COLORLCD) case FUNC_SET_SCREEN: -#endif case FUNC_HAPTIC: case FUNC_LOGS: // 10th of seconds str = yaml_unsigned2str(CFN_PARAM(cfn)); diff --git a/radio/src/storage/yaml/yaml_datastructs_t20.cpp b/radio/src/storage/yaml/yaml_datastructs_t20.cpp index 230e73593fa..faf052cf19b 100644 --- a/radio/src/storage/yaml/yaml_datastructs_t20.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_t20.cpp @@ -82,6 +82,7 @@ const struct YamlIdStr enum_Functions[] = { { FUNC_BACKLIGHT, "BACKLIGHT" }, { FUNC_SCREENSHOT, "SCREENSHOT" }, { FUNC_RACING_MODE, "RACING_MODE" }, + { FUNC_SET_SCREEN, "SET_SCREEN" }, { FUNC_DISABLE_AUDIO_AMP, "DISABLE_AUDIO_AMP" }, { FUNC_RGB_LED, "RGB_LED" }, { FUNC_PUSH_CUST_SWITCH, "PUSH_CUST_SWITCH" }, diff --git a/radio/src/storage/yaml/yaml_datastructs_tpro.cpp b/radio/src/storage/yaml/yaml_datastructs_tpro.cpp index d32438343bc..97eedc1dcda 100644 --- a/radio/src/storage/yaml/yaml_datastructs_tpro.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_tpro.cpp @@ -82,6 +82,7 @@ const struct YamlIdStr enum_Functions[] = { { FUNC_BACKLIGHT, "BACKLIGHT" }, { FUNC_SCREENSHOT, "SCREENSHOT" }, { FUNC_RACING_MODE, "RACING_MODE" }, + { FUNC_SET_SCREEN, "SET_SCREEN" }, { FUNC_DISABLE_AUDIO_AMP, "DISABLE_AUDIO_AMP" }, { FUNC_RGB_LED, "RGB_LED" }, { FUNC_PUSH_CUST_SWITCH, "PUSH_CUST_SWITCH" }, diff --git a/radio/src/storage/yaml/yaml_datastructs_x9d.cpp b/radio/src/storage/yaml/yaml_datastructs_x9d.cpp index 67638db7323..36af8afae04 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x9d.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x9d.cpp @@ -82,6 +82,7 @@ const struct YamlIdStr enum_Functions[] = { { FUNC_BACKLIGHT, "BACKLIGHT" }, { FUNC_SCREENSHOT, "SCREENSHOT" }, { FUNC_RACING_MODE, "RACING_MODE" }, + { FUNC_SET_SCREEN, "SET_SCREEN" }, { FUNC_DISABLE_AUDIO_AMP, "DISABLE_AUDIO_AMP" }, { FUNC_RGB_LED, "RGB_LED" }, { FUNC_TEST, "TEST" }, diff --git a/radio/src/storage/yaml/yaml_datastructs_x9dp2019.cpp b/radio/src/storage/yaml/yaml_datastructs_x9dp2019.cpp index d2bd2e82f62..9cc689ff730 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x9dp2019.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x9dp2019.cpp @@ -82,6 +82,7 @@ const struct YamlIdStr enum_Functions[] = { { FUNC_BACKLIGHT, "BACKLIGHT" }, { FUNC_SCREENSHOT, "SCREENSHOT" }, { FUNC_RACING_MODE, "RACING_MODE" }, + { FUNC_SET_SCREEN, "SET_SCREEN" }, { FUNC_DISABLE_AUDIO_AMP, "DISABLE_AUDIO_AMP" }, { FUNC_RGB_LED, "RGB_LED" }, { FUNC_TEST, "TEST" }, diff --git a/radio/src/storage/yaml/yaml_datastructs_x9e.cpp b/radio/src/storage/yaml/yaml_datastructs_x9e.cpp index 063da85b96d..ee42c348763 100644 --- a/radio/src/storage/yaml/yaml_datastructs_x9e.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_x9e.cpp @@ -82,6 +82,7 @@ const struct YamlIdStr enum_Functions[] = { { FUNC_BACKLIGHT, "BACKLIGHT" }, { FUNC_SCREENSHOT, "SCREENSHOT" }, { FUNC_RACING_MODE, "RACING_MODE" }, + { FUNC_SET_SCREEN, "SET_SCREEN" }, { FUNC_DISABLE_AUDIO_AMP, "DISABLE_AUDIO_AMP" }, { FUNC_RGB_LED, "RGB_LED" }, { FUNC_TEST, "TEST" }, diff --git a/radio/src/storage/yaml/yaml_datastructs_xlite.cpp b/radio/src/storage/yaml/yaml_datastructs_xlite.cpp index 75246713b59..6a0d2eb13ba 100644 --- a/radio/src/storage/yaml/yaml_datastructs_xlite.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_xlite.cpp @@ -82,6 +82,7 @@ const struct YamlIdStr enum_Functions[] = { { FUNC_BACKLIGHT, "BACKLIGHT" }, { FUNC_SCREENSHOT, "SCREENSHOT" }, { FUNC_RACING_MODE, "RACING_MODE" }, + { FUNC_SET_SCREEN, "SET_SCREEN" }, { FUNC_DISABLE_AUDIO_AMP, "DISABLE_AUDIO_AMP" }, { FUNC_RGB_LED, "RGB_LED" }, { FUNC_TEST, "TEST" }, diff --git a/radio/src/storage/yaml/yaml_datastructs_xlites.cpp b/radio/src/storage/yaml/yaml_datastructs_xlites.cpp index 6a11763a520..03516dab30a 100644 --- a/radio/src/storage/yaml/yaml_datastructs_xlites.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_xlites.cpp @@ -82,6 +82,7 @@ const struct YamlIdStr enum_Functions[] = { { FUNC_BACKLIGHT, "BACKLIGHT" }, { FUNC_SCREENSHOT, "SCREENSHOT" }, { FUNC_RACING_MODE, "RACING_MODE" }, + { FUNC_SET_SCREEN, "SET_SCREEN" }, { FUNC_DISABLE_AUDIO_AMP, "DISABLE_AUDIO_AMP" }, { FUNC_RGB_LED, "RGB_LED" }, { FUNC_TEST, "TEST" }, diff --git a/radio/src/translations.cpp b/radio/src/translations.cpp index 0f98cea54a4..c398a53a6b3 100644 --- a/radio/src/translations.cpp +++ b/radio/src/translations.cpp @@ -200,7 +200,11 @@ const char STR_SF_RGBLEDS[] = TR_SF_RGBLEDS; const char STR_SF_VOLUME[] = TR_SF_VOLUME; const char STR_SF_RACING_MODE[] = TR_SF_RACING_MODE; const char STR_SF_SAFETY[] = TR_SF_SAFETY; +#if defined(COLORLCD) const char STR_SF_SET_SCREEN[] = TR_SF_SET_SCREEN; +#else +const char STR_SF_SET_SCREEN[] = TR_SF_SET_TELEMSCREEN; +#endif const char STR_SF_SCREENSHOT[] = TR_SF_SCREENSHOT; const char STR_SF_LCD_TO_VIDEO[] = TR_SF_LCD_TO_VIDEO; const char STR_SF_TEST[] = TR_SF_TEST; diff --git a/radio/src/translations/cn.h b/radio/src/translations/cn.h index 624366daaf4..8b843f5aefa 100644 --- a/radio/src/translations/cn.h +++ b/radio/src/translations/cn.h @@ -110,6 +110,7 @@ #define TR_SF_DISABLE_TOUCH "禁用触摸" #define TR_SF_DISABLE_AUDIO_AMP "关闭音频功放" #define TR_SF_SET_SCREEN "选择主屏" +#define TR_SF_SET_TELEMSCREEN "设置主屏" #define TR_SF_PUSH_CUST_SWITCH "Push CS" #define TR_SF_LCD_TO_VIDEO "屏幕显示图传" diff --git a/radio/src/translations/cz.h b/radio/src/translations/cz.h index e08b963a011..7556a685685 100644 --- a/radio/src/translations/cz.h +++ b/radio/src/translations/cz.h @@ -121,6 +121,7 @@ #define TR_SF_DISABLE_TOUCH "Deaktivace dotyku" #define TR_SF_DISABLE_AUDIO_AMP "Vypnutí zesilovače zvuku" #define TR_SF_SET_SCREEN "Vybrat hlavní obrazovku" +#define TR_SF_SET_TELEMSCREEN "Nast obrazovku" #define TR_SF_PUSH_CUST_SWITCH "Push CS" #define TR_SF_LCD_TO_VIDEO "LCD to Video" diff --git a/radio/src/translations/da.h b/radio/src/translations/da.h index 452e6d4761f..387b8a28d66 100644 --- a/radio/src/translations/da.h +++ b/radio/src/translations/da.h @@ -121,6 +121,7 @@ #define TR_SF_DISABLE_TOUCH "Ikke berøringsaktiv" #define TR_SF_DISABLE_AUDIO_AMP TR("Sluk audio amp", "Sluk audio amplifier") #define TR_SF_SET_SCREEN "Vælg hoved skærm" +#define TR_SF_SET_TELEMSCREEN "Vis skærm" #define TR_SF_PUSH_CUST_SWITCH "Push CS" #define TR_SF_LCD_TO_VIDEO "LCD to Video" diff --git a/radio/src/translations/de.h b/radio/src/translations/de.h index 29c6d5b1154..e87ca8b776b 100644 --- a/radio/src/translations/de.h +++ b/radio/src/translations/de.h @@ -118,6 +118,7 @@ #define TR_SF_DISABLE_TOUCH "Kein Touch" #define TR_SF_DISABLE_AUDIO_AMP "Audio Verst. Aus" #define TR_SF_SET_SCREEN "Set Main Screen" +#define TR_SF_SET_TELEMSCREEN "TelSeite anz" #define TR_SF_PUSH_CUST_SWITCH "Push CS" #define TR_SF_LCD_TO_VIDEO "LCD to Video" diff --git a/radio/src/translations/en.h b/radio/src/translations/en.h index fb433d3c670..629fb8aa632 100644 --- a/radio/src/translations/en.h +++ b/radio/src/translations/en.h @@ -119,6 +119,7 @@ #define TR_SF_DISABLE_TOUCH "No Touch" #define TR_SF_DISABLE_AUDIO_AMP "Audio Amp Off" #define TR_SF_SET_SCREEN "Set Main Screen" +#define TR_SF_SET_TELEMSCREEN "Set Screen" #define TR_SF_PUSH_CUST_SWITCH "Push CS" #define TR_SF_LCD_TO_VIDEO "LCD to Video" diff --git a/radio/src/translations/es.h b/radio/src/translations/es.h index df8534f99c0..e2f50c06478 100644 --- a/radio/src/translations/es.h +++ b/radio/src/translations/es.h @@ -116,6 +116,7 @@ #define TR_SF_DISABLE_TOUCH "No Touch" #define TR_SF_DISABLE_AUDIO_AMP "Audio Amp Off" #define TR_SF_SET_SCREEN "Set Main Screen" +#define TR_SF_SET_TELEMSCREEN "Set Screen" #define TR_SF_PUSH_CUST_SWITCH "Push CS" #define TR_SF_LCD_TO_VIDEO "LCD to Video" diff --git a/radio/src/translations/fi.h b/radio/src/translations/fi.h index beedb65175d..7b66ba3e895 100644 --- a/radio/src/translations/fi.h +++ b/radio/src/translations/fi.h @@ -119,6 +119,7 @@ #define TR_SF_DISABLE_TOUCH "No Touch" #define TR_SF_DISABLE_AUDIO_AMP "Audio Amp Off" #define TR_SF_SET_SCREEN "Set Main Screen" +#define TR_SF_SET_TELEMSCREEN "Set Screen" #define TR_SF_PUSH_CUST_SWITCH "Push CS" #define TR_SF_LCD_TO_VIDEO "LCD to Video" diff --git a/radio/src/translations/fr.h b/radio/src/translations/fr.h index 4bff6622015..288b88bcdb5 100644 --- a/radio/src/translations/fr.h +++ b/radio/src/translations/fr.h @@ -118,6 +118,7 @@ #define TR_SF_DISABLE_TOUCH "Non Tactile" #define TR_SF_DISABLE_AUDIO_AMP "Désact. Ampli Audio" #define TR_SF_SET_SCREEN "Définir Écran Princ." +#define TR_SF_SET_TELEMSCREEN "Aff. écran" #define TR_SF_PUSH_CUST_SWITCH "Push CS" #define TR_SF_LCD_TO_VIDEO "LCD to Video" diff --git a/radio/src/translations/he.h b/radio/src/translations/he.h index 926fd266555..ba8c99f42cf 100644 --- a/radio/src/translations/he.h +++ b/radio/src/translations/he.h @@ -122,6 +122,7 @@ #define TR_SF_DISABLE_TOUCH "ללא מסך מגע" #define TR_SF_DISABLE_AUDIO_AMP "Audio Amp Off" #define TR_SF_SET_SCREEN "הגדרת מסך ראשי" +#define TR_SF_SET_TELEMSCREEN "Set Screen" #define TR_SF_PUSH_CUST_SWITCH "Push CS" #define TR_SF_LCD_TO_VIDEO "LCD to Video" diff --git a/radio/src/translations/it.h b/radio/src/translations/it.h index f2fc8d763fc..53bd68340e4 100644 --- a/radio/src/translations/it.h +++ b/radio/src/translations/it.h @@ -119,6 +119,7 @@ #define TR_SF_DISABLE_TOUCH "No Touch" #define TR_SF_DISABLE_AUDIO_AMP "Amp Audio Off" #define TR_SF_SET_SCREEN "Setta Schermo Princ." +#define TR_SF_SET_TELEMSCREEN "Setta Schermo" #define TR_SF_PUSH_CUST_SWITCH "Push CS" #define TR_SF_LCD_TO_VIDEO "LCD to Video" diff --git a/radio/src/translations/jp.h b/radio/src/translations/jp.h index 22c8ac7e249..99edde72661 100644 --- a/radio/src/translations/jp.h +++ b/radio/src/translations/jp.h @@ -119,6 +119,7 @@ #define TR_SF_DISABLE_TOUCH "非タッチ" #define TR_SF_DISABLE_AUDIO_AMP "オーディオアンプ OFF" #define TR_SF_SET_SCREEN "メイン画面設定" +#define TR_SF_SET_TELEMSCREEN "Set Screen" #define TR_SF_PUSH_CUST_SWITCH "Push CS" #define TR_SF_LCD_TO_VIDEO "LCD to Video" diff --git a/radio/src/translations/nl.h b/radio/src/translations/nl.h index 85b1e1561a0..1c2aba66a39 100644 --- a/radio/src/translations/nl.h +++ b/radio/src/translations/nl.h @@ -116,6 +116,7 @@ #define TR_SF_DISABLE_TOUCH "No Touch" #define TR_SF_DISABLE_AUDIO_AMP "Audio Amp Off" #define TR_SF_SET_SCREEN "Set Main Screen" +#define TR_SF_SET_TELEMSCREEN "Set Screen" #define TR_SF_PUSH_CUST_SWITCH "Push CS" #define TR_SF_LCD_TO_VIDEO "LCD to Video" diff --git a/radio/src/translations/pl.h b/radio/src/translations/pl.h index 540ce9e8adb..440b2156ad4 100644 --- a/radio/src/translations/pl.h +++ b/radio/src/translations/pl.h @@ -115,6 +115,7 @@ #define TR_SF_DISABLE_TOUCH "No Touch" #define TR_SF_DISABLE_AUDIO_AMP TR("Wycisz wzm.", "Wycisz wzmacniacz audio") #define TR_SF_SET_SCREEN "Set Main Screen" +#define TR_SF_SET_TELEMSCREEN "Ustaw ekran" #define TR_SF_PUSH_CUST_SWITCH "Push CS" #define TR_SF_LCD_TO_VIDEO "LCD to Video" diff --git a/radio/src/translations/pt.h b/radio/src/translations/pt.h index 23a3d9a711a..33ffb894e6c 100644 --- a/radio/src/translations/pt.h +++ b/radio/src/translations/pt.h @@ -122,6 +122,7 @@ #define TR_SF_DISABLE_TOUCH "No Touch" #define TR_SF_DISABLE_AUDIO_AMP "Amp Audio Desl" #define TR_SF_SET_SCREEN "Def Tela Princ" +#define TR_SF_SET_TELEMSCREEN "Def Tela" #define TR_SF_PUSH_CUST_SWITCH "Push CS" #define TR_SF_LCD_TO_VIDEO "LCD to Video" diff --git a/radio/src/translations/ru.h b/radio/src/translations/ru.h index d764e337bb2..6a29ce150f5 100644 --- a/radio/src/translations/ru.h +++ b/radio/src/translations/ru.h @@ -121,6 +121,7 @@ #define TR_SF_DISABLE_TOUCH "Сенсор вык" #define TR_SF_DISABLE_AUDIO_AMP "Вык аудио усил." #define TR_SF_SET_SCREEN "Выбр глав экран" +#define TR_SF_SET_TELEMSCREEN "Set Screen" #define TR_SF_PUSH_CUST_SWITCH "Push CS" #define TR_SF_LCD_TO_VIDEO "LCD to Video" diff --git a/radio/src/translations/se.h b/radio/src/translations/se.h index c54446da7e7..f8ef3a5284c 100644 --- a/radio/src/translations/se.h +++ b/radio/src/translations/se.h @@ -123,6 +123,7 @@ #define TR_SF_DISABLE_TOUCH "Ej pekskärm" #define TR_SF_DISABLE_AUDIO_AMP TR("Audioförst. av","Audioförstärkare av") #define TR_SF_SET_SCREEN "Sätt huvudskärm" +#define TR_SF_SET_TELEMSCREEN "Visa skärm" #define TR_SF_PUSH_CUST_SWITCH "Tryck CS" #define TR_SF_LCD_TO_VIDEO "LCD till Video" diff --git a/radio/src/translations/tw.h b/radio/src/translations/tw.h index 19598771195..7e3f3504bc6 100644 --- a/radio/src/translations/tw.h +++ b/radio/src/translations/tw.h @@ -115,6 +115,7 @@ #define TR_SF_DISABLE_TOUCH "禁用觸摸" #define TR_SF_DISABLE_AUDIO_AMP "關閉音頻功放" #define TR_SF_SET_SCREEN "選擇主屏" +#define TR_SF_SET_TELEMSCREEN "設置主屏" #define TR_SF_PUSH_CUST_SWITCH "Push CS" #define TR_SF_LCD_TO_VIDEO "屏幕顯示圖傳" diff --git a/radio/src/translations/ua.h b/radio/src/translations/ua.h index b29385e6b8d..37ca28ba9bd 100644 --- a/radio/src/translations/ua.h +++ b/radio/src/translations/ua.h @@ -121,6 +121,7 @@ #define TR_SF_DISABLE_TOUCH "Сенсор вимк." #define TR_SF_DISABLE_AUDIO_AMP "Підсил. вимк." #define TR_SF_SET_SCREEN "Вибір гол. екр." +#define TR_SF_SET_TELEMSCREEN "Set Screen" #define TR_SF_PUSH_CUST_SWITCH "Push CS" #define TR_SF_LCD_TO_VIDEO "LCD to Video" diff --git a/tools/cfn_sorter.cpp b/tools/cfn_sorter.cpp index 59f0f1a501d..b4750119c64 100755 --- a/tools/cfn_sorter.cpp +++ b/tools/cfn_sorter.cpp @@ -120,6 +120,7 @@ int main() { TR_SF_RACING_MODE, "FUNC_RACING_MODE", FUNC_RACING_MODE, "" }, { TR_SF_DISABLE_TOUCH, "FUNC_DISABLE_TOUCH", FUNC_DISABLE_TOUCH, "defined(COLORLCD)" }, { TR_SF_SET_SCREEN, "FUNC_SET_SCREEN", FUNC_SET_SCREEN, "defined(COLORLCD)" }, + { TR_SF_SET_TELEMSCREEN, "FUNC_SET_SCREEN", FUNC_SET_SCREEN, "!defined(COLORLCD)" }, { TR_SF_DISABLE_AUDIO_AMP, "FUNC_DISABLE_AUDIO_AMP", FUNC_DISABLE_AUDIO_AMP, "" }, { TR_SF_RGBLEDS, "FUNC_RGB_LED", FUNC_RGB_LED, "" }, { TR_SF_LCD_TO_VIDEO, "FUNC_LCD_TO_VIDEO", FUNC_LCD_TO_VIDEO, "defined(VIDEO_SWITCH)" },