Unverified Commit 4fa0edf9 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #6778 from DonLakeFlyer/Fixes

Fixes
parents 96ca9d73 2d5b09a9
...@@ -349,7 +349,7 @@ int MissionController::insertSimpleMissionItem(QGeoCoordinate coordinate, int i) ...@@ -349,7 +349,7 @@ int MissionController::insertSimpleMissionItem(QGeoCoordinate coordinate, int i)
newItem->setCoordinate(coordinate); newItem->setCoordinate(coordinate);
newItem->setCommand(MAV_CMD_NAV_WAYPOINT); newItem->setCommand(MAV_CMD_NAV_WAYPOINT);
_initVisualItem(newItem); _initVisualItem(newItem);
if (_visualItems->count() == 1) { if (_visualItems->count() == 1 && (_controllerVehicle->fixedWing() || _controllerVehicle->vtol() || _controllerVehicle->multiRotor())) {
MAV_CMD takeoffCmd = _controllerVehicle->vtol() ? MAV_CMD_NAV_VTOL_TAKEOFF : MAV_CMD_NAV_TAKEOFF; MAV_CMD takeoffCmd = _controllerVehicle->vtol() ? MAV_CMD_NAV_VTOL_TAKEOFF : MAV_CMD_NAV_TAKEOFF;
if (_controllerVehicle->firmwarePlugin()->supportedMissionCommands().contains((MAV_CMD)takeoffCmd)) { if (_controllerVehicle->firmwarePlugin()->supportedMissionCommands().contains((MAV_CMD)takeoffCmd)) {
newItem->setCommand(takeoffCmd); newItem->setCommand(takeoffCmd);
......
...@@ -36,8 +36,9 @@ Rectangle { ...@@ -36,8 +36,9 @@ Rectangle {
property var _fileExtension: QGroundControl.settingsManager.appSettings.missionFileExtension property var _fileExtension: QGroundControl.settingsManager.appSettings.missionFileExtension
property var _appSettings: QGroundControl.settingsManager.appSettings property var _appSettings: QGroundControl.settingsManager.appSettings
property bool _waypointsOnlyMode: QGroundControl.corePlugin.options.missionWaypointsOnly 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 _simpleMissionStart: QGroundControl.corePlugin.options.showSimpleMissionStart
property bool _showFlightSpeed: !_missionVehicle.vtol && !_simpleMissionStart && !_missionVehicle.apmFirmware
readonly property string _firmwareLabel: qsTr("Firmware") readonly property string _firmwareLabel: qsTr("Firmware")
readonly property string _vehicleLabel: qsTr("Vehicle") readonly property string _vehicleLabel: qsTr("Vehicle")
...@@ -72,14 +73,14 @@ Rectangle { ...@@ -72,14 +73,14 @@ Rectangle {
QGCCheckBox { QGCCheckBox {
id: flightSpeedCheckBox id: flightSpeedCheckBox
text: qsTr("Flight speed") text: qsTr("Flight speed")
visible: !_missionVehicle.vtol && !_simpleMissionStart visible: _showFlightSpeed
checked: missionItem.speedSection.specifyFlightSpeed checked: missionItem.speedSection.specifyFlightSpeed
onClicked: missionItem.speedSection.specifyFlightSpeed = checked onClicked: missionItem.speedSection.specifyFlightSpeed = checked
} }
FactTextField { FactTextField {
Layout.fillWidth: true Layout.fillWidth: true
fact: missionItem.speedSection.flightSpeed fact: missionItem.speedSection.flightSpeed
visible: flightSpeedCheckBox.visible visible: _showFlightSpeed
enabled: flightSpeedCheckBox.checked enabled: flightSpeedCheckBox.checked
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment