chore(radio): unify the bootloader UI code (#6189)

Co-authored-by: Richard Li <richard.li@ces.hk>
This commit is contained in:
philmoz
2025-05-23 11:06:20 +10:00
committed by GitHub
co-authored by Richard Li
parent bb4fb456a6
commit dc0d85d035
53 changed files with 2159 additions and 3957 deletions
-74
View File
@@ -1030,80 +1030,6 @@
#define TR_WIDGET_VALUE "Value"
#endif
// Bootloader common - ASCII characters only
#define TR_BL_USB_CONNECTED "USB Connected"
#define TR_BL_USB_PLUGIN "Or plug in a USB cable"
#define TR_BL_USB_MASS_STORE "for mass storage"
#define TR_BL_USB_PLUGIN_MASS_STORE "Or plug in a USB cable for mass storage"
#define TR_BL_WRITE_FW "Write Firmware"
#define TR_BL_FORK "Fork:"
#define TR_BL_VERSION "Version:"
#define TR_BL_RADIO "Radio:"
#define TR_BL_EXIT "Exit"
#define TR_BL_DIR_MISSING " Directory is missing"
#define TR_BL_DIR_EMPTY " Directory is empty"
#define TR_BL_WRITING_FW "Writing Firmware ..."
#define TR_BL_WRITING_COMPL "Writing Complete"
#if LCD_W >= 480
#define TR_BL_INVALID_FIRMWARE "Not a valid firmware file"
#elif LCD_W >= 212
#define TR_BL_OR_PLUGIN_USB_CABLE TR_BL_USB_PLUGIN_MASS_STORE
#define TR_BL_HOLD_ENTER_TO_START "\012Hold [ENT] to start writing"
#define TR_BL_INVALID_FIRMWARE "\011Not a valid firmware file! "
#define TR_BL_INVALID_EEPROM "\011Not a valid EEPROM file! "
#else
#define TR_BL_OR_PLUGIN_USB_CABLE TR_BL_USB_PLUGIN
#define TR_BL_HOLD_ENTER_TO_START "\006Hold [ENT] to start"
#define TR_BL_INVALID_FIRMWARE "\004Not a valid firmware! "
#define TR_BL_INVALID_EEPROM "\004Not a valid EEPROM! "
#endif
// Bootloader Taranis specific - ASCII characters only
#define TR_BL_RESTORE_EEPROM "Restore EEPROM"
#define TR_BL_POWER_KEY "Press the power button."
#define TR_BL_FLASH_EXIT "Exit the flashing mode."
// Bootloader Horus specific - ASCII characters only
#define TR_BL_ERASE_INT_FLASH "Erase Internal Flash Storage"
#define TR_BL_ERASE_FLASH "Erase Flash Storage"
#define TR_BL_ERASE_FLASH_MSG "This may take up to 200s"
#define TR_BL_RF_USB_ACCESS "RF USB access"
#define TR_BL_CURRENT_FW "Current Firmware:"
#if defined(PCBPL18)
// Bootloader PL18/NB4+ specific - ASCII characters only
#define TR_BL_ENABLE "Enable"
#define TR_BL_DISABLE "Disable"
#if defined(RADIO_NV14_FAMILY)
#define TR_BL_SELECT_KEY "[R TRIM] to select file"
#define TR_BL_FLASH_KEY "Hold [R TRIM] long to flash"
#define TR_BL_ERASE_KEY "Hold [R TRIM] long to erase"
#define TR_BL_EXIT_KEY "[L TRIM] to exit"
#elif defined(RADIO_NB4P)
#define TR_BL_SELECT_KEY "[SW1A] to select file"
#define TR_BL_FLASH_KEY "Hold [SW1A] long to flash"
#define TR_BL_ERASE_KEY "Hold [SW1A] long to erase"
#define TR_BL_EXIT_KEY "[SW1B] 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
#elif defined(PCBNV14)
#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"
#else
#define TR_BL_SELECT_KEY "[ENT] to select file"
#define TR_BL_FLASH_KEY "Hold [ENT] long to flash"
#define TR_BL_ERASE_KEY "Hold [ENT] long to erase"
#define TR_BL_EXIT_KEY "[RTN] to exit"
#endif
// About screen
#define TR_ABOUTUS TR(" ABOUT ", "ABOUT")