From d4c9f2ce5cad09f1f76838514a7560505df13734 Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Thu, 4 Oct 2018 18:40:34 -0300 Subject: [PATCH] Vehicle: show motor test only for ArduSub >= 3.5.3 --- src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc b/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc index b795e1430..8d26f94ad 100644 --- a/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc +++ b/src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc @@ -86,7 +86,8 @@ const QVariantList& APMAutoPilotPlugin::vehicleComponents(void) _powerComponent->setupTriggerSignals(); _components.append(QVariant::fromValue((VehicleComponent*)_powerComponent)); - if (_vehicle->multiRotor() || _vehicle->vtol()) { + int versionInt = _vehicle->firmwareMajorVersion() * 100 + _vehicle->firmwareMinorVersion() * 10 + _vehicle->firmwarePatchVersion(); + if (_vehicle->sub() && versionInt >= 353) { _motorComponent = new MotorComponent(_vehicle, this); _motorComponent->setupTriggerSignals(); _components.append(QVariant::fromValue((VehicleComponent*)_motorComponent)); -- 2.22.0