From f7270a56e0fc20f6ead420c64c1c86813a751567 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Tue, 27 Aug 2019 10:20:09 -0700 Subject: [PATCH] Fix/update offline vehicle capability bits and mavlink version --- src/Vehicle/Vehicle.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index 1e88478e1..02a98daad 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -348,8 +348,10 @@ Vehicle::Vehicle(MAV_AUTOPILOT firmwareType, , _globalPositionIntMessageAvailable(false) , _defaultCruiseSpeed(_settingsManager->appSettings()->offlineEditingCruiseSpeed()->rawValue().toDouble()) , _defaultHoverSpeed(_settingsManager->appSettings()->offlineEditingHoverSpeed()->rawValue().toDouble()) + , _mavlinkProtocolRequestComplete(true) + , _maxProtoVersion(200) , _vehicleCapabilitiesKnown(true) - , _capabilityBits(_firmwareType == MAV_AUTOPILOT_ARDUPILOTMEGA ? 0 : MAV_PROTOCOL_CAPABILITY_MISSION_FENCE | MAV_PROTOCOL_CAPABILITY_MISSION_RALLY) + , _capabilityBits(MAV_PROTOCOL_CAPABILITY_MISSION_FENCE | MAV_PROTOCOL_CAPABILITY_MISSION_RALLY) , _highLatencyLink(false) , _receivingAttitudeQuaternion(false) , _cameras(nullptr) @@ -574,12 +576,6 @@ void Vehicle::_offlineFirmwareTypeSettingChanged(QVariant value) _firmwareType = static_cast(value.toInt()); _firmwarePlugin = _firmwarePluginManager->firmwarePluginForAutopilot(_firmwareType, _vehicleType); emit firmwareTypeChanged(); - if (_firmwareType == MAV_AUTOPILOT_ARDUPILOTMEGA) { - _capabilityBits = 0; - } else { - _capabilityBits = MAV_PROTOCOL_CAPABILITY_MISSION_FENCE | MAV_PROTOCOL_CAPABILITY_MISSION_RALLY; - } - emit capabilityBitsChanged(_capabilityBits); } void Vehicle::_offlineVehicleTypeSettingChanged(QVariant value) -- 2.22.0