diff --git a/radio/src/gui/colorlcd/CMakeLists.txt b/radio/src/gui/colorlcd/CMakeLists.txt index 8fbd82e6a43..598f68decc9 100644 --- a/radio/src/gui/colorlcd/CMakeLists.txt +++ b/radio/src/gui/colorlcd/CMakeLists.txt @@ -68,7 +68,6 @@ set(GUI_SRC curveedit.cpp fm_matrix.cpp gvar_numberedit.cpp - input_edit_adv.cpp input_edit.cpp input_source.cpp mixer_edit_adv.cpp diff --git a/radio/src/gui/colorlcd/fm_matrix.cpp b/radio/src/gui/colorlcd/fm_matrix.cpp index 385d48f2898..6e246f6217b 100644 --- a/radio/src/gui/colorlcd/fm_matrix.cpp +++ b/radio/src/gui/colorlcd/fm_matrix.cpp @@ -24,11 +24,13 @@ #include "opentx.h" #include "themes/etx_lv_theme.h" -template -FMMatrix::FMMatrix(Window* parent, const rect_t& r, T* input) : +template +FMMatrix::FMMatrix(Window* parent, const rect_t& r, T* input, uint8_t columns) : ButtonMatrix(parent, r), input(input) { - initBtnMap(FM_COLS, MAX_FLIGHT_MODES); + if (columns == 0) columns = DEF_COLS; + + initBtnMap(columns, MAX_FLIGHT_MODES); for (int i = 0; i < MAX_FLIGHT_MODES; i++) { setTextAndState(i); @@ -36,10 +38,10 @@ FMMatrix::FMMatrix(Window* parent, const rect_t& r, T* input) : update(); - lv_obj_set_width(lvobj, FM_COLS * (FM_BTN_W + 3) + 3); - lv_obj_set_height(lvobj, FM_ROWS * (EdgeTxStyles::UI_ELEMENT_HEIGHT + 3) +3); + lv_obj_set_width(lvobj, columns * (FM_BTN_W + 3) + 3); + lv_obj_set_height(lvobj, ((MAX_FLIGHT_MODES + columns - 1) / columns) * (EdgeTxStyles::UI_ELEMENT_HEIGHT + 3) +3); - padAll(PAD_SMALL); + padAll(PAD_TINY); } template diff --git a/radio/src/gui/colorlcd/fm_matrix.h b/radio/src/gui/colorlcd/fm_matrix.h index 08c70321dd7..a999e36e38f 100644 --- a/radio/src/gui/colorlcd/fm_matrix.h +++ b/radio/src/gui/colorlcd/fm_matrix.h @@ -29,14 +29,13 @@ struct MixData; template struct FMMatrix : public ButtonMatrix { T* input; - FMMatrix(Window* parent, const rect_t& rect, T* input); + FMMatrix(Window* parent, const rect_t& rect, T* input, uint8_t columns = 0); void onPress(uint8_t btn_id); bool isActive(uint8_t btn_id); void setTextAndState(uint8_t btn_id); static LAYOUT_VAL(FM_BTN_W, 48, 48) - static LAYOUT_VAL(FM_COLS, 5, 3) - static LAYOUT_VAL(FM_ROWS, 2, 3) + static LAYOUT_VAL(DEF_COLS, 5, 3) }; extern template struct FMMatrix; diff --git a/radio/src/gui/colorlcd/input_edit.cpp b/radio/src/gui/colorlcd/input_edit.cpp index f99a4cacf9d..a2bfd5c7954 100644 --- a/radio/src/gui/colorlcd/input_edit.cpp +++ b/radio/src/gui/colorlcd/input_edit.cpp @@ -20,141 +20,312 @@ */ #include "input_edit.h" +#include "fm_matrix.h" #include "curve_param.h" -#include "curveedit.h" #include "gvar_numberedit.h" -#include "input_edit_adv.h" #include "input_source.h" +#include "curveedit.h" + #include "opentx.h" -#include "themes/etx_lv_theme.h" +#include "switches.h" #include "switchchoice.h" #define SET_DIRTY() storageDirty(EE_MODEL) +// Grid description for inner and outer grids +static const lv_coord_t col_dsc[] = {LV_GRID_CONTENT, LV_GRID_TEMPLATE_LAST}; +static const lv_coord_t row_dsc[] = {LV_GRID_CONTENT, LV_GRID_TEMPLATE_LAST}; + InputEditWindow::InputEditWindow(int8_t input, uint8_t index) : - Page(ICON_MODEL_INPUTS), input(input), index(index) + Page(ICON_MODEL_INPUTS), + input(input), + index(index) { - std::string title2(getSourceString(MIXSRC_FIRST_INPUT + input)); + ExpoData* inputData = expoAddress(index); + + body->padAll(PAD_ZERO); + header->setTitle(STR_MENUINPUTS); - header->setTitle2(title2); + headerSwitchName = header->setTitle2(""); + + lv_obj_set_style_text_color(headerSwitchName->getLvObj(), makeLvColor(COLOR_THEME_ACTIVE), LV_STATE_USER_1); + lv_obj_set_style_text_font(headerSwitchName->getLvObj(), getFont(FONT(BOLD)), LV_STATE_USER_1); + + active = !isActive(inputData); - auto body_obj = body->getLvObj(); -#if PORTRAIT_LCD // portrait - lv_obj_set_flex_flow(body_obj, LV_FLEX_FLOW_COLUMN); -#else // landscape - lv_obj_set_flex_flow(body_obj, LV_FLEX_FLOW_ROW); + setTitle(); + + // Outer grid form + auto form = new Window(body, rect_t{}); + form->padAll(PAD_ZERO); + form->setFlexLayout(); + + FlexGridLayout grid(col_dsc, row_dsc); + + auto line = form->newLine(grid); + line->padAll(PAD_ZERO); + +#if LCD_H > LCD_W // portrait + lv_obj_set_flex_flow(line->getLvObj(), LV_FLEX_FLOW_COLUMN); +#else // landscape + lv_obj_set_flex_flow(line->getLvObj(), LV_FLEX_FLOW_ROW); #endif - lv_obj_set_style_flex_cross_place(body_obj, LV_FLEX_ALIGN_CENTER, 0); - auto box = new Window(body, rect_t{}); - auto box_obj = box->getLvObj(); - lv_obj_set_flex_grow(box_obj, 2); - etx_scrollbar(box_obj); +#if LCD_W > LCD_H // landscape (preview on left) + // Preview grid box - force width and height + auto box = new Window(line, rect_t{0, 0, INPUT_EDIT_CURVE_WIDTH + 8, body->height()}); + box->padAll(PAD_ZERO); -#if PORTRAIT_LCD // portrait - box->setWidth(body->width() - 2 * PAD_MEDIUM); -#else // landscape - box->setHeight(body->height() - 2 * PAD_MEDIUM); + // Add preview and buttons + buildPreview(box, inputData); #endif - auto form = new Window(box, rect_t{}); - buildBody(form); + // Inner box for main controls - force width and height +#if LCD_H > LCD_W // portrait + auto box = new Window(line, rect_t{0, 0, body->width(), body->height() - INPUT_EDIT_CURVE_HEIGHT - 68}); +#else + box = new Window(line, rect_t{0, 0, body->width() - INPUT_EDIT_CURVE_WIDTH - 12, body->height()}); +#endif + box->padAll(PAD_ZERO); + etx_scrollbar(box->getLvObj()); - preview = new Curve( - body, rect_t{0, 0, INPUT_EDIT_CURVE_WIDTH, INPUT_EDIT_CURVE_HEIGHT}, - [=](int x) -> int { - ExpoData* line = expoAddress(index); - int16_t anas[MAX_INPUTS] = {0}; - applyExpos(anas, e_perout_mode_inactive_flight_mode, line->srcRaw, x); - return anas[line->chn]; - }, - [=]() -> int { return getValue(expoAddress(index)->srcRaw); }); + // Add main controls + buildBody(box, inputData); + +#if LCD_H > LCD_W // portrait (preview below) + // Preview grid box - force width and height + box = new Window(line, rect_t{0, 0, body->width(), INPUT_EDIT_CURVE_HEIGHT + 62}); + box->padAll(PAD_ZERO); + + // Add preview and buttons + buildPreview(box, inputData); +#endif CurveEdit::SetCurrentSource(expoAddress(index)->srcRaw); } -static const lv_coord_t col_dsc[] = {LV_GRID_FR(1), LV_GRID_FR(2), - LV_GRID_TEMPLATE_LAST}; -static const lv_coord_t row_dsc[] = {LV_GRID_CONTENT, LV_GRID_TEMPLATE_LAST}; +bool InputEditWindow::isActive(ExpoData* inputData) +{ + return getSwitch(inputData->swtch); +} + +void InputEditWindow::checkEvents() +{ + Page::checkEvents(); -void InputEditWindow::buildBody(Window* form) + ExpoData* inputData = expoAddress(index); + + if (active != isActive(inputData)) { + active = isActive(inputData); + if (active) { + lv_obj_add_state(headerSwitchName->getLvObj(), LV_STATE_USER_1); + } else { + lv_obj_clear_state(headerSwitchName->getLvObj(), LV_STATE_USER_1); + } + } + + static uint8_t lastActiveIdx = MAX_EXPOS; + + for (uint8_t i=0; isrcRaw == inputData->srcRaw) && getSwitch(ed->swtch)) { + if (lastActiveIdx != i) { + lastActiveIdx = i; + preview->update(); + break; + } + } + } +} + +int16_t InputEditWindow::getExpo(ExpoData* ed, int16_t val) { - FlexGridLayout grid(col_dsc, row_dsc, PAD_TINY); - form->setFlexLayout(LV_FLEX_FLOW_COLUMN, PAD_ZERO); + int32_t v = 0; + if (EXPO_VALID(ed)) { + v = val; + if (EXPO_MODE_ENABLE(ed, v)) { - ExpoData* input = expoAddress(index); + //========== CURVE================= + if (ed->curve.value) { + v = applyCurve(v, ed->curve); + } + + //========== WEIGHT =============== + int32_t weight = GET_GVAR_PREC1(ed->weight, -100, 100, mixerCurrentFlightMode); + v = divRoundClosest((int32_t)v * weight, 1000); + + //========== OFFSET =============== + int32_t offset = GET_GVAR_PREC1(ed->offset, -100, 100, mixerCurrentFlightMode); + if (offset) v += divRoundClosest(calc100toRESX(offset), 10); + } + } + return v; +} + +void InputEditWindow::setTitle() +{ + headerSwitchName->setText(getSourceString(MIXSRC_FIRST_INPUT + input)); +} + +static const lv_coord_t b_col_dsc[] = {LV_GRID_FR(1), LV_GRID_FR(2), LV_GRID_TEMPLATE_LAST}; + +void InputEditWindow::buildBody(Window* box, ExpoData* inputData) +{ + lv_obj_set_scrollbar_mode(box->getLvObj(), LV_SCROLLBAR_MODE_AUTO); + auto form = new Window(box, rect_t{}); + form->padAll(PAD_ZERO); + form->setFlexLayout(); + + FlexGridLayout grid(b_col_dsc, row_dsc, PAD_SMALL); // Input Name auto line = form->newLine(grid); - auto inputName = g_model.inputNames[input->chn]; + auto inputName = g_model.inputNames[inputData->chn]; new StaticText(line, rect_t{}, STR_INPUTNAME); - new ModelTextEdit(line, rect_t{}, inputName, LEN_INPUT_NAME); + auto nameFld = new ModelTextEdit(line, rect_t{0, 0, LCD_W*3/10-8, 0}, inputName, LEN_INPUT_NAME); + nameFld->setChangeHandler([=]() { + setTitle(); + SET_DIRTY(); + }); // Line Name line = form->newLine(grid); new StaticText(line, rect_t{}, STR_EXPONAME); - new ModelTextEdit(line, rect_t{}, input->name, LEN_EXPOMIX_NAME); + new ModelTextEdit(line, rect_t{0, 0, LCD_W*3/10-8, 0}, inputData->name, LEN_EXPOMIX_NAME); // Source line = form->newLine(grid); new StaticText(line, rect_t{}, STR_SOURCE); - auto src = new InputSource(line, input); - lv_obj_set_style_grid_cell_x_align(src->getLvObj(), LV_GRID_ALIGN_STRETCH, 0); + new InputSource(line, inputData); + + // Switch + line = form->newLine(grid); + new StaticText(line, rect_t{}, STR_SWITCH); + new SwitchChoice(line, rect_t{}, SWSRC_FIRST_IN_MIXES, SWSRC_LAST_IN_MIXES, GET_SET_DEFAULT(inputData->swtch)); // Weight line = form->newLine(grid); new StaticText(line, rect_t{}, STR_WEIGHT); - auto gvar = - new GVarNumberEdit(line, -100, 100, GET_DEFAULT(input->weight), - [=](int32_t newValue) { - input->weight = newValue; - preview->update(); - SET_DIRTY(); - }); + auto gvar = new GVarNumberEdit(line, -100, 100, + GET_DEFAULT(inputData->weight), + [=](int32_t newValue) { + inputData->weight = newValue; + preview->update(); + SET_DIRTY(); + }); gvar->setSuffix("%"); // Offset line = form->newLine(grid); new StaticText(line, rect_t{}, STR_OFFSET); gvar = new GVarNumberEdit(line, -100, 100, - GET_DEFAULT(input->offset), [=](int32_t newValue) { - input->offset = newValue; + GET_DEFAULT(inputData->offset), + [=](int32_t newValue) { + inputData->offset = newValue; preview->update(); SET_DIRTY(); }); gvar->setSuffix("%"); - // Switch - line = form->newLine(grid); - new StaticText(line, rect_t{}, STR_SWITCH); - new SwitchChoice(line, rect_t{}, SWSRC_FIRST_IN_MIXES, SWSRC_LAST_IN_MIXES, - GET_SET_DEFAULT(input->swtch)); - // Curve line = form->newLine(grid); new StaticText(line, rect_t{}, STR_CURVE); - auto param = - new CurveParam(line, rect_t{}, &input->curve, - [=](int32_t newValue) { - input->curve.value = newValue; - preview->update(); - SET_DIRTY(); - }, - [=]() { - preview->update(); - }); - lv_obj_set_style_grid_cell_x_align(param->getLvObj(), LV_GRID_ALIGN_STRETCH, - 0); + new CurveParam(line, rect_t{}, &inputData->curve, + [=](int32_t newValue) { + inputData->curve.value = newValue; + preview->update(); + SET_DIRTY(); + }); + // Trim line = form->newLine(grid); - line->padAll(PAD_LARGE); - auto btn = - new TextButton(line, rect_t{}, LV_SYMBOL_SETTINGS, [=]() -> uint8_t { - new InputEditAdvanced(this->input, index); - return 0; - }); - lv_obj_set_width(btn->getLvObj(), lv_pct(100)); + new StaticText(line, rect_t{}, STR_TRIM); + const auto trimLast = TRIM_OFF + keysGetMaxTrims() - 1; + auto c = new Choice(line, rect_t{}, -TRIM_OFF, trimLast, + GET_VALUE(-inputData->trimSource), + SET_VALUE(inputData->trimSource, -newValue)); + c->setAvailableHandler([=](int value) { + return value != TRIM_ON || inputData->srcRaw <= MIXSRC_LAST_STICK; + }); + c->setTextHandler([=](int value) -> std::string { + return getTrimSourceLabel(inputData->srcRaw, -value); + }); + + // Flight modes + line = form->newLine(grid); + new StaticText(line, rect_t{}, STR_FLMODE); + new FMMatrix(line, rect_t{}, inputData, 3); + +#if LCD_W > LCD_H + line->padBottom(8); +#endif +} + +void InputEditWindow::buildPreview(Window* box, ExpoData* inputData) +{ + lv_coord_t xo = (box->width() - INPUT_EDIT_CURVE_WIDTH) / 2; + lv_coord_t yo = (box->height() - (INPUT_EDIT_CURVE_HEIGHT + 56)) / 2; + + static bool showActive = true; + auto aBtn = new TextButton(box, rect_t{xo, yo, INPUT_EDIT_CURVE_WIDTH, 24}, STR_SHOW_ACTIVE); + aBtn->padAll(PAD_ZERO); + aBtn->check(showActive); + aBtn->setPressHandler([=]() { + showActive = !showActive; + preview->update(); + return showActive; + }); + + preview = new Curve(box, rect_t{ xo, yo + 28, INPUT_EDIT_CURVE_WIDTH, INPUT_EDIT_CURVE_HEIGHT }, + [=](int x) -> int { + if (showActive) { + int16_t anas[MAX_INPUTS] = {0}; + applyExpos(anas, e_perout_mode_inactive_flight_mode, inputData->srcRaw, x); + return anas[inputData->chn]; + } else { + return getExpo(inputData, x); + } + }, + [=]() -> int { return getValue(expoAddress(index)->srcRaw); }); + + auto sBtn1 = new TextButton(box, rect_t{xo, yo + INPUT_EDIT_CURVE_HEIGHT + 4 + 28, INPUT_EDIT_CURVE_WIDTH/2 - 4, 24}, STR_VCURVEFUNC[2]); + sBtn1->padAll(PAD_ZERO); + + auto sBtn2 = new TextButton(box, rect_t{xo + INPUT_EDIT_CURVE_WIDTH / 2 + 4, yo + INPUT_EDIT_CURVE_HEIGHT + 4 + 28, INPUT_EDIT_CURVE_WIDTH/2 -4, 24}, STR_VCURVEFUNC[1]); + sBtn2->padAll(PAD_ZERO); + + sBtn1->setPressHandler([=]() { + if (sBtn1->checked()) { + inputData->mode = inputData->mode & (~1); + if ((inputData->mode & 3) == 0) + inputData->mode = inputData->mode | 2; + } else { + inputData->mode = inputData->mode | 1; + } + SET_DIRTY(); + preview->update(); + sBtn2->check(inputData->mode & 2); + return (inputData->mode & 1) != 0; + }); + + sBtn2->setPressHandler([=]() { + if (sBtn2->checked()) { + inputData->mode = inputData->mode & (~2); + if ((inputData->mode & 3) == 0) + inputData->mode = inputData->mode | 1; + } else { + inputData->mode = inputData->mode | 2; + } + SET_DIRTY(); + preview->update(); + sBtn1->check(inputData->mode & 1); + return (inputData->mode & 2) != 0; + }); + + sBtn1->check(inputData->mode & 1); + sBtn2->check(inputData->mode & 2); } void InputEditWindow::deleteLater(bool detach, bool trash) diff --git a/radio/src/gui/colorlcd/input_edit.h b/radio/src/gui/colorlcd/input_edit.h index 8af4e588a19..db078226d0f 100644 --- a/radio/src/gui/colorlcd/input_edit.h +++ b/radio/src/gui/colorlcd/input_edit.h @@ -39,8 +39,17 @@ class InputEditWindow : public Page uint8_t input; uint8_t index; Curve* preview; + bool active = false; + StaticText * headerSwitchName = nullptr; - void buildBody(Window *window); + void setTitle(); + void buildBody(Window *box, ExpoData* inputData); + void buildPreview(Window *box, ExpoData* inputData); + int16_t getExpo(ExpoData* ed, int16_t val); + + bool isActive(ExpoData* inputData); + void checkEvents() override; + void deleteLater(bool detach = true, bool trash = true) override; }; diff --git a/radio/src/gui/colorlcd/input_edit_adv.cpp b/radio/src/gui/colorlcd/input_edit_adv.cpp deleted file mode 100644 index 1515cbcefbb..00000000000 --- a/radio/src/gui/colorlcd/input_edit_adv.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) EdgeTX - * - * Based on code named - * opentx - https://github.com/opentx/opentx - * th9x - http://code.google.com/p/th9x - * er9x - http://code.google.com/p/er9x - * gruvin9x - http://code.google.com/p/gruvin9x - * - * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#include "input_edit_adv.h" - -#include "fm_matrix.h" -#include "opentx.h" -#include "themes/etx_lv_theme.h" - -#define SET_DIRTY() storageDirty(EE_MODEL) - -static const lv_coord_t col_dsc[] = {LV_GRID_FR(1), LV_GRID_FR(2), - LV_GRID_TEMPLATE_LAST}; -static const lv_coord_t row_dsc[] = {LV_GRID_CONTENT, LV_GRID_TEMPLATE_LAST}; - -InputEditAdvanced::InputEditAdvanced(uint8_t input_n, uint8_t index) : - Page(ICON_MODEL_INPUTS) -{ - std::string title2(getSourceString(MIXSRC_FIRST_INPUT + input_n)); - header->setTitle(STR_MENUINPUTS); - header->setTitle2(title2); - - FlexGridLayout grid(col_dsc, row_dsc, PAD_TINY); - body->setFlexLayout(); - - ExpoData* input = expoAddress(index); - - // Side - auto line = body->newLine(grid); - new StaticText(line, rect_t{}, STR_SIDE); - new Choice( - line, rect_t{}, STR_VCURVEFUNC, 1, 3, - [=]() -> int16_t { return 4 - input->mode; }, - [=](int16_t newValue) { - input->mode = 4 - newValue; - SET_DIRTY(); - }); - - // Trim - line = body->newLine(grid); - new StaticText(line, rect_t{}, STR_TRIM); - const auto trimLast = TRIM_OFF + keysGetMaxTrims() - 1; - auto c = new Choice(line, rect_t{}, -TRIM_OFF, trimLast, - GET_VALUE(-input->trimSource), - SET_VALUE(input->trimSource, -newValue)); - - uint16_t srcRaw = input->srcRaw; - c->setAvailableHandler([=](int value) { - return value != TRIM_ON || srcRaw <= MIXSRC_LAST_STICK; - }); - c->setTextHandler([=](int value) -> std::string { - return getTrimSourceLabel(srcRaw, -value); - }); - - // Flight modes - if (modelFMEnabled()) { - line = body->newLine(grid); - new StaticText(line, rect_t{}, STR_FLMODE); - new FMMatrix(line, rect_t{}, input); - } -} diff --git a/radio/src/gui/colorlcd/input_edit_adv.h b/radio/src/gui/colorlcd/input_edit_adv.h deleted file mode 100644 index 11d11e760d8..00000000000 --- a/radio/src/gui/colorlcd/input_edit_adv.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) EdgeTX - * - * Based on code named - * opentx - https://github.com/opentx/opentx - * th9x - http://code.google.com/p/th9x - * er9x - http://code.google.com/p/er9x - * gruvin9x - http://code.google.com/p/gruvin9x - * - * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#pragma once - -#include "page.h" -#include "button_matrix.h" - -struct ExpoData; - -class InputEditAdvanced : public Page -{ - public: - InputEditAdvanced(uint8_t input_n, uint8_t index); -}; diff --git a/radio/src/gui/colorlcd/input_source.cpp b/radio/src/gui/colorlcd/input_source.cpp index 2eb58a67e1d..b256179c161 100644 --- a/radio/src/gui/colorlcd/input_source.cpp +++ b/radio/src/gui/colorlcd/input_source.cpp @@ -93,7 +93,7 @@ InputSource::InputSource(Window *parent, ExpoData *input) : { padAll(PAD_TINY); lv_obj_set_flex_flow(lvobj, LV_FLEX_FLOW_COLUMN); - lv_obj_set_size(lvobj, lv_pct(100), LV_SIZE_CONTENT); + lv_obj_set_size(lvobj, LV_SIZE_CONTENT, LV_SIZE_CONTENT); new SourceChoice( this, rect_t{}, INPUTSRC_FIRST, INPUTSRC_LAST, GET_DEFAULT(input->srcRaw), diff --git a/radio/src/translations.cpp b/radio/src/translations.cpp index 435446a0ad5..1dd2857e9d5 100644 --- a/radio/src/translations.cpp +++ b/radio/src/translations.cpp @@ -803,6 +803,7 @@ const char STR_FAV_MATCH[] = TR_FAV_MATCH; ISTR(LABELS_SELECT_MODE); ISTR(LABELS_MATCH_MODE); ISTR(FAV_MATCH_MODE); +const char STR_SHOW_ACTIVE[] = TR_SHOW_ACTIVE; #endif #if !defined(COLORLCD) diff --git a/radio/src/translations.h b/radio/src/translations.h index 826bbb98077..67ace5910e1 100644 --- a/radio/src/translations.h +++ b/radio/src/translations.h @@ -813,6 +813,7 @@ extern const char STR_FAV_MATCH[]; extern const char* const STR_LABELS_SELECT_MODE[]; extern const char* const STR_LABELS_MATCH_MODE[]; extern const char* const STR_FAV_MATCH_MODE[]; +extern const char STR_SHOW_ACTIVE[]; #endif extern const char STR_EXECUTE_FILE[]; extern const char STR_DELETE_FILE[]; diff --git a/radio/src/translations/cn.h b/radio/src/translations/cn.h index 54ce0e9cef6..772f2886d96 100644 --- a/radio/src/translations/cn.h +++ b/radio/src/translations/cn.h @@ -718,6 +718,7 @@ #define TR_EDIT_COLOR "编辑颜色" #define TR_NO_THEME_IMAGE "没有预览图" #define TR_BACKLIGHT_TIMER "持续时间" +#define TR_SHOW_ACTIVE "Show Active" #if defined(COLORLCD) #define TR_MODEL_QUICK_SELECT "快速选择模型" diff --git a/radio/src/translations/cz.h b/radio/src/translations/cz.h index b7213a0585b..5ecb38a4070 100644 --- a/radio/src/translations/cz.h +++ b/radio/src/translations/cz.h @@ -730,6 +730,7 @@ #define TR_EDIT_COLOR "Upravit barvu" #define TR_NO_THEME_IMAGE "Náhled motivu nedostupný" #define TR_BACKLIGHT_TIMER "Čas zhasnutí displeje" +#define TR_SHOW_ACTIVE "Show Active" #if defined(COLORLCD) #define TR_MODEL_QUICK_SELECT "Rychlý výběr modelu" diff --git a/radio/src/translations/da.h b/radio/src/translations/da.h index 4f01b9783ce..b96568cad0f 100644 --- a/radio/src/translations/da.h +++ b/radio/src/translations/da.h @@ -723,6 +723,7 @@ #define TR_EDIT_COLOR "Rediger farve" #define TR_NO_THEME_IMAGE "Ingen billede for tema" #define TR_BACKLIGHT_TIMER TR("Inaktivitet", "Ved inaktivitet dæmp efter") +#define TR_SHOW_ACTIVE "Show Active" #if defined(COLORLCD) #define TR_MODEL_QUICK_SELECT "Hurtigvalg af model" diff --git a/radio/src/translations/de.h b/radio/src/translations/de.h index 2ed11658bda..0816ee25c55 100644 --- a/radio/src/translations/de.h +++ b/radio/src/translations/de.h @@ -718,6 +718,7 @@ #define TR_EDIT_COLOR "Farbe bearbeiten" #define TR_NO_THEME_IMAGE "Kein Theme Bild" #define TR_BACKLIGHT_TIMER "Inaktivitäts Timeout" +#define TR_SHOW_ACTIVE "Show Active" #if defined(COLORLCD) #define TR_MODEL_QUICK_SELECT "schnelle Modellauswahl" diff --git a/radio/src/translations/en.h b/radio/src/translations/en.h index 7f47407490a..4aae8ceeadd 100644 --- a/radio/src/translations/en.h +++ b/radio/src/translations/en.h @@ -721,6 +721,7 @@ #define TR_EDIT_COLOR "Edit Color" #define TR_NO_THEME_IMAGE "No theme image" #define TR_BACKLIGHT_TIMER "Inactivity timeout" +#define TR_SHOW_ACTIVE "Show Active" #if defined(COLORLCD) #define TR_MODEL_QUICK_SELECT "Model quick select" diff --git a/radio/src/translations/es.h b/radio/src/translations/es.h index c1ee60eac10..f5e0a0e17da 100644 --- a/radio/src/translations/es.h +++ b/radio/src/translations/es.h @@ -714,6 +714,7 @@ #define TR_EDIT_COLOR "Edit Color" #define TR_NO_THEME_IMAGE "No theme image" #define TR_BACKLIGHT_TIMER "Inactivity timeout" +#define TR_SHOW_ACTIVE "Show Active" #if defined(COLORLCD) #define TR_MODEL_QUICK_SELECT "Model quick select" diff --git a/radio/src/translations/fi.h b/radio/src/translations/fi.h index db570ab5ec0..d523042128b 100644 --- a/radio/src/translations/fi.h +++ b/radio/src/translations/fi.h @@ -729,6 +729,7 @@ #define TR_EDIT_COLOR "Edit Color" #define TR_NO_THEME_IMAGE "No theme image" #define TR_BACKLIGHT_TIMER "Inactivity timeout" +#define TR_SHOW_ACTIVE "Show Active" #if defined(COLORLCD) #define TR_MODEL_QUICK_SELECT "Mallin pikavalinta" diff --git a/radio/src/translations/fr.h b/radio/src/translations/fr.h index 52c4ebb116d..9912bbb9432 100644 --- a/radio/src/translations/fr.h +++ b/radio/src/translations/fr.h @@ -720,6 +720,7 @@ #define TR_EDIT_COLOR "Editer Couleur" #define TR_NO_THEME_IMAGE "Pas d'image de thème" #define TR_BACKLIGHT_TIMER "Durée du rétroéclairage" +#define TR_SHOW_ACTIVE "Show Active" #if defined(COLORLCD) #define TR_MODEL_QUICK_SELECT "Sélect. rapide modèle" diff --git a/radio/src/translations/he.h b/radio/src/translations/he.h index a9678a14f22..490439a7a64 100644 --- a/radio/src/translations/he.h +++ b/radio/src/translations/he.h @@ -722,6 +722,7 @@ #define TR_EDIT_COLOR "עריכת צבע" #define TR_NO_THEME_IMAGE "תמונת ערכת נושא" #define TR_BACKLIGHT_TIMER "זמן אי פעילות" +#define TR_SHOW_ACTIVE "Show Active" #if defined(COLORLCD) #define TR_MODEL_QUICK_SELECT "בחירת מודל מהירה" diff --git a/radio/src/translations/it.h b/radio/src/translations/it.h index 409b75b49d9..9da0d570dd2 100644 --- a/radio/src/translations/it.h +++ b/radio/src/translations/it.h @@ -717,6 +717,7 @@ #define TR_EDIT_COLOR "Edita colore" #define TR_NO_THEME_IMAGE "Nessuna immagine trovata" #define TR_BACKLIGHT_TIMER "Tempo d'inattività" +#define TR_SHOW_ACTIVE "Show Active" #if defined(COLORLCD) #define TR_MODEL_QUICK_SELECT "Selezione rapida modello" diff --git a/radio/src/translations/jp.h b/radio/src/translations/jp.h index 61af4f073c1..d072934c79e 100644 --- a/radio/src/translations/jp.h +++ b/radio/src/translations/jp.h @@ -722,6 +722,7 @@ #define TR_EDIT_COLOR "カラー編集" #define TR_NO_THEME_IMAGE "テーマ画像はありません" #define TR_BACKLIGHT_TIMER "持続時間" +#define TR_SHOW_ACTIVE "Show Active" #if defined(COLORLCD) #define TR_MODEL_QUICK_SELECT "モデル クイック選択" diff --git a/radio/src/translations/nl.h b/radio/src/translations/nl.h index 3578fe9927c..0915d8ba160 100644 --- a/radio/src/translations/nl.h +++ b/radio/src/translations/nl.h @@ -715,6 +715,7 @@ #define TR_EDIT_COLOR "Edit Color" #define TR_NO_THEME_IMAGE "No theme image" #define TR_BACKLIGHT_TIMER "Inactivity timeout" +#define TR_SHOW_ACTIVE "Show Active" #if defined(COLORLCD) #define TR_MODEL_QUICK_SELECT "Model quick select" diff --git a/radio/src/translations/pl.h b/radio/src/translations/pl.h index 4b198f4dc3d..c5d1db6b5a4 100644 --- a/radio/src/translations/pl.h +++ b/radio/src/translations/pl.h @@ -716,6 +716,7 @@ #define TR_EDIT_COLOR "Edytuj kolor" #define TR_NO_THEME_IMAGE "Brak obrazu motywu" #define TR_BACKLIGHT_TIMER "Czas bezczynności" +#define TR_SHOW_ACTIVE "Show Active" #if defined(COLORLCD) #define TR_MODEL_QUICK_SELECT "Szybki wybór modelu" diff --git a/radio/src/translations/pt.h b/radio/src/translations/pt.h index 53afaaffa3d..195014a819a 100644 --- a/radio/src/translations/pt.h +++ b/radio/src/translations/pt.h @@ -726,6 +726,7 @@ #define TR_EDIT_COLOR "Editar Cor" #define TR_NO_THEME_IMAGE "Sem image tema" #define TR_BACKLIGHT_TIMER "Timeout inativ" +#define TR_SHOW_ACTIVE "Show Active" #if defined(COLORLCD) #define TR_MODEL_QUICK_SELECT "Sel rapida modelo" diff --git a/radio/src/translations/se.h b/radio/src/translations/se.h index cfb15534749..a710012cfa1 100644 --- a/radio/src/translations/se.h +++ b/radio/src/translations/se.h @@ -734,6 +734,7 @@ #define TR_EDIT_COLOR "Redigera färg" #define TR_BACKLIGHT_TIMER "Timeout vid inaktivitet" #define TR_NO_THEME_IMAGE "Ingen temabild" +#define TR_SHOW_ACTIVE "Show Active" #if defined(COLORLCD) #define TR_MODEL_QUICK_SELECT "Snabbval av modell" diff --git a/radio/src/translations/tw.h b/radio/src/translations/tw.h index 671132e344d..39f4eeedc45 100644 --- a/radio/src/translations/tw.h +++ b/radio/src/translations/tw.h @@ -723,6 +723,7 @@ #define TR_EDIT_COLOR "编辑颜色" #define TR_NO_THEME_IMAGE "没有预览图" #define TR_BACKLIGHT_TIMER "持續時間" +#define TR_SHOW_ACTIVE "Show Active" #if defined(COLORLCD) #define TR_MODEL_QUICK_SELECT "快速選擇模型"