From 3a673cc0e5112eda548945f3df86e2e77ea4efb4 Mon Sep 17 00:00:00 2001 From: Richard Li Date: Thu, 18 Apr 2024 13:12:15 +0800 Subject: [PATCH] Unified bootloader menu for all Flysky radios --- .../src/targets/pl18/bootloader/boot_menu.cpp | 174 ++++++++++++++---- radio/src/translations/cn.h | 18 +- radio/src/translations/cz.h | 18 +- radio/src/translations/da.h | 16 +- radio/src/translations/de.h | 18 +- radio/src/translations/en.h | 18 +- radio/src/translations/es.h | 18 +- radio/src/translations/fi.h | 18 +- radio/src/translations/fr.h | 18 +- radio/src/translations/he.h | 18 +- radio/src/translations/it.h | 18 +- radio/src/translations/jp.h | 18 +- radio/src/translations/nl.h | 18 +- radio/src/translations/pl.h | 20 +- radio/src/translations/pt.h | 18 +- radio/src/translations/ru.h | 18 +- radio/src/translations/se.h | 22 ++- radio/src/translations/tw.h | 18 +- radio/src/translations/ua.h | 18 +- 19 files changed, 390 insertions(+), 112 deletions(-) diff --git a/radio/src/targets/pl18/bootloader/boot_menu.cpp b/radio/src/targets/pl18/bootloader/boot_menu.cpp index 74b431c6e..0fbea1769 100644 --- a/radio/src/targets/pl18/bootloader/boot_menu.cpp +++ b/radio/src/targets/pl18/bootloader/boot_menu.cpp @@ -19,6 +19,9 @@ * GNU General Public License for more details. */ +#include "hal/gpio.h" +#include "stm32_gpio.h" + #include "board.h" #include "fw_version.h" #include "lcd.h" @@ -30,6 +33,8 @@ #include +#define RADIO_MENU_LEN 2 + #define SELECTED_COLOR (INVERS | COLOR_THEME_SECONDARY1) #define DEFAULT_PADDING 28 #define DOUBLE_PADDING 56 @@ -53,6 +58,12 @@ LZ4BitmapBuffer BMP_USB_PLUGGED(BMP_ARGB4444, (LZ4Bitmap*)__bmp_usb_plugged); extern BitmapBuffer * lcd; +#if defined(USB_SW_GPIO) + #define USB_SW_TO_INTERNAL_MODULE() gpio_set(USB_SW_GPIO); + #define USB_SW_TO_MCU() gpio_clear(USB_SW_GPIO); + static bool rfUsbAccess = false; +#endif + void bootloaderInitScreen() { lcdInitDisplayDriver(); @@ -69,7 +80,10 @@ static void bootloaderDrawTitle(const char* text) static void bootloaderDrawFooter() { + if (LCD_W > LCD_H) lcd->drawSolidFilledRect(DEFAULT_PADDING, LCD_H - (DEFAULT_PADDING + 10), LCD_W - DOUBLE_PADDING, 2, BL_FOREGROUND); + else + lcd->drawSolidFilledRect(DEFAULT_PADDING, LCD_H - (DOUBLE_PADDING + 4), LCD_W - DOUBLE_PADDING, 2, BL_FOREGROUND); } static void bootloaderDrawBackground() @@ -89,34 +103,53 @@ void bootloaderDrawScreen(BootloaderState st, int opt, const char* str) } int center = LCD_W/2; + int menuItemX = center - 120; if (st == ST_START) { + int y = 75; bootloaderDrawTitle(BOOTLOADER_TITLE); - lcd->drawText(102, 75, LV_SYMBOL_CHARGE, BL_FOREGROUND); - coord_t pos = lcd->drawText(124, 75, TR_BL_WRITE_FW, BL_FOREGROUND); + lcd->drawText(menuItemX + 2, y, LV_SYMBOL_CHARGE, BL_FOREGROUND); + coord_t pos = lcd->drawText(menuItemX + 24, y, TR_BL_WRITE_FW, BL_FOREGROUND); pos += 8; + coord_t npos; + y += 35; #if defined(SPI_FLASH) - lcd->drawText(102, 110, LV_SYMBOL_SD_CARD, BL_FOREGROUND); - pos = lcd->drawText(124, 110, TR_BL_ERASE_FLASH, BL_FOREGROUND); - pos += 8; - - lcd->drawText(100, 145, LV_SYMBOL_NEW_LINE, BL_FOREGROUND); - lcd->drawText(124, 145, TR_BL_EXIT, BL_FOREGROUND); -#else - lcd->drawText(100, 110, LV_SYMBOL_NEW_LINE, BL_FOREGROUND); - lcd->drawText(124, 110, TR_BL_EXIT, BL_FOREGROUND); + lcd->drawText(menuItemX + 2, y, LV_SYMBOL_SD_CARD, BL_FOREGROUND); + npos = lcd->drawText(menuItemX + 24, y, TR_BL_ERASE_FLASH, BL_FOREGROUND); + npos += 8; + if (npos > pos) + pos = npos; + y += 35; #endif +#if defined(USB_SW_GPIO) + lcd->drawText(menuItemX, y, LV_SYMBOL_WIFI, BL_FOREGROUND); + npos = lcd->drawText(menuItemX + 24, y, TR_BL_RF_USB_ACCESS, BL_FOREGROUND); + npos += 8; + if (npos > pos) + pos = npos; + y += 35; +#endif + lcd->drawText(menuItemX, y, LV_SYMBOL_NEW_LINE, BL_FOREGROUND); + lcd->drawText(menuItemX + 24, y, TR_BL_EXIT, BL_FOREGROUND); - pos -= 92; - lcd->drawSolidRect(92, 72 + (opt * 35), pos, 26, 2, BL_SELECTED); - - lcd->drawBitmap(60, 214, (const BitmapBuffer*)&BMP_PLUG_USB); - lcd->drawText(195, 223, TR_BL_USB_PLUGIN, BL_FOREGROUND); - lcd->drawText(195, 248, TR_BL_USB_MASS_STORE, BL_FOREGROUND); + pos -= menuItemX - 8; + lcd->drawSolidRect(menuItemX - 8, 72 + (opt * 35), pos, 26, 2, BL_SELECTED); + + if (LCD_W > LCD_H) { + lcd->drawBitmap(menuItemX - 40, LCD_H - 106, (const BitmapBuffer*)&BMP_PLUG_USB); + lcd->drawText(menuItemX + 95, LCD_H - 97, TR_BL_USB_PLUGIN, BL_FOREGROUND); + lcd->drawText(menuItemX + 95, LCD_H - 72, TR_BL_USB_MASS_STORE, BL_FOREGROUND); + } else { + lcd->drawBitmap(center - 55, LCD_H - DEFAULT_PADDING - 157, (const BitmapBuffer*)&BMP_PLUG_USB); + lcd->drawText(center, LCD_H - DEFAULT_PADDING - 97, TR_BL_USB_PLUGIN, CENTERED | BL_FOREGROUND); + lcd->drawText(center, LCD_H - DEFAULT_PADDING - 72, TR_BL_USB_MASS_STORE, CENTERED | BL_FOREGROUND); + } bootloaderDrawFooter(); + if (LCD_W < LCD_H) + lcd->drawText(center, LCD_H - DOUBLE_PADDING, TR_BL_CURRENT_FW, CENTERED | BL_FOREGROUND); lcd->drawText(center, LCD_H - DEFAULT_PADDING, getFirmwareVersion(), CENTERED | BL_FOREGROUND); } #if defined(SPI_FLASH) @@ -124,21 +157,28 @@ void bootloaderDrawScreen(BootloaderState st, int opt, const char* str) bootloaderDrawTitle(TR_BL_ERASE_INT_FLASH); - lcd->drawText(102, 75, LV_SYMBOL_SD_CARD, BL_FOREGROUND); - coord_t pos = lcd->drawText(124, 75, TR_BL_ERASE_FLASH, BL_FOREGROUND); + lcd->drawText(menuItemX + 2, 75, LV_SYMBOL_SD_CARD, BL_FOREGROUND); + coord_t pos = lcd->drawText(menuItemX + 24, 75, TR_BL_ERASE_FLASH, BL_FOREGROUND); pos += 8; - lcd->drawText(100, 110, LV_SYMBOL_NEW_LINE, BL_FOREGROUND); - lcd->drawText(124, 110, TR_BL_EXIT, BL_FOREGROUND); + lcd->drawText(menuItemX, 110, LV_SYMBOL_NEW_LINE, BL_FOREGROUND); + lcd->drawText(menuItemX + 24, 110, TR_BL_EXIT, BL_FOREGROUND); - pos -= 92; - lcd->drawSolidRect(92, 72 + (opt * 35), pos, 26, 2, BL_SELECTED); + pos -= menuItemX - 8; + lcd->drawSolidRect(menuItemX - 8, 72 + (opt * 35), pos, 26, 2, BL_SELECTED); bootloaderDrawFooter(); - lcd->drawText(DEFAULT_PADDING, LCD_H - DEFAULT_PADDING, - LV_SYMBOL_SD_CARD TR_BL_ERASE_KEY, BL_FOREGROUND); - lcd->drawText(305, LCD_H - DEFAULT_PADDING, - LV_SYMBOL_NEW_LINE TR_BL_EXIT_KEY, BL_FOREGROUND); + if (LCD_W > LCD_H) { + lcd->drawText(DEFAULT_PADDING, LCD_H - DEFAULT_PADDING, + LV_SYMBOL_SD_CARD " " TR_BL_ERASE_KEY, BL_FOREGROUND); + lcd->drawText(LCD_W - 175, LCD_H - DEFAULT_PADDING, + LV_SYMBOL_NEW_LINE " " TR_BL_EXIT_KEY, BL_FOREGROUND); + } else { + lcd->drawText(DOUBLE_PADDING, LCD_H - DOUBLE_PADDING, + LV_SYMBOL_SD_CARD " " TR_BL_ERASE_KEY, BL_FOREGROUND); + lcd->drawText(DOUBLE_PADDING, LCD_H - DEFAULT_PADDING, + LV_SYMBOL_NEW_LINE " " TR_BL_EXIT_KEY, BL_FOREGROUND); + } } else if (st == ST_CLEAR_FLASH) { bootloaderDrawTitle(TR_BL_ERASE_INT_FLASH); @@ -147,7 +187,21 @@ void bootloaderDrawScreen(BootloaderState st, int opt, const char* str) bootloaderDrawFooter(); } #endif +#if defined(USB_SW_GPIO) + else if (st == ST_RADIO_MENU) { + bootloaderDrawTitle(TR_BL_RF_USB_ACCESS); + lcd->drawText(menuItemX + 2, 75, LV_SYMBOL_USB, BL_FOREGROUND); + coord_t pos = lcd->drawText(menuItemX + 24, 75, rfUsbAccess ? TR_BL_DISABLE : TR_BL_ENABLE, BL_FOREGROUND); + pos += 8; + + lcd->drawText(menuItemX + 2, 110, LV_SYMBOL_NEW_LINE, BL_FOREGROUND); + lcd->drawText(menuItemX + 24, 110, TR_BL_EXIT, BL_FOREGROUND); + + pos -= menuItemX - 8; + lcd->drawSolidRect(menuItemX - 8, 72 + (opt * 35), pos, 26, 2, BL_SELECTED); + } +#endif else if (st == ST_USB) { lcd->drawBitmap(center - 26, 98, (const BitmapBuffer*)&BMP_USB_PLUGGED); lcd->drawText(center, 168, TR_BL_USB_CONNECTED, CENTERED | BL_FOREGROUND); @@ -221,24 +275,32 @@ void bootloaderDrawScreen(BootloaderState st, int opt, const char* str) if (st != ST_DIR_CHECK && (st != ST_FLASH_CHECK || opt == FC_OK)) { + int padding = DOUBLE_PADDING; + if (LCD_W > LCD_H) + padding = DEFAULT_PADDING; if (st == ST_FILE_LIST) { - lcd->drawText(DEFAULT_PADDING, LCD_H - DEFAULT_PADDING, - LV_SYMBOL_CHARGE TR_BL_SELECT_KEY, BL_FOREGROUND); + lcd->drawText(padding, LCD_H - padding, + LV_SYMBOL_CHARGE " " TR_BL_SELECT_KEY, BL_FOREGROUND); } else if (st == ST_FLASH_CHECK && opt == FC_OK) { - lcd->drawText(DEFAULT_PADDING, LCD_H - DEFAULT_PADDING, - LV_SYMBOL_CHARGE TR_BL_FLASH_KEY, BL_FOREGROUND); + lcd->drawText(padding, LCD_H - padding, + LV_SYMBOL_CHARGE " " TR_BL_FLASH_KEY, BL_FOREGROUND); } else if (st == ST_FLASHING) { - lcd->drawText(DEFAULT_PADDING, LCD_H - DEFAULT_PADDING, - LV_SYMBOL_CHARGE TR_BL_WRITING_FW, BL_FOREGROUND); + lcd->drawText(padding, LCD_H - padding, + LV_SYMBOL_CHARGE " " TR_BL_WRITING_FW, BL_FOREGROUND); } else if (st == ST_FLASH_DONE) { - lcd->drawText(DEFAULT_PADDING, LCD_H - DEFAULT_PADDING, - LV_SYMBOL_CHARGE TR_BL_WRITING_COMPL, BL_FOREGROUND); + lcd->drawText(padding, LCD_H - padding, + LV_SYMBOL_CHARGE " " TR_BL_WRITING_COMPL, BL_FOREGROUND); } } if (st != ST_FLASHING) { - lcd->drawText(305, LCD_H - DEFAULT_PADDING, - LV_SYMBOL_NEW_LINE TR_BL_EXIT_KEY, BL_FOREGROUND); + if (LCD_W > LCD_H) { + lcd->drawText(LCD_W - 175, LCD_H - DEFAULT_PADDING, + LV_SYMBOL_NEW_LINE " " TR_BL_EXIT_KEY, BL_FOREGROUND); + } else { + lcd->drawText(DOUBLE_PADDING, LCD_H - DEFAULT_PADDING, + LV_SYMBOL_NEW_LINE " " TR_BL_EXIT_KEY, BL_FOREGROUND); + } } } _first_screen = false; @@ -256,12 +318,50 @@ void bootloaderDrawFilename(const char* str, uint8_t line, bool selected) } uint32_t bootloaderGetMenuItemCount(int baseCount) { +#if defined(USB_SW_GPIO) + return baseCount+1; +#else return baseCount; +#endif } bool bootloaderRadioMenu(uint32_t menuItem, event_t event) { +#if defined(USB_SW_GPIO) + static int pos = 0; + + if (event == EVT_KEY_FIRST(KEY_DOWN)) { + if (pos < RADIO_MENU_LEN-1) + pos++; + } else if (event == EVT_KEY_FIRST(KEY_UP)) { + if (pos > 0) + pos--; + } else if (event == EVT_KEY_BREAK(KEY_ENTER)) { + switch (pos) { + case 0: + if (rfUsbAccess) + { + rfUsbAccess = false; + INTERNAL_MODULE_OFF(); + USB_SW_TO_MCU(); + } else { + rfUsbAccess = true; + INTERNAL_MODULE_ON(); + USB_SW_TO_INTERNAL_MODULE(); + } + break; + case 1: // fall through + default: + USB_SW_TO_MCU(); + pos = 0; + return true; + } + } + bootloaderDrawScreen(ST_RADIO_MENU, pos, nullptr); + return false; +#else return true; +#endif } void blExit(void) diff --git a/radio/src/translations/cn.h b/radio/src/translations/cn.h index 820a884de..80558106b 100644 --- a/radio/src/translations/cn.h +++ b/radio/src/translations/cn.h @@ -1070,10 +1070,20 @@ #define TR_BL_ENABLE "Enable" #define TR_BL_DISABLE "Disable" #elif defined(PCBPL18) - #define TR_BL_SELECT_KEY " [TR4 Dn] to select file" - #define TR_BL_FLASH_KEY " Hold [TR4 Dn] long to flash" - #define TR_BL_ERASE_KEY " Hold [TR4 Dn] long to erase" - #define TR_BL_EXIT_KEY " [TR4 Up] to exit" + // Bootloader PL18/NB4+ specific - ASCII characters only + #define TR_BL_ENABLE "Enable" + #define TR_BL_DISABLE "Disable" + #if defined(RADIO_NB4P) + #define TR_BL_SELECT_KEY "[SW2] to select file" + #define TR_BL_FLASH_KEY "Hold [SW2] long to flash" + #define TR_BL_ERASE_KEY "Hold [SW2] long to erase" + #define TR_BL_EXIT_KEY "[SW3] to exit" + #else + #define TR_BL_SELECT_KEY "[TR4 Dn] to select file" + #define TR_BL_FLASH_KEY "Hold [TR4 Dn] long to flash" + #define TR_BL_ERASE_KEY "Hold [TR4 Dn] long to erase" + #define TR_BL_EXIT_KEY "[TR4 Up] to exit" + #endif #else #define TR_BL_SELECT_KEY "[ENT] to select file" #define TR_BL_FLASH_KEY "Hold [ENT] long to flash" diff --git a/radio/src/translations/cz.h b/radio/src/translations/cz.h index 0dbb41989..1ed9f27b7 100644 --- a/radio/src/translations/cz.h +++ b/radio/src/translations/cz.h @@ -1085,10 +1085,20 @@ #define TR_BL_ENABLE "Povoleno" #define TR_BL_DISABLE "Zakazano" #elif defined(PCBPL18) - #define TR_BL_SELECT_KEY " [TR4 Dn] to select file" - #define TR_BL_FLASH_KEY " Hold [TR4 Dn] long to flash" - #define TR_BL_ERASE_KEY " Hold [TR4 Dn] long to erase" - #define TR_BL_EXIT_KEY " [TR4 Up] to exit" + // Bootloader PL18/NB4+ specific - ASCII characters only + #define TR_BL_ENABLE "Povoleno" + #define TR_BL_DISABLE "Zakazano" + #if defined(RADIO_NB4P) + #define TR_BL_SELECT_KEY "[SW2] to select file" + #define TR_BL_FLASH_KEY "Hold [SW2] long to flash" + #define TR_BL_ERASE_KEY "Hold [SW2] long to erase" + #define TR_BL_EXIT_KEY "[SW3] to exit" + #else + #define TR_BL_SELECT_KEY "[TR4 Dn] to select file" + #define TR_BL_FLASH_KEY "Hold [TR4 Dn] long to flash" + #define TR_BL_ERASE_KEY "Hold [TR4 Dn] long to erase" + #define TR_BL_EXIT_KEY "[TR4 Up] to exit" + #endif #else #define TR_BL_SELECT_KEY "[ENT] pro vybrani souboru" #define TR_BL_FLASH_KEY "Drzet dlouze [ENT] pro nahrani" diff --git a/radio/src/translations/da.h b/radio/src/translations/da.h index 06052db5a..4d9949021 100644 --- a/radio/src/translations/da.h +++ b/radio/src/translations/da.h @@ -1073,10 +1073,18 @@ #define TR_BL_ENABLE "Aktiver" #define TR_BL_DISABLE "Deaktiver" #elif defined(PCBPL18) - #define TR_BL_SELECT_KEY " [TR4 Dn] for at bruge fil" - #define TR_BL_FLASH_KEY " Hold [TR4 Dn] længe, for brænding" - #define TR_BL_ERASE_KEY " Hold [TR4 Dn] længe, for sletning" - #define TR_BL_EXIT_KEY " [TR4 Up] for at forlade" + // Bootloader PL18/NB4+ specific - ASCII characters only + #if defined(RADIO_NB4P) + #define TR_BL_SELECT_KEY "[SW2] for at bruge fil" + #define TR_BL_FLASH_KEY "Hold [SW2] længe, for brænding" + #define TR_BL_ERASE_KEY "Hold [SW2] længe, for sletning" + #define TR_BL_EXIT_KEY "[SW3] for at forlade" + #else + #define TR_BL_SELECT_KEY "[TR4 Dn] for at bruge fil" + #define TR_BL_FLASH_KEY "Hold [TR4 Dn] længe, for brænding" + #define TR_BL_ERASE_KEY "Hold [TR4 Dn] længe, for sletning" + #define TR_BL_EXIT_KEY "[TR4 Up] for at forlade" + #endif #else #define TR_BL_SELECT_KEY "[ENT] for at bruge fil" #define TR_BL_FLASH_KEY "[ENT] længe, for at starte" diff --git a/radio/src/translations/de.h b/radio/src/translations/de.h index df78410d2..0e49bd971 100644 --- a/radio/src/translations/de.h +++ b/radio/src/translations/de.h @@ -1063,10 +1063,20 @@ #define TR_BL_ENABLE "Aktivieren" #define TR_BL_DISABLE "Deaktivieren" #elif defined(PCBPL18) - #define TR_BL_SELECT_KEY " [TR4 Dn] to select file" - #define TR_BL_FLASH_KEY " Hold [TR4 Dn] long to flash" - #define TR_BL_ERASE_KEY " Hold [TR4 Dn] long to erase" - #define TR_BL_EXIT_KEY " [TR4 Up] to exit" + // Bootloader PL18/NB4+ specific - ASCII characters only + #define TR_BL_ENABLE "Aktivieren" + #define TR_BL_DISABLE "Deaktivieren" + #if defined(RADIO_NB4P) + #define TR_BL_SELECT_KEY "[SW2] to select file" + #define TR_BL_FLASH_KEY "Hold [SW2] long to flash" + #define TR_BL_ERASE_KEY "Hold [SW2] long to erase" + #define TR_BL_EXIT_KEY "[SW3] to exit" + #else + #define TR_BL_SELECT_KEY "[TR4 Dn] to select file" + #define TR_BL_FLASH_KEY "Hold [TR4 Dn] long to flash" + #define TR_BL_ERASE_KEY "Hold [TR4 Dn] long to erase" + #define TR_BL_EXIT_KEY "[TR4 Up] to exit" + #endif #else #define TR_BL_SELECT_KEY "[ENT] um Datei auszuwählen" #define TR_BL_FLASH_KEY "Halte [ENT] gedrückt, zum schreiben" diff --git a/radio/src/translations/en.h b/radio/src/translations/en.h index 9ee619ee7..54f6c69ff 100644 --- a/radio/src/translations/en.h +++ b/radio/src/translations/en.h @@ -1076,10 +1076,20 @@ #define TR_BL_ENABLE "Enable" #define TR_BL_DISABLE "Disable" #elif defined(PCBPL18) - #define TR_BL_SELECT_KEY " [TR4 Dn] to select file" - #define TR_BL_FLASH_KEY " Hold [TR4 Dn] long to flash" - #define TR_BL_ERASE_KEY " Hold [TR4 Dn] long to erase" - #define TR_BL_EXIT_KEY " [TR4 Up] to exit" + // Bootloader PL18/NB4+ specific - ASCII characters only + #define TR_BL_ENABLE "Enable" + #define TR_BL_DISABLE "Disable" + #if defined(RADIO_NB4P) + #define TR_BL_SELECT_KEY "[SW2] to select file" + #define TR_BL_FLASH_KEY "Hold [SW2] long to flash" + #define TR_BL_ERASE_KEY "Hold [SW2] long to erase" + #define TR_BL_EXIT_KEY "[SW3] to exit" + #else + #define TR_BL_SELECT_KEY "[TR4 Dn] to select file" + #define TR_BL_FLASH_KEY "Hold [TR4 Dn] long to flash" + #define TR_BL_ERASE_KEY "Hold [TR4 Dn] long to erase" + #define TR_BL_EXIT_KEY "[TR4 Up] to exit" + #endif #else #define TR_BL_SELECT_KEY "[ENT] to select file" #define TR_BL_FLASH_KEY "Hold [ENT] long to flash" diff --git a/radio/src/translations/es.h b/radio/src/translations/es.h index 232a081e5..f7391b56e 100644 --- a/radio/src/translations/es.h +++ b/radio/src/translations/es.h @@ -1071,10 +1071,20 @@ #define TR_BL_ENABLE "Enable" #define TR_BL_DISABLE "Disable" #elif defined(PCBPL18) - #define TR_BL_SELECT_KEY " [TR4 Dn] to select file" - #define TR_BL_FLASH_KEY " Hold [TR4 Dn] long to flash" - #define TR_BL_ERASE_KEY " Hold [TR4 Dn] long to erase" - #define TR_BL_EXIT_KEY " [TR4 Up] to exit" + // Bootloader PL18/NB4+ specific - ASCII characters only + #define TR_BL_ENABLE "Enable" + #define TR_BL_DISABLE "Disable" + #if defined(RADIO_NB4P) + #define TR_BL_SELECT_KEY "[SW2] to select file" + #define TR_BL_FLASH_KEY "Hold [SW2] long to flash" + #define TR_BL_ERASE_KEY "Hold [SW2] long to erase" + #define TR_BL_EXIT_KEY "[SW3] to exit" + #else + #define TR_BL_SELECT_KEY "[TR4 Dn] to select file" + #define TR_BL_FLASH_KEY "Hold [TR4 Dn] long to flash" + #define TR_BL_ERASE_KEY "Hold [TR4 Dn] long to erase" + #define TR_BL_EXIT_KEY "[TR4 Up] to exit" + #endif #else #define TR_BL_SELECT_KEY "[ENT] to select file" #define TR_BL_FLASH_KEY "Hold [ENT] long to flash" diff --git a/radio/src/translations/fi.h b/radio/src/translations/fi.h index 1d194682c..56413e503 100644 --- a/radio/src/translations/fi.h +++ b/radio/src/translations/fi.h @@ -1083,10 +1083,20 @@ #define TR_BL_ENABLE "Enable" #define TR_BL_DISABLE "Disable" #elif defined(PCBPL18) - #define TR_BL_SELECT_KEY " [TR4 Dn] to select file" - #define TR_BL_FLASH_KEY " Hold [TR4 Dn] long to flash" - #define TR_BL_ERASE_KEY " Hold [TR4 Dn] long to erase" - #define TR_BL_EXIT_KEY " [TR4 Up] to exit" + // Bootloader PL18/NB4+ specific - ASCII characters only + #define TR_BL_ENABLE "Enable" + #define TR_BL_DISABLE "Disable" + #if defined(RADIO_NB4P) + #define TR_BL_SELECT_KEY "[SW2] to select file" + #define TR_BL_FLASH_KEY "Hold [SW2] long to flash" + #define TR_BL_ERASE_KEY "Hold [SW2] long to erase" + #define TR_BL_EXIT_KEY "[SW3] to exit" + #else + #define TR_BL_SELECT_KEY "[TR4 Dn] to select file" + #define TR_BL_FLASH_KEY "Hold [TR4 Dn] long to flash" + #define TR_BL_ERASE_KEY "Hold [TR4 Dn] long to erase" + #define TR_BL_EXIT_KEY "[TR4 Up] to exit" + #endif #else #define TR_BL_SELECT_KEY "[ENT] to select file" #define TR_BL_FLASH_KEY "Hold [ENT] long to flash" diff --git a/radio/src/translations/fr.h b/radio/src/translations/fr.h index 5d2a8b942..e2ad9fd1b 100644 --- a/radio/src/translations/fr.h +++ b/radio/src/translations/fr.h @@ -1084,10 +1084,20 @@ #define TR_BL_ENABLE "Activer" #define TR_BL_DISABLE "Désactiver" #elif defined(PCBPL18) - #define TR_BL_SELECT_KEY " [TR4 Dn] to select file" - #define TR_BL_FLASH_KEY " Hold [TR4 Dn] long to flash" - #define TR_BL_ERASE_KEY " Hold [TR4 Dn] long to erase" - #define TR_BL_EXIT_KEY " [TR4 Up] to exit" + // Bootloader PL18/NB4+ specific - ASCII characters only + #define TR_BL_ENABLE "Activer" + #define TR_BL_DISABLE "Désactiver" + #if defined(RADIO_NB4P) + #define TR_BL_SELECT_KEY "[SW2] to select file" + #define TR_BL_FLASH_KEY "Hold [SW2] long to flash" + #define TR_BL_ERASE_KEY "Hold [SW2] long to erase" + #define TR_BL_EXIT_KEY "[SW3] to exit" + #else + #define TR_BL_SELECT_KEY "[TR4 Dn] to select file" + #define TR_BL_FLASH_KEY "Hold [TR4 Dn] long to flash" + #define TR_BL_ERASE_KEY "Hold [TR4 Dn] long to erase" + #define TR_BL_EXIT_KEY "[TR4 Up] to exit" + #endif #else #define TR_BL_SELECT_KEY "[ENT] pour select. fichier" #define TR_BL_FLASH_KEY "Appui long [ENT] pour flasher" diff --git a/radio/src/translations/he.h b/radio/src/translations/he.h index 56d9998fd..9717675fb 100644 --- a/radio/src/translations/he.h +++ b/radio/src/translations/he.h @@ -1073,10 +1073,20 @@ #define TR_BL_ENABLE "Enable" #define TR_BL_DISABLE "Disable" #elif defined(PCBPL18) - #define TR_BL_SELECT_KEY " [TR4 Dn] to select file" - #define TR_BL_FLASH_KEY " Hold [TR4 Dn] long to flash" - #define TR_BL_ERASE_KEY " Hold [TR4 Dn] long to erase" - #define TR_BL_EXIT_KEY " [TR4 Up] to exit" + // Bootloader PL18/NB4+ specific - ASCII characters only + #define TR_BL_ENABLE "Enable" + #define TR_BL_DISABLE "Disable" + #if defined(RADIO_NB4P) + #define TR_BL_SELECT_KEY "[SW2] to select file" + #define TR_BL_FLASH_KEY "Hold [SW2] long to flash" + #define TR_BL_ERASE_KEY "Hold [SW2] long to erase" + #define TR_BL_EXIT_KEY "[SW3] to exit" + #else + #define TR_BL_SELECT_KEY "[TR4 Dn] to select file" + #define TR_BL_FLASH_KEY "Hold [TR4 Dn] long to flash" + #define TR_BL_ERASE_KEY "Hold [TR4 Dn] long to erase" + #define TR_BL_EXIT_KEY "[TR4 Up] to exit" + #endif #else #define TR_BL_SELECT_KEY "[ENT] to select file" #define TR_BL_FLASH_KEY "Hold [ENT] long to flash" diff --git a/radio/src/translations/it.h b/radio/src/translations/it.h index 6a4d934b6..f64cd2d46 100644 --- a/radio/src/translations/it.h +++ b/radio/src/translations/it.h @@ -1067,10 +1067,20 @@ #define TR_BL_ENABLE "Abilita" #define TR_BL_DISABLE "Disabilita" #elif defined(PCBPL18) - #define TR_BL_SELECT_KEY " [TR4 Dn] to select file" - #define TR_BL_FLASH_KEY " Hold [TR4 Dn] long to flash" - #define TR_BL_ERASE_KEY " Hold [TR4 Dn] long to erase" - #define TR_BL_EXIT_KEY " [TR4 Up] to exit" + // Bootloader PL18/NB4+ specific - ASCII characters only + #define TR_BL_ENABLE "Abilita" + #define TR_BL_DISABLE "Disabilita" + #if defined(RADIO_NB4P) + #define TR_BL_SELECT_KEY "[SW2] to select file" + #define TR_BL_FLASH_KEY "Hold [SW2] long to flash" + #define TR_BL_ERASE_KEY "Hold [SW2] long to erase" + #define TR_BL_EXIT_KEY "[SW3] to exit" + #else + #define TR_BL_SELECT_KEY "[TR4 Dn] to select file" + #define TR_BL_FLASH_KEY "Hold [TR4 Dn] long to flash" + #define TR_BL_ERASE_KEY "Hold [TR4 Dn] long to erase" + #define TR_BL_EXIT_KEY "[TR4 Up] to exit" + #endif #else #define TR_BL_SELECT_KEY "[ENT] per scegliere il file" #define TR_BL_FLASH_KEY "Tenere premuto [ENT] per scrivere" diff --git a/radio/src/translations/jp.h b/radio/src/translations/jp.h index cbe938337..ea1f12861 100644 --- a/radio/src/translations/jp.h +++ b/radio/src/translations/jp.h @@ -1073,10 +1073,20 @@ #define TR_BL_ENABLE "Enable" #define TR_BL_DISABLE "Disable" #elif defined(PCBPL18) - #define TR_BL_SELECT_KEY " [TR4 Dn] to select file" - #define TR_BL_FLASH_KEY " Hold [TR4 Dn] long to flash" - #define TR_BL_ERASE_KEY " Hold [TR4 Dn] long to erase" - #define TR_BL_EXIT_KEY " [TR4 Up] to exit" + // Bootloader PL18/NB4+ specific - ASCII characters only + #define TR_BL_ENABLE "Enable" + #define TR_BL_DISABLE "Disable" + #if defined(RADIO_NB4P) + #define TR_BL_SELECT_KEY "[SW2] to select file" + #define TR_BL_FLASH_KEY "Hold [SW2] long to flash" + #define TR_BL_ERASE_KEY "Hold [SW2] long to erase" + #define TR_BL_EXIT_KEY "[SW3] to exit" + #else + #define TR_BL_SELECT_KEY "[TR4 Dn] to select file" + #define TR_BL_FLASH_KEY "Hold [TR4 Dn] long to flash" + #define TR_BL_ERASE_KEY "Hold [TR4 Dn] long to erase" + #define TR_BL_EXIT_KEY "[TR4 Up] to exit" + #endif #else #define TR_BL_SELECT_KEY "[ENT] to select file" #define TR_BL_FLASH_KEY "Hold [ENT] long to flash" diff --git a/radio/src/translations/nl.h b/radio/src/translations/nl.h index fa8a80d5e..655fab201 100644 --- a/radio/src/translations/nl.h +++ b/radio/src/translations/nl.h @@ -1076,10 +1076,20 @@ #define TR_BL_ENABLE "Enable" #define TR_BL_DISABLE "Disable" #elif defined(PCBPL18) - #define TR_BL_SELECT_KEY " [TR4 Dn] to select file" - #define TR_BL_FLASH_KEY " Hold [TR4 Dn] long to flash" - #define TR_BL_ERASE_KEY " Hold [TR4 Dn] long to erase" - #define TR_BL_EXIT_KEY " [TR4 Up] to exit" + // Bootloader PL18/NB4+ specific - ASCII characters only + #define TR_BL_ENABLE "Enable" + #define TR_BL_DISABLE "Disable" + #if defined(RADIO_NB4P) + #define TR_BL_SELECT_KEY "[SW2] to select file" + #define TR_BL_FLASH_KEY "Hold [SW2] long to flash" + #define TR_BL_ERASE_KEY "Hold [SW2] long to erase" + #define TR_BL_EXIT_KEY "[SW3] to exit" + #else + #define TR_BL_SELECT_KEY "[TR4 Dn] to select file" + #define TR_BL_FLASH_KEY "Hold [TR4 Dn] long to flash" + #define TR_BL_ERASE_KEY "Hold [TR4 Dn] long to erase" + #define TR_BL_EXIT_KEY "[TR4 Up] to exit" + #endif #else #define TR_BL_SELECT_KEY "[ENT] to select file" #define TR_BL_FLASH_KEY "Hold [ENT] long to flash" diff --git a/radio/src/translations/pl.h b/radio/src/translations/pl.h index a3782b0fa..8ed7cf0d6 100644 --- a/radio/src/translations/pl.h +++ b/radio/src/translations/pl.h @@ -1070,14 +1070,24 @@ #define TR_BL_ENABLE "Enable" #define TR_BL_DISABLE "Disable" #elif defined(PCBPL18) - #define TR_BL_SELECT_KEY " [TR4 Dn] to select file" - #define TR_BL_FLASH_KEY " Hold [TR4 Dn] long to flash" - #define TR_BL_ERASE_KEY " Hold [TR4 Dn] long to erase" - #define TR_BL_EXIT_KEY " [TR4 Up] to exit" + // Bootloader PL18/NB4+ specific - ASCII characters only + #define TR_BL_ENABLE "Enable" + #define TR_BL_DISABLE "Disable" + #if defined(RADIO_NB4P) + #define TR_BL_SELECT_KEY "[SW2] aby wybrac plik" + #define TR_BL_FLASH_KEY "Przytrzymaj [SW2] aby flashowac" + #define TR_BL_ERASE_KEY "Przytrzymaj [SW2] long to erase" + #define TR_BL_EXIT_KEY "[SW3] aby wyjsc" + #else + #define TR_BL_SELECT_KEY "[TR4 Dn] aby wybrac plik" + #define TR_BL_FLASH_KEY "Przytrzymaj [TR4 Dn] aby flashowac" + #define TR_BL_ERASE_KEY "Przytrzymaj [TR4 Dn] long to erase" + #define TR_BL_EXIT_KEY "[TR4 Up] aby wyjsc" + #endif #else #define TR_BL_SELECT_KEY "[ENT] aby wybrac plik" #define TR_BL_FLASH_KEY "Przytrzymaj [ENT] aby flashowac" - #define TR_BL_ERASE_KEY "Hold [ENT] long to erase" + #define TR_BL_ERASE_KEY "Przytrzymaj [ENT] long to erase" #define TR_BL_EXIT_KEY "[RTN] aby wyjsc" #endif diff --git a/radio/src/translations/pt.h b/radio/src/translations/pt.h index 07b1f5fac..235f00b71 100644 --- a/radio/src/translations/pt.h +++ b/radio/src/translations/pt.h @@ -1077,10 +1077,20 @@ #define TR_BL_ENABLE "Enable" #define TR_BL_DISABLE "Disable" #elif defined(PCBPL18) - #define TR_BL_SELECT_KEY " [TR4 Dn] to select file" - #define TR_BL_FLASH_KEY " Hold [TR4 Dn] long to flash" - #define TR_BL_ERASE_KEY " Hold [TR4 Dn] long to erase" - #define TR_BL_EXIT_KEY " [TR4 Up] to exit" + // Bootloader PL18/NB4+ specific - ASCII characters only + #define TR_BL_ENABLE "Enable" + #define TR_BL_DISABLE "Disable" + #if defined(RADIO_NB4P) + #define TR_BL_SELECT_KEY "[SW2] to select file" + #define TR_BL_FLASH_KEY "Hold [SW2] long to flash" + #define TR_BL_ERASE_KEY "Hold [SW2] long to erase" + #define TR_BL_EXIT_KEY "[SW3] to exit" + #else + #define TR_BL_SELECT_KEY "[TR4 Dn] to select file" + #define TR_BL_FLASH_KEY "Hold [TR4 Dn] long to flash" + #define TR_BL_ERASE_KEY "Hold [TR4 Dn] long to erase" + #define TR_BL_EXIT_KEY "[TR4 Up] to exit" + #endif #else #define TR_BL_SELECT_KEY "[ENT] to select file" #define TR_BL_FLASH_KEY "Hold [ENT] long to flash" diff --git a/radio/src/translations/ru.h b/radio/src/translations/ru.h index 8ac19ddb3..e27e4b0a5 100644 --- a/radio/src/translations/ru.h +++ b/radio/src/translations/ru.h @@ -1076,10 +1076,20 @@ #define TR_BL_ENABLE "Enable" #define TR_BL_DISABLE "Disable" #elif defined(PCBPL18) - #define TR_BL_SELECT_KEY " [TR4 Dn] to select file" - #define TR_BL_FLASH_KEY " Hold [TR4 Dn] long to flash" - #define TR_BL_ERASE_KEY " Hold [TR4 Dn] long to erase" - #define TR_BL_EXIT_KEY " [TR4 Up] to exit" + // Bootloader PL18/NB4+ specific - ASCII characters only + #define TR_BL_ENABLE "Enable" + #define TR_BL_DISABLE "Disable" + #if defined(RADIO_NB4P) + #define TR_BL_SELECT_KEY "[SW2] to select file" + #define TR_BL_FLASH_KEY "Hold [SW2] long to flash" + #define TR_BL_ERASE_KEY "Hold [SW2] long to erase" + #define TR_BL_EXIT_KEY "[SW3] to exit" + #else + #define TR_BL_SELECT_KEY "[TR4 Dn] to select file" + #define TR_BL_FLASH_KEY "Hold [TR4 Dn] long to flash" + #define TR_BL_ERASE_KEY "Hold [TR4 Dn] long to erase" + #define TR_BL_EXIT_KEY "[TR4 Up] to exit" + #endif #else #define TR_BL_SELECT_KEY "[ENT] to select file" #define TR_BL_FLASH_KEY "Hold [ENT] long to flash" diff --git a/radio/src/translations/se.h b/radio/src/translations/se.h index 1da49a6ad..40b55e8f6 100644 --- a/radio/src/translations/se.h +++ b/radio/src/translations/se.h @@ -1098,14 +1098,24 @@ #define TR_BL_ENABLE "Aktivera" #define TR_BL_DISABLE "Inaktivera" #elif defined(PCBPL18) - #define TR_BL_SELECT_KEY " Tryck [TR4 Ner] foer att vaelja fil" - #define TR_BL_FLASH_KEY " Haall [TR4 Ner] foer att flasha" - #define TR_BL_ERASE_KEY " Haall [TR4 Ner] foer att radera" - #define TR_BL_EXIT_KEY " Tryck [TR4 Upp] foer att avbryta" + // Bootloader PL18/NB4+ specific - ASCII characters only + #define TR_BL_ENABLE "Aktivera" + #define TR_BL_DISABLE "Inaktivera" + #if defined(RADIO_NB4P) + #define TR_BL_SELECT_KEY "[SW2] för att vaelja fil" + #define TR_BL_FLASH_KEY "Haall [SW2] foer att flasha" + #define TR_BL_ERASE_KEY "Haall [SW2] foer att radera" + #define TR_BL_EXIT_KEY "[SW3] to exit" + #else + #define TR_BL_SELECT_KEY "[TR4 Ner] för att vaelja fil" + #define TR_BL_FLASH_KEY "Haall [TR4 Ner] foer att flasha" + #define TR_BL_ERASE_KEY "Haall [TR4 Ner] foer att radera" + #define TR_BL_EXIT_KEY "[TR4 Upp] foer att avbryta" + #endif #else #define TR_BL_SELECT_KEY "[ENT] för att vaelja fil" - #define TR_BL_FLASH_KEY "Tryck [ENT] foer att flasha" - #define TR_BL_ERASE_KEY "Haall ner [ENT] foer att raderag" + #define TR_BL_FLASH_KEY "Haall [ENT] foer att flasha" + #define TR_BL_ERASE_KEY "Haall [ENT] foer att raderag" #define TR_BL_EXIT_KEY "[RTN] foer att avbryta" #endif diff --git a/radio/src/translations/tw.h b/radio/src/translations/tw.h index 21376b65b..e8b2f11ef 100644 --- a/radio/src/translations/tw.h +++ b/radio/src/translations/tw.h @@ -1075,10 +1075,20 @@ #define TR_BL_ENABLE "Enable" #define TR_BL_DISABLE "Disable" #elif defined(PCBPL18) - #define TR_BL_SELECT_KEY " [TR4 Dn] to select file" - #define TR_BL_FLASH_KEY " Hold [TR4 Dn] long to flash" - #define TR_BL_ERASE_KEY " Hold [TR4 Dn] long to erase" - #define TR_BL_EXIT_KEY " [TR4 Up] to exit" + // Bootloader PL18/NB4+ specific - ASCII characters only + #define TR_BL_ENABLE "Enable" + #define TR_BL_DISABLE "Disable" + #if defined(RADIO_NB4P) + #define TR_BL_SELECT_KEY "[SW2] to select file" + #define TR_BL_FLASH_KEY "Hold [SW2] long to flash" + #define TR_BL_ERASE_KEY "Hold [SW2] long to erase" + #define TR_BL_EXIT_KEY "[SW3] to exit" + #else + #define TR_BL_SELECT_KEY "[TR4 Dn] to select file" + #define TR_BL_FLASH_KEY "Hold [TR4 Dn] long to flash" + #define TR_BL_ERASE_KEY "Hold [TR4 Dn] long to erase" + #define TR_BL_EXIT_KEY "[TR4 Up] to exit" + #endif #else #define TR_BL_SELECT_KEY "[ENT] to select file" #define TR_BL_FLASH_KEY "Hold [ENT] long to flash" diff --git a/radio/src/translations/ua.h b/radio/src/translations/ua.h index b76c692d7..012a56bb1 100644 --- a/radio/src/translations/ua.h +++ b/radio/src/translations/ua.h @@ -1076,10 +1076,20 @@ #define TR_BL_ENABLE "Enable" #define TR_BL_DISABLE "Disable" #elif defined(PCBPL18) - #define TR_BL_SELECT_KEY " [TR4 Dn] to select file" - #define TR_BL_FLASH_KEY " Hold [TR4 Dn] long to flash" - #define TR_BL_ERASE_KEY " Hold [TR4 Dn] long to erase" - #define TR_BL_EXIT_KEY " [TR4 Up] to exit" + // Bootloader PL18/NB4+ specific - Ascii only + #define TR_BL_ENABLE "Enable" + #define TR_BL_DISABLE "Disable" + #if defined(RADIO_NB4P) + #define TR_BL_SELECT_KEY "[SW2] to select file" + #define TR_BL_FLASH_KEY "Hold [SW2] long to flash" + #define TR_BL_ERASE_KEY "Hold [SW2] long to erase" + #define TR_BL_EXIT_KEY "[SW3] to exit" + #else + #define TR_BL_SELECT_KEY "[TR4 Dn] to select file" + #define TR_BL_FLASH_KEY "Hold [TR4 Dn] long to flash" + #define TR_BL_ERASE_KEY "Hold [TR4 Dn] long to erase" + #define TR_BL_EXIT_KEY "[TR4 Up] to exit" + #endif #else #define TR_BL_SELECT_KEY "[ENT] to select file" #define TR_BL_FLASH_KEY "Hold [ENT] long to flash"