feat(color): Add Enable/Disable option to SF/GF popup menu (#4157)
This commit is contained in:
@@ -865,6 +865,23 @@ void SpecialFunctionsPage::build(FormWindow *window)
|
||||
pasteSpecialFunction(window, i, button);
|
||||
});
|
||||
}
|
||||
CustomFunctionData *cfn = &functions[i];
|
||||
uint8_t func = CFN_FUNC(cfn);
|
||||
if (HAS_ENABLE_PARAM(func)) {
|
||||
if (CFN_ACTIVE(cfn)) {
|
||||
menu->addLine(STR_DISABLE, [=]() {
|
||||
CFN_ACTIVE(cfn) = 0;
|
||||
SET_DIRTY();
|
||||
rebuild(window);
|
||||
});
|
||||
} else {
|
||||
menu->addLine(STR_ENABLE, [=]() {
|
||||
CFN_ACTIVE(cfn) = 1;
|
||||
SET_DIRTY();
|
||||
rebuild(window);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (functions[MAX_SPECIAL_FUNCTIONS - 1].isEmpty()) {
|
||||
for (int j = i; j < MAX_SPECIAL_FUNCTIONS; j++) {
|
||||
if (!functions[j].isEmpty()) {
|
||||
|
||||
@@ -216,7 +216,7 @@ void bootloaderDrawScreen(BootloaderState st, int opt, const char* str)
|
||||
bootloaderDrawTitle(TR_BL_RF_USB_ACCESS);
|
||||
|
||||
lcd->drawText(62, 75, LV_SYMBOL_USB, BL_FOREGROUND);
|
||||
coord_t pos = lcd->drawText(84, 75, rfUsbAccess ? TR_BL_DISABLE : TR_BL_ENABLE, BL_FOREGROUND);
|
||||
coord_t pos = lcd->drawText(84, 75, rfUsbAccess ? TR_DISABLE : TR_ENABLE, BL_FOREGROUND);
|
||||
pos += 8;
|
||||
|
||||
lcd->drawText(60, 110, LV_SYMBOL_NEW_LINE, BL_FOREGROUND);
|
||||
|
||||
@@ -629,6 +629,7 @@ const char STR_PERIOD[] = TR_PERIOD;
|
||||
const char STR_INTERVAL[] = TR_INTERVAL;
|
||||
const char STR_REPEAT[] = TR_REPEAT;
|
||||
const char STR_ENABLE[] = TR_ENABLE;
|
||||
const char STR_DISABLE[] = TR_DISABLE;
|
||||
const char STR_TOPLCDTIMER[] = TR_TOPLCDTIMER;
|
||||
const char STR_UNIT[] = TR_UNIT;
|
||||
const char STR_TELEMETRY_NEWSENSOR[] = TR_TELEMETRY_NEWSENSOR;
|
||||
|
||||
@@ -1029,6 +1029,7 @@ extern const char STR_PERIOD[];
|
||||
extern const char STR_INTERVAL[];
|
||||
extern const char STR_REPEAT[];
|
||||
extern const char STR_ENABLE[];
|
||||
extern const char STR_DISABLE[];
|
||||
extern const char STR_TOPLCDTIMER[];
|
||||
extern const char STR_UNIT[]; ;
|
||||
extern const char STR_TELEMETRY_NEWSENSOR[];
|
||||
|
||||
@@ -867,6 +867,7 @@
|
||||
#define TR_INTERVAL "间隔"
|
||||
#define TR_REPEAT "循环"
|
||||
#define TR_ENABLE "启用"
|
||||
#define TR_DISABLE "Disable"
|
||||
#define TR_TOPLCDTIMER "Top LCD Timer"
|
||||
#define TR_UNIT "单位"
|
||||
#define TR_TELEMETRY_NEWSENSOR INDENT "添加新传感器..."
|
||||
@@ -1033,8 +1034,6 @@
|
||||
#define TR_BL_SELECT_KEY "[R TRIM] to select file"
|
||||
#define TR_BL_FLASH_KEY "Hold [R TRIM] long to flash"
|
||||
#define TR_BL_EXIT_KEY " [L TRIM] to exit"
|
||||
#define TR_BL_ENABLE "Enable"
|
||||
#define TR_BL_DISABLE "Disable"
|
||||
#endif
|
||||
|
||||
// About screen
|
||||
|
||||
@@ -884,6 +884,7 @@
|
||||
#define TR_INTERVAL "Interval"
|
||||
#define TR_REPEAT "Opakovat"
|
||||
#define TR_ENABLE "Povoleno"
|
||||
#define TR_DISABLE "Zakazano"
|
||||
#define TR_TOPLCDTIMER "Stopky horního LCD"
|
||||
#define TR_UNIT "Jednotky"
|
||||
#define TR_TELEMETRY_NEWSENSOR INDENT "Přidat senzor ručně"
|
||||
@@ -1055,8 +1056,6 @@
|
||||
#define TR_BL_SELECT_KEY "[R TRIM] pro vybrani souboru"
|
||||
#define TR_BL_FLASH_KEY "Drzet dlouze [R TRIM] pro nahrani"
|
||||
#define TR_BL_EXIT_KEY " [L TRIM] pro ukonceni"
|
||||
#define TR_BL_ENABLE "Povoleno"
|
||||
#define TR_BL_DISABLE "Zakazano"
|
||||
#endif
|
||||
|
||||
// About screen
|
||||
|
||||
@@ -883,6 +883,7 @@
|
||||
#define TR_INTERVAL "Interval"
|
||||
#define TR_REPEAT "Gentag"
|
||||
#define TR_ENABLE "Aktiver"
|
||||
#define TR_DISABLE "Deaktiver"
|
||||
#define TR_TOPLCDTIMER "Top LCD ur"
|
||||
#define TR_UNIT "Enhed"
|
||||
#define TR_TELEMETRY_NEWSENSOR INDENT "Tilføj ny"
|
||||
@@ -1048,8 +1049,6 @@
|
||||
#define TR_BL_SELECT_KEY "[R TRIM] for at bruge fil"
|
||||
#define TR_BL_FLASH_KEY "[R TRIM] lang til for at starte"
|
||||
#define TR_BL_EXIT_KEY "[L TRIM] for at forlade"
|
||||
#define TR_BL_ENABLE "Aktiver"
|
||||
#define TR_BL_DISABLE "Deaktiver"
|
||||
#endif
|
||||
|
||||
// About screen
|
||||
|
||||
@@ -873,6 +873,7 @@
|
||||
#define TR_INTERVAL "Intervall"
|
||||
#define TR_REPEAT "Wiederholung"
|
||||
#define TR_ENABLE "Aktivieren"
|
||||
#define TR_DISABLE "Deaktivieren"
|
||||
#define TR_TOPLCDTIMER "oberer LCD Timer"
|
||||
#define TR_UNIT "Einheit"
|
||||
#define TR_TELEMETRY_NEWSENSOR INDENT "Sensor hinzufügen ..."
|
||||
@@ -1031,8 +1032,6 @@
|
||||
#define TR_BL_SELECT_KEY "[R TRIM] um Datei auszuwählen"
|
||||
#define TR_BL_FLASH_KEY "Halte [R TRIM] gedrückt, zum schreiben"
|
||||
#define TR_BL_EXIT_KEY " [L TRIM] zum beenden"
|
||||
#define TR_BL_ENABLE "Aktivieren"
|
||||
#define TR_BL_DISABLE "Deaktivieren"
|
||||
#endif
|
||||
|
||||
// Taranis Info Zeile Anzeigen
|
||||
|
||||
@@ -878,6 +878,7 @@
|
||||
#define TR_INTERVAL "Interval"
|
||||
#define TR_REPEAT "Repeat"
|
||||
#define TR_ENABLE "Enable"
|
||||
#define TR_DISABLE "Disable"
|
||||
#define TR_TOPLCDTIMER "Top LCD Timer"
|
||||
#define TR_UNIT "Unit"
|
||||
#define TR_TELEMETRY_NEWSENSOR INDENT "Add new"
|
||||
@@ -1044,8 +1045,6 @@
|
||||
#define TR_BL_SELECT_KEY "[R TRIM] to select file"
|
||||
#define TR_BL_FLASH_KEY "Hold [R TRIM] long to flash"
|
||||
#define TR_BL_EXIT_KEY " [L TRIM] to exit"
|
||||
#define TR_BL_ENABLE "Enable"
|
||||
#define TR_BL_DISABLE "Disable"
|
||||
#endif
|
||||
|
||||
// About screen
|
||||
|
||||
@@ -872,8 +872,9 @@
|
||||
#define TR_VALUE "Valor"
|
||||
#define TR_PERIOD "Period"
|
||||
#define TR_INTERVAL "Interval"
|
||||
#define TR_REPEAT "Repeat"
|
||||
#define TR_ENABLE "Enable"
|
||||
#define TR_REPEAT "Repeat"
|
||||
#define TR_ENABLE "Enable"
|
||||
#define TR_DISABLE "Disable"
|
||||
#define TR_TOPLCDTIMER "Timer LCD superior"
|
||||
#define TR_UNIT "Unidad"
|
||||
#define TR_TELEMETRY_NEWSENSOR INDENT "Añadir sensor..."
|
||||
@@ -1046,8 +1047,6 @@
|
||||
#define TR_BL_SELECT_KEY "[R TRIM] to select file"
|
||||
#define TR_BL_FLASH_KEY "Hold [R TRIM] long to flash"
|
||||
#define TR_BL_EXIT_KEY " [L TRIM] to exit"
|
||||
#define TR_BL_ENABLE "Enable"
|
||||
#define TR_BL_DISABLE "Disable"
|
||||
#endif
|
||||
|
||||
// About screen
|
||||
|
||||
@@ -888,6 +888,7 @@
|
||||
#define TR_INTERVAL "Interval"
|
||||
#define TR_REPEAT "Repeat"
|
||||
#define TR_ENABLE "Enable"
|
||||
#define TR_DISABLE "Disable"
|
||||
#define TR_TOPLCDTIMER "Top LCD Timer"
|
||||
#define TR_UNIT "Unit"
|
||||
#define TR_TELEMETRY_NEWSENSOR INDENT "Add a new sensor..."
|
||||
@@ -1059,8 +1060,6 @@
|
||||
#define TR_BL_SELECT_KEY "[R TRIM] to select file"
|
||||
#define TR_BL_FLASH_KEY "Hold [R TRIM] long to flash"
|
||||
#define TR_BL_EXIT_KEY " [L TRIM] to exit"
|
||||
#define TR_BL_ENABLE "Enable"
|
||||
#define TR_BL_DISABLE "Disable"
|
||||
#endif
|
||||
|
||||
// About screen
|
||||
|
||||
@@ -884,6 +884,7 @@
|
||||
#define TR_INTERVAL "Intervalle"
|
||||
#define TR_REPEAT "Répéter"
|
||||
#define TR_ENABLE "Activer"
|
||||
#define TR_DISABLE "Désactiver"
|
||||
#define TR_TOPLCDTIMER "Chrono LCD haut"
|
||||
#define TR_UNIT "Unité"
|
||||
#define TR_TELEMETRY_NEWSENSOR TR(INDENT"Nouveau capteur...", INDENT "Ajouter nouveau")
|
||||
@@ -1063,8 +1064,6 @@
|
||||
#define TR_BL_SELECT_KEY "[R TRIM] pour sélect. fichier"
|
||||
#define TR_BL_FLASH_KEY "Appui long [R TRIM] pour flasher"
|
||||
#define TR_BL_EXIT_KEY " [L TRIM] pour quitter"
|
||||
#define TR_BL_ENABLE "Activer"
|
||||
#define TR_BL_DISABLE "Désactiver"
|
||||
#endif
|
||||
|
||||
// About screen
|
||||
|
||||
@@ -883,6 +883,7 @@
|
||||
#define TR_INTERVAL "Interval"
|
||||
#define TR_REPEAT "מספר חזרות"
|
||||
#define TR_ENABLE "זמין"
|
||||
#define TR_DISABLE "אל תאפשר"
|
||||
#define TR_TOPLCDTIMER "Top LCD Timer"
|
||||
#define TR_UNIT "יחידה"
|
||||
#define TR_TELEMETRY_NEWSENSOR INDENT "הוסף חדש"
|
||||
@@ -1053,8 +1054,6 @@
|
||||
#define TR_BL_SELECT_KEY "[R TRIM] to select file"
|
||||
#define TR_BL_FLASH_KEY "Hold [R TRIM] long to flash"
|
||||
#define TR_BL_EXIT_KEY " [L TRIM] ליציאה"
|
||||
#define TR_BL_ENABLE "אפשר"
|
||||
#define TR_BL_DISABLE "אל תאפשר"
|
||||
#endif
|
||||
|
||||
// About screen
|
||||
|
||||
@@ -877,6 +877,7 @@
|
||||
#define TR_INTERVAL "Intervallo"
|
||||
#define TR_REPEAT "Ripeti"
|
||||
#define TR_ENABLE "Abilita"
|
||||
#define TR_DISABLE "Disabilita"
|
||||
#define TR_TOPLCDTIMER "Timer LCD Su"
|
||||
#define TR_UNIT "Unità"
|
||||
#define TR_TELEMETRY_NEWSENSOR INDENT "Aggiungi sensore"
|
||||
@@ -1043,8 +1044,6 @@
|
||||
#define TR_BL_SELECT_KEY "[R TRIM] per scegliere il file"
|
||||
#define TR_BL_FLASH_KEY "Tener premuto [R TRIM] per scrivere"
|
||||
#define TR_BL_EXIT_KEY " [L TRIM] per uscire"
|
||||
#define TR_BL_ENABLE "Abilita"
|
||||
#define TR_BL_DISABLE "Disabilita"
|
||||
#endif
|
||||
|
||||
// About screen
|
||||
|
||||
@@ -873,6 +873,7 @@
|
||||
#define TR_INTERVAL "インターバル"
|
||||
#define TR_REPEAT "リピート"
|
||||
#define TR_ENABLE "有効"
|
||||
#define TR_DISABLE "Disable"
|
||||
#define TR_TOPLCDTIMER "上部LCDタイマー"
|
||||
#define TR_UNIT "ユニット"
|
||||
#define TR_TELEMETRY_NEWSENSOR INDENT "新規追加"
|
||||
@@ -1039,8 +1040,6 @@
|
||||
#define TR_BL_SELECT_KEY "[R TRIM] to select file"
|
||||
#define TR_BL_FLASH_KEY "Hold [R TRIM] long to flash"
|
||||
#define TR_BL_EXIT_KEY " [L TRIM] to exit"
|
||||
#define TR_BL_ENABLE "Enable"
|
||||
#define TR_BL_DISABLE "Disable"
|
||||
#endif
|
||||
|
||||
// About screen
|
||||
|
||||
@@ -872,8 +872,9 @@
|
||||
#define TR_VALUE "Waarde"
|
||||
#define TR_PERIOD "Period"
|
||||
#define TR_INTERVAL "Interval"
|
||||
#define TR_REPEAT "Repeat"
|
||||
#define TR_ENABLE "Enable"
|
||||
#define TR_REPEAT "Repeat"
|
||||
#define TR_ENABLE "Enable"
|
||||
#define TR_DISABLE "Disable"
|
||||
#define TR_TOPLCDTIMER "Top LCD Timer"
|
||||
#define TR_UNIT "Eenheid"
|
||||
#define TR_TELEMETRY_NEWSENSOR INDENT "Sensor toevoegen ..."
|
||||
@@ -1051,8 +1052,6 @@
|
||||
#define TR_BL_SELECT_KEY "[R TRIM] to select file"
|
||||
#define TR_BL_FLASH_KEY "Hold [R TRIM] long to flash"
|
||||
#define TR_BL_EXIT_KEY " [L TRIM] to exit"
|
||||
#define TR_BL_ENABLE "Enable"
|
||||
#define TR_BL_DISABLE "Disable"
|
||||
#endif
|
||||
|
||||
// About screen
|
||||
|
||||
@@ -870,6 +870,7 @@
|
||||
#define TR_INTERVAL "Interwał"
|
||||
#define TR_REPEAT "Powtórz"
|
||||
#define TR_ENABLE "Włącz"
|
||||
#define TR_DISABLE "Wyłączać"
|
||||
#define TR_TOPLCDTIMER "Top LCD Timer"
|
||||
#define TR_UNIT "Jednostka"
|
||||
#define TR_TELEMETRY_NEWSENSOR INDENT "Dodaj nowy czujnik..."
|
||||
@@ -1041,8 +1042,6 @@
|
||||
#define TR_BL_SELECT_KEY "[R TRIM] aby wybrac plik"
|
||||
#define TR_BL_FLASH_KEY "Przytrzymaj [R TRIM] aby flashowac"
|
||||
#define TR_BL_EXIT_KEY " [L TRIM] aby wyjsc"
|
||||
#define TR_BL_ENABLE "Włącz"
|
||||
#define TR_BL_DISABLE "Wyłączać"
|
||||
#endif
|
||||
|
||||
// About screen
|
||||
|
||||
@@ -881,6 +881,7 @@
|
||||
#define TR_INTERVAL "Interval"
|
||||
#define TR_REPEAT "Repeat"
|
||||
#define TR_ENABLE "Enable"
|
||||
#define TR_DISABLE "Disable"
|
||||
#define TR_TOPLCDTIMER "Top LCD Timer"
|
||||
#define TR_UNIT "Unit"
|
||||
#define TR_TELEMETRY_NEWSENSOR INDENT "Adic Sensor"
|
||||
@@ -1047,8 +1048,6 @@
|
||||
#define TR_BL_SELECT_KEY "[R TRIM] to select file"
|
||||
#define TR_BL_FLASH_KEY "Hold [R TRIM] long to flash"
|
||||
#define TR_BL_EXIT_KEY " [L TRIM] to exit"
|
||||
#define TR_BL_ENABLE "Enable"
|
||||
#define TR_BL_DISABLE "Disable"
|
||||
#endif
|
||||
|
||||
// About screen
|
||||
|
||||
@@ -899,6 +899,7 @@
|
||||
#define TR_INTERVAL "Intervall"
|
||||
#define TR_REPEAT "Upprepa"
|
||||
#define TR_ENABLE "Aktivera"
|
||||
#define TR_DISABLE "Inaktivera"
|
||||
#define TR_TOPLCDTIMER "Översta LCD timer"
|
||||
#define TR_UNIT "Enhet"
|
||||
#define TR_TELEMETRY_NEWSENSOR INDENT "Lägg till..."
|
||||
@@ -1072,8 +1073,6 @@
|
||||
#define TR_BL_SELECT_KEY "[R TRIM] foer att vaelja fil"
|
||||
#define TR_BL_FLASH_KEY "Tryck [R TRIM] foer att flasha"
|
||||
#define TR_BL_EXIT_KEY " [L TRIM] för att avsluta"
|
||||
#define TR_BL_ENABLE "Aktivera"
|
||||
#define TR_BL_DISABLE "Inaktivera"
|
||||
#endif
|
||||
|
||||
// About screen
|
||||
|
||||
@@ -873,6 +873,7 @@
|
||||
#define TR_INTERVAL "間隔"
|
||||
#define TR_REPEAT "循環"
|
||||
#define TR_ENABLE "啟用"
|
||||
#define TR_DISABLE "Disable"
|
||||
#define TR_TOPLCDTIMER "Top LCD Timer"
|
||||
#define TR_UNIT "單位"
|
||||
#define TR_TELEMETRY_NEWSENSOR INDENT "添加新傳感器..."
|
||||
@@ -1039,8 +1040,6 @@
|
||||
#define TR_BL_SELECT_KEY "[R TRIM] to select file"
|
||||
#define TR_BL_FLASH_KEY "Hold [R TRIM] long to flash"
|
||||
#define TR_BL_EXIT_KEY " [L TRIM] to exit"
|
||||
#define TR_BL_ENABLE "Enable"
|
||||
#define TR_BL_DISABLE "Disable"
|
||||
#endif
|
||||
|
||||
// About screen
|
||||
|
||||
Reference in New Issue
Block a user