diff --git a/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc b/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc index 42cba060c35e538f94238d635b1aca0604c97ac2..10c974021f2d2ce5ee6088927e6452c6ba711203 100644 --- a/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc +++ b/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc @@ -74,9 +74,12 @@ const QVariantList& APMAutoPilotPlugin::vehicleComponents(void) _components.append(QVariant::fromValue((VehicleComponent*)_radioComponent)); } - _flightModesComponent = new APMFlightModesComponent(_vehicle, this); - _flightModesComponent->setupTriggerSignals(); - _components.append(QVariant::fromValue((VehicleComponent*)_flightModesComponent)); + // No flight modes component for Sub versions 3.5 and up + if (!_vehicle->sub() || (_vehicle->firmwareMajorVersion() == 3 && _vehicle->firmwareMinorVersion() <= 4)) { + _flightModesComponent = new APMFlightModesComponent(_vehicle, this); + _flightModesComponent->setupTriggerSignals(); + _components.append(QVariant::fromValue((VehicleComponent*)_flightModesComponent)); + } _sensorsComponent = new APMSensorsComponent(_vehicle, this); _sensorsComponent->setupTriggerSignals();