1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 00:05:17 +03:00

[Companion] Firmware options simplification

This commit is contained in:
Bertrand Songis 2016-11-20 11:32:01 +01:00
parent b93b0a6500
commit 51cb501510
2 changed files with 19 additions and 24 deletions

View file

@ -1187,17 +1187,22 @@ void addOpenTxCommonOptions(OpenTxFirmware * firmware)
firmware->addOptions(fai_options); firmware->addOptions(fai_options);
} }
void addOpenTxTaranisOptions(OpenTxFirmware * firmware) void addOpenTxFrskyOptions(OpenTxFirmware * firmware)
{ {
addOpenTxCommonOptions(firmware);
firmware->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support")); firmware->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support"));
firmware->addOption("nogvars", QObject::tr("Disable Global variables")); firmware->addOption("nogvars", QObject::tr("Disable Global variables"));
firmware->addOption("lua", QObject::tr("Support for Lua model scripts")); firmware->addOption("lua", QObject::tr("Support for Lua model scripts"));
Option usb_options[] = { { "massstorage", QObject::tr("Instead of Joystick emulation, USB connection is Mass Storage (as in the Bootloader)") }, { "cli", QObject::tr("Instead of Joystick emulation, USB connection is Command Line Interface") }, { NULL } }; Option usb_options[] = { { "massstorage", QObject::tr("Instead of Joystick emulation, USB connection is Mass Storage (as in the Bootloader)") }, { "cli", QObject::tr("Instead of Joystick emulation, USB connection is Command Line Interface") }, { NULL } };
firmware->addOptions(usb_options); firmware->addOptions(usb_options);
firmware->addOption("mixersmon", QObject::tr("Adds mixers output view to the CHANNELS MONITOR screen, pressing [ENT] switches between the views"));
firmware->addOption("eu", QObject::tr("Removes D8 FrSky protocol support which is not legal for use in the EU on radios sold after Jan 1st, 2015")); firmware->addOption("eu", QObject::tr("Removes D8 FrSky protocol support which is not legal for use in the EU on radios sold after Jan 1st, 2015"));
firmware->addOption("internalppm", QObject::tr("Support for PPM internal module hack"));
firmware->addOption("multimodule", QObject::tr("Support for the DIY-Multiprotocol-TX-Module")); firmware->addOption("multimodule", QObject::tr("Support for the DIY-Multiprotocol-TX-Module"));
}
void addOpenTxTaranisOptions(OpenTxFirmware * firmware)
{
firmware->addOption("mixersmon", QObject::tr("Adds mixers output view to the CHANNELS MONITOR screen, pressing [ENT] switches between the views"));
firmware->addOption("internalppm", QObject::tr("Support for PPM internal module hack"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font")); firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
} }
@ -1226,38 +1231,28 @@ void registerOpenTxFirmwares()
/* FrSky Taranis X9D+ board */ /* FrSky Taranis X9D+ board */
firmware = new OpenTxFirmware("opentx-x9d+", QObject::tr("FrSky Taranis X9D+"), BOARD_TARANIS_X9DP); firmware = new OpenTxFirmware("opentx-x9d+", QObject::tr("FrSky Taranis X9D+"), BOARD_TARANIS_X9DP);
addOpenTxTaranisOptions(firmware); addOpenTxTaranisOptions(firmware);
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware); firmwares.push_back(firmware);
/* FrSky Taranis X9D board */ /* FrSky Taranis X9D board */
firmware = new OpenTxFirmware("opentx-x9d", QObject::tr("FrSky Taranis X9D"), BOARD_TARANIS_X9D); firmware = new OpenTxFirmware("opentx-x9d", QObject::tr("FrSky Taranis X9D"), BOARD_TARANIS_X9D);
firmware->addOption("haptic", QObject::tr("Haptic module installed")); firmware->addOption("haptic", QObject::tr("Haptic module installed"));
addOpenTxTaranisOptions(firmware); addOpenTxTaranisOptions(firmware);
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware); firmwares.push_back(firmware);
/* FrSky Taranis X9E board */ /* FrSky Taranis X9E board */
firmware = new OpenTxFirmware("opentx-x9e", QObject::tr("FrSky Taranis X9E"), BOARD_TARANIS_X9E); firmware = new OpenTxFirmware("opentx-x9e", QObject::tr("FrSky Taranis X9E"), BOARD_TARANIS_X9E);
firmware->addOption("shutdownconfirm", QObject::tr("Confirmation before radio shutdown")); firmware->addOption("shutdownconfirm", QObject::tr("Confirmation before radio shutdown"));
addOpenTxTaranisOptions(firmware); addOpenTxTaranisOptions(firmware);
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware); firmwares.push_back(firmware);
/* FrSky X7D board */ /* FrSky X7D board */
firmware = new OpenTxFirmware("opentx-x7d", QObject::tr("FrSky X7D"), BOARD_X7D); firmware = new OpenTxFirmware("opentx-x7d", QObject::tr("FrSky X7D"), BOARD_X7D);
addOpenTxTaranisOptions(firmware); addOpenTxTaranisOptions(firmware);
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware); firmwares.push_back(firmware);
/* FrSky Horus board */ /* FrSky Horus board */
firmware = new OpenTxFirmware("opentx-horus", QObject::tr("FrSky Horus"), BOARD_HORUS); firmware = new OpenTxFirmware("opentx-horus", QObject::tr("FrSky Horus"), BOARD_HORUS);
firmware->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support")); addOpenTxFrskyOptions(firmware);
firmware->addOption("nogvars", QObject::tr("Disable Global variables"));
firmware->addOption("lua", QObject::tr("Support for Lua model scripts"));
Option usb_options[] = { { "massstorage", QObject::tr("Instead of Joystick emulation, USB connection is Mass Storage (as in the Bootloader)") }, { "cli", QObject::tr("Instead of Joystick emulation, USB connection is Command Line Interface") }, { NULL } };
firmware->addOptions(usb_options);
firmware->addOption("multimodule", QObject::tr("Support for the DIY-Multiprotocol-TX-Module"));
addOpenTxCommonOptions(firmware);
firmware->addOption("pcbdev", QObject::tr("Use ONLY with first DEV pcb version")); firmware->addOption("pcbdev", QObject::tr("Use ONLY with first DEV pcb version"));
firmwares.push_back(firmware); firmwares.push_back(firmware);

View file

@ -299,17 +299,17 @@ options_taranisx9e = {
} }
options_horus = { options_horus = {
"noheli": ("HELI", "NO", "YES"), "noheli": ("HELI", "NO", "YES"),
"ppmus": ("PPM_UNIT", "US", "PERCENT_PREC1"), "ppmus": ("PPM_UNIT", "US", "PERCENT_PREC1"),
"lua": ("LUA", "YES", "NO_MODEL_SCRIPTS"), "lua": ("LUA", "YES", "NO_MODEL_SCRIPTS"),
"nogvars": ("GVARS", "NO", "YES"), "nogvars": ("GVARS", "NO", "YES"),
"faimode": ("FAI", "YES", None), "faimode": ("FAI", "YES", None),
"faichoice": ("FAI", "CHOICE", None), "faichoice": ("FAI", "CHOICE", None),
"nooverridech": ("OVERRIDE_CHANNEL_FUNCTION", "NO", "YES"), "nooverridech": ("OVERRIDE_CHANNEL_FUNCTION", "NO", "YES"),
"massstorage": ("USB", "MASSSTORAGE", None), "massstorage": ("USB", "MASSSTORAGE", None),
"cli": ("USB", "SERIAL", None), "cli": ("USB", "SERIAL", None),
"timer3": ("TIMERS", "3", "2"), "timer3": ("TIMERS", "3", "2"),
"eu": ("SUPPORT_D16_EU_ONLY", "YES", "NO"), "eu": ("SUPPORT_D16_EU_ONLY", "YES", "NO"),
"multimodule": ("MULTIMODULE", "YES", "NO"), "multimodule": ("MULTIMODULE", "YES", "NO"),
"pcbdev": ("PCBREV", "10", None), "pcbdev": ("PCBREV", "10", None),
} }