Allow USB mode selection on USB connect (#5193)

Allow all USB modes to be compiled in at the same time
This commit is contained in:
Arne Schwabe
2017-09-10 17:28:08 +02:00
committed by Bertrand Songis
parent 2910488a30
commit b7acee5723
45 changed files with 1515 additions and 1239 deletions
@@ -3703,7 +3703,8 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, Board::Type
if (version >= 218) {
internalField.Append(new BoolField<1>(this, generalData.jitterFilter));
internalField.Append(new BoolField<1>(this, generalData.disableRssiPoweroffAlarm));
internalField.Append(new SpareBitsField<5>(this));
internalField.Append(new UnsignedField<2>(this, generalData.usbMode));
internalField.Append(new SpareBitsField<3>(this));
}
else {
internalField.Append(new SpareBitsField<7>(this));
@@ -1133,10 +1133,6 @@ void addOpenTxFrskyOptions(OpenTxFirmware * firmware)
firmware->addOption("lua", QObject::tr("Support for Lua model scripts"));
firmware->addOption("luac", QObject::tr("Enable Lua compiler"));
firmware->addOption("bindopt", QObject::tr("Enable bindings options"));
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);
}
void addOpenTxTaranisOptions(OpenTxFirmware * firmware)