chore: Support T-Lite F4 variant (#3254)

* TLite F4

* chore: Add to fw list for Buddy

* chore(cpn): TLite F4 Companion support

* fix: Remove seemingly incorect cmake set
Or at least, the code now builds without that directive

* fix(cpn): Stupid typo

* chore: Actually build/register tlitef4 simulator

* fix: Need tlitef4 flavor for simulator and updates

* chore: tlitef4 can use tlite simulator

* fix: downloadid AND simulatorid

* fix: Correct simulatorid

---------

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
Co-authored-by: Peter Feerick <pfeerick@users.noreply.github.com>
This commit is contained in:
3djc
2023-05-10 19:43:07 +10:00
committed by GitHub
co-authored by Peter Feerick Peter Feerick
parent 2588e89ca1
commit 32e544c8dd
14 changed files with 70 additions and 5 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ jobs:
- t16
- t18
- t8;zorro;commando8
- tlite;tpro;lr3pro
- tlite;tlitef4;tpro;lr3pro
- tx12;tx12mk2;boxer
- tx16s
- x10;x10-access
+1 -1
View File
@@ -23,7 +23,7 @@ jobs:
- t16
- t18
- t8;zorro;commando8
- tlite;tpro;lr3pro
- tlite;tlitef4;tpro;lr3pro
- tx12;tx12mk2;boxer
- tx16s
- x10;x10-access
+2
View File
@@ -318,6 +318,8 @@ elseif(PCB STREQUAL X7 AND PCBREV STREQUAL T12)
set(FLAVOUR t12)
elseif(PCB STREQUAL X7 AND PCBREV STREQUAL TLITE)
set(FLAVOUR tlite)
elseif(PCB STREQUAL X7 AND PCBREV STREQUAL TLITEF4)
set(FLAVOUR tlitef4)
elseif(PCB STREQUAL X7 AND PCBREV STREQUAL TPRO)
set(FLAVOUR tpro)
elseif(PCB STREQUAL X7 AND PCBREV STREQUAL TX12)
+9 -1
View File
@@ -86,6 +86,7 @@ uint32_t Boards::getFourCC(Type board)
case BOARD_JUMPER_T12:
return 0x3D78746F;
case BOARD_JUMPER_TLITE:
case BOARD_JUMPER_TLITE_F4:
return 0x4278746F;
case BOARD_JUMPER_TPRO:
return 0x4678746F;
@@ -134,6 +135,7 @@ int Boards::getEEpromSize(Board::Type board)
case BOARD_IFLIGHT_COMMANDO8:
case BOARD_JUMPER_T12:
case BOARD_JUMPER_TLITE:
case BOARD_JUMPER_TLITE_F4:
case BOARD_JUMPER_TPRO:
case BOARD_RADIOMASTER_TX12:
case BOARD_RADIOMASTER_TX12_MK2:
@@ -178,6 +180,7 @@ int Boards::getFlashSize(Type board)
case BOARD_IFLIGHT_COMMANDO8:
case BOARD_JUMPER_T12:
case BOARD_JUMPER_TLITE:
case BOARD_JUMPER_TLITE_F4:
case BOARD_JUMPER_TPRO:
case BOARD_RADIOMASTER_TX12:
case BOARD_RADIOMASTER_TX12_MK2:
@@ -484,7 +487,9 @@ int Boards::getCapability(Board::Type board, Board::Capability capability)
return 7;
else if (board == BOARD_TARANIS_X7)
return 8;
else if (board == BOARD_JUMPER_TLITE || board == BOARD_JUMPER_TPRO || board == BOARD_BETAFPV_LR3PRO || board == BOARD_IFLIGHT_COMMANDO8)
else if (board == BOARD_JUMPER_TLITE || BOARD_JUMPER_TLITE_F4 ||
board == BOARD_JUMPER_TPRO || board == BOARD_BETAFPV_LR3PRO ||
board == BOARD_IFLIGHT_COMMANDO8)
return 4;
else if (board == BOARD_FLYSKY_NV14)
return 8;
@@ -733,6 +738,8 @@ QString Boards::getBoardName(Board::Type board)
return "Jumper T12";
case BOARD_JUMPER_TLITE:
return "Jumper T-Lite";
case BOARD_JUMPER_TLITE_F4:
return "Jumper T-Lite (F4 MCU)";
case BOARD_JUMPER_TPRO:
return "Jumper T-Pro";
case BOARD_JUMPER_T16:
@@ -964,6 +971,7 @@ int Boards::getDefaultInternalModules(Board::Type board)
case BOARD_RADIOMASTER_TX12:
case BOARD_RADIOMASTER_T8:
case BOARD_JUMPER_TLITE:
case BOARD_JUMPER_TLITE_F4:
case BOARD_JUMPER_TPRO:
return (int)MODULE_TYPE_MULTIMODULE;
+3 -1
View File
@@ -64,6 +64,7 @@ namespace Board {
BOARD_RADIOMASTER_BOXER,
BOARD_RADIOMASTER_T8,
BOARD_JUMPER_TLITE,
BOARD_JUMPER_TLITE_F4,
BOARD_FLYSKY_NV14,
BOARD_RADIOMASTER_ZORRO,
BOARD_JUMPER_TPRO,
@@ -263,7 +264,7 @@ inline bool IS_JUMPER_T12(Board::Type board)
inline bool IS_JUMPER_TLITE(Board::Type board)
{
return board == Board::BOARD_JUMPER_TLITE;
return board == Board::BOARD_JUMPER_TLITE || board == Board::BOARD_JUMPER_TLITE_F4;
}
inline bool IS_JUMPER_TPRO(Board::Type board)
@@ -325,6 +326,7 @@ inline bool IS_FAMILY_T12(Board::Type board)
board == Board::BOARD_RADIOMASTER_BOXER ||
board == Board::BOARD_RADIOMASTER_T8 ||
board == Board::BOARD_JUMPER_TLITE ||
board == Board::BOARD_JUMPER_TLITE_F4 ||
board == Board::BOARD_JUMPER_TPRO ||
board == Board::BOARD_BETAFPV_LR3PRO ||
board == Board::BOARD_IFLIGHT_COMMANDO8;
@@ -62,6 +62,8 @@ const char * OpenTxEepromInterface::getName()
return "EdgeTX for Jumper T12";
case BOARD_JUMPER_TLITE:
return "EdgeTX for Jumper T-Lite";
case BOARD_JUMPER_TLITE_F4:
return "EdgeTX for Jumper T-Lite (F4 MCU)";
case BOARD_JUMPER_TPRO:
return "EdgeTX for Jumper T-Pro";
case BOARD_JUMPER_T16:
@@ -1304,6 +1306,16 @@ void registerOpenTxFirmwares()
firmware->addOption("lua", Firmware::tr("Enable Lua custom scripts screen"));
addOpenTxFontOptions(firmware);
registerOpenTxFirmware(firmware);
addOpenTxRfOptions(firmware, FLEX);
/* Jumper T-Lite F4 board */
firmware = new OpenTxFirmware(FIRMWAREID("tlitef4"), QCoreApplication::translate("Firmware", "Jumper T-Lite (F4 MCU)"), BOARD_JUMPER_TLITE_F4, "tlitef4", "edgetx-tlite");
addOpenTxCommonOptions(firmware);
firmware->addOption("noheli", Firmware::tr("Disable HELI menu and cyclic mix support"));
firmware->addOption("nogvars", Firmware::tr("Disable Global variables"));
firmware->addOption("lua", Firmware::tr("Enable Lua custom scripts screen"));
addOpenTxFontOptions(firmware);
registerOpenTxFirmware(firmware);
addOpenTxRfOptions(firmware, FLEX);
/* Jumper T-Pro board */
@@ -97,6 +97,7 @@ SimulatorWidget::SimulatorWidget(QWidget * parent, SimulatorInterface * simulato
radioUiWidget = new SimulatedUIWidgetJumperT12(simulator, this);
break;
case Board::BOARD_JUMPER_TLITE:
case Board::BOARD_JUMPER_TLITE_F4:
radioUiWidget = new SimulatedUIWidgetJumperTLITE(simulator, this);
break;
case Board::BOARD_JUMPER_TPRO:
+1
View File
@@ -22,6 +22,7 @@
["Jumper T16", "t16-"],
["Jumper T18", "t18-"],
["Jumper T-Lite", "tlite-"],
["Jumper T-Lite (F4 MCU)", "tlitef4-"],
["Jumper T-Pro", "tpro-"],
["RadioMaster T8", "t8-"],
["RadioMaster TX12", "tx12-"],
+9 -1
View File
@@ -46,6 +46,14 @@
#define DISPLAY_VERSION
#endif
#if defined(RADIO_TLITE)
#if defined(STM32F407xx)
#define CPU_NAME "-F4"
#else
#define CPU_NAME "-F2"
#endif
#endif
#if defined(COLORLCD)
const char fw_stamp[] = "FW" TAB ": edgetx-" FLAVOUR;
#if defined(RADIOMASTER_RELEASE) || defined(JUMPER_RELEASE)
@@ -64,7 +72,7 @@
#elif defined(RADIOMASTER_RELEASE)
const char vers_stamp[] = "FW" TAB ": edgetx-" FLAVOUR "\036VERS" TAB ": RM Factory (" GIT_STR ")" "\036BUILT BY : EdgeTX" "\036DATE" TAB ": " DATE " " TIME;
#elif defined(JUMPER_RELEASE) || defined(IFLIGHT_RELEASE)
const char vers_stamp[] = "FW" TAB ": edgetx-" FLAVOUR "\036VERS" TAB ": Factory (" GIT_STR ")" "\036BUILT BY : EdgeTX" "\036DATE" TAB ": " DATE " " TIME;
const char vers_stamp[] = "FW" TAB ": edgetx-" FLAVOUR CPU_NAME"\036VERS" TAB ": Factory (" GIT_STR ")" "\036BUILT BY : EdgeTX" "\036DATE" TAB ": " DATE " " TIME;
#else
#if defined(VERSION_TAG)
const char vers_stamp[] = "FW" TAB ": edgetx-" FLAVOUR "\036VERS" TAB ": " VERSION_TAG DISPLAY_VERSION "\036NAME" ": " CODENAME "\036DATE" TAB ": " DATE " " TIME;
+17
View File
@@ -170,6 +170,23 @@ elseif(PCB STREQUAL X7)
add_definitions(-DMANUFACTURER_JUMPER)
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
set(CLI ON CACHE BOOL "Enable CLI")
elseif(PCBREV STREQUAL TLITEF4)
set(DEFAULT_INTERNAL_MODULE MULTIMODULE CACHE STRING "Default internal module")
set(INTERNAL_MODULE_SERIAL YES)
set(FLAVOUR tlitef4)
set(NAVIGATION_TYPE 9x)
set(CPU_TYPE STM32F4)
set(CPU_TYPE_FULL STM32F407xE) # for size report
add_definitions(-DSTM32F407xx)
set(LINKER_SCRIPT targets/taranis/stm32f4_flash.ld)
add_definitions(-DSTM32F40_41xxx -DSTM32F407xx)
set(LUA_EXPORT lua_export_tlite)
add_definitions(-DRADIO_TLITE)
add_definitions(-DRADIO_FAMILY_JUMPER_T12)
add_definitions(-DEEPROM_VARIANT=0x4003)
add_definitions(-DMANUFACTURER_JUMPER)
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
set(CLI ON CACHE BOOL "Enable CLI")
elseif(PCBREV STREQUAL LR3PRO)
set(DEFAULT_INTERNAL_MODULE CROSSFIRE CACHE STRING "Default internal module")
set(INTERNAL_MODULE_SERIAL YES)
+3
View File
@@ -116,6 +116,9 @@ do
tlite)
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=TLITE"
;;
tlitef4)
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=TLITEF4"
;;
tpro)
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=TPRO"
;;
+3
View File
@@ -125,6 +125,9 @@ do
tlite)
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=TLITE"
;;
tlitef4)
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=TLITEF4"
;;
tpro)
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=TPRO"
;;
+5
View File
@@ -14,6 +14,11 @@ boards = {
"PCBREV": "TLITE",
"DEFAULT_MODE": "2",
},
"TLITEF4": {
"PCB": "X7",
"PCBREV": "TLITEF4",
"DEFAULT_MODE": "2",
},
"TPRO": {
"PCB": "X7",
"PCBREV": "TPRO",
+3
View File
@@ -100,6 +100,9 @@ do
tlite)
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=TLITE"
;;
tlitef4)
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=TLITEF4"
;;
xlite)
BUILD_OPTIONS+="-DPCB=XLITE"
;;