From 2d5b09a90d8c599ba07cfa6de7dcfd81ad9738a2 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Tue, 7 Aug 2018 19:29:37 -0700 Subject: [PATCH] Hide flight speed and camera section for ArduPilot. This is because it doesn't allow mission items to be before the TAKEOFF command. --- src/PlanView/MissionSettingsEditor.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/PlanView/MissionSettingsEditor.qml b/src/PlanView/MissionSettingsEditor.qml index a9e0f9897e..265ba3cb4b 100644 --- a/src/PlanView/MissionSettingsEditor.qml +++ b/src/PlanView/MissionSettingsEditor.qml @@ -36,8 +36,9 @@ Rectangle { property var _fileExtension: QGroundControl.settingsManager.appSettings.missionFileExtension property var _appSettings: QGroundControl.settingsManager.appSettings property bool _waypointsOnlyMode: QGroundControl.corePlugin.options.missionWaypointsOnly - property bool _showCameraSection: !_waypointsOnlyMode || QGroundControl.corePlugin.showAdvancedUI + property bool _showCameraSection: (!_waypointsOnlyMode || QGroundControl.corePlugin.showAdvancedUI) && !_missionVehicle.apmFirmware property bool _simpleMissionStart: QGroundControl.corePlugin.options.showSimpleMissionStart + property bool _showFlightSpeed: !_missionVehicle.vtol && !_simpleMissionStart && !_missionVehicle.apmFirmware readonly property string _firmwareLabel: qsTr("Firmware") readonly property string _vehicleLabel: qsTr("Vehicle") @@ -72,14 +73,14 @@ Rectangle { QGCCheckBox { id: flightSpeedCheckBox text: qsTr("Flight speed") - visible: !_missionVehicle.vtol && !_simpleMissionStart + visible: _showFlightSpeed checked: missionItem.speedSection.specifyFlightSpeed onClicked: missionItem.speedSection.specifyFlightSpeed = checked } FactTextField { Layout.fillWidth: true fact: missionItem.speedSection.flightSpeed - visible: flightSpeedCheckBox.visible + visible: _showFlightSpeed enabled: flightSpeedCheckBox.checked } } -- GitLab