Browse Source

Narrow the flight mode options

QGC4.4
Gus Grubba 6 years ago
parent
commit
7cfba12a9c
  1. 8
      custom-example/src/FirmwarePlugin/CustomFirmwarePlugin.cc

8
custom-example/src/FirmwarePlugin/CustomFirmwarePlugin.cc

@ -19,6 +19,14 @@ @@ -19,6 +19,14 @@
//-----------------------------------------------------------------------------
CustomFirmwarePlugin::CustomFirmwarePlugin()
{
for (int i = 0; i < _flightModeInfoList.count(); i++) {
FlightModeInfo_t& info = _flightModeInfoList[i];
//-- Narrow the options to only these two
if (info.name != _altCtlFlightMode &&
info.name != _posCtlFlightMode) {
info.canBeSet = false;
}
}
}
//-----------------------------------------------------------------------------

Loading…
Cancel
Save