Commit 4cfd5a1d authored by Lorenz Meier's avatar Lorenz Meier

Flight display: Fix visuals, hide states that should not be operated, make...

Flight display: Fix visuals, hide states that should not be operated, make sliders safer and allow to reduce altitude when in air
parent a6420f4a
......@@ -446,12 +446,13 @@ Item {
QGCButton {
text: (_activeVehicle && _activeVehicle.armed) ? (_activeVehicle.flying ? qsTr("Emergency Stop") : qsTr("Disarm")) : qsTr("Arm")
visible: (_activeVehicle && _activeVehicle.homePositionAvailable)
onClicked: _guidedModeBar.confirmAction(_activeVehicle.armed ? (_activeVehicle.flying ? _guidedModeBar.confirmEmergencyStop : _guidedModeBar.confirmDisarm) : _guidedModeBar.confirmArm)
}
QGCButton {
text: qsTr("RTL")
visible: _activeVehicle && _activeVehicle.guidedModeSupported && _activeVehicle.flying
visible: (_activeVehicle && _activeVehicle.armed) && _activeVehicle.guidedModeSupported && _activeVehicle.flying
onClicked: _guidedModeBar.confirmAction(_guidedModeBar.confirmHome)
}
......@@ -463,7 +464,7 @@ Item {
QGCButton {
text: qsTr("Pause")
visible: _activeVehicle && _activeVehicle.pauseVehicleSupported && _activeVehicle.flying
visible: (_activeVehicle && _activeVehicle.armed) && _activeVehicle.pauseVehicleSupported && _activeVehicle.flying
onClicked: {
guidedModeHideTimer.restart()
_activeVehicle.pauseVehicle()
......@@ -472,7 +473,7 @@ Item {
QGCButton {
text: qsTr("Change Altitude")
visible: _activeVehicle && _activeVehicle.guidedModeSupported && _activeVehicle.armed
visible: (_activeVehicle && _activeVehicle.flying) && _activeVehicle.guidedModeSupported && _activeVehicle.armed
onClicked: _guidedModeBar.confirmAction(_guidedModeBar.confirmChangeAlt)
}
} // Row
......@@ -576,8 +577,8 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
orientation: Qt.Vertical
minimumValue: 0
maximumValue: QGroundControl.metersToAppSettingsDistanceUnits(100)
minimumValue: QGroundControl.metersToAppSettingsDistanceUnits((_activeVehicle && _activeVehicle.flying) ? -15 : 0)
maximumValue: QGroundControl.metersToAppSettingsDistanceUnits((_activeVehicle && _activeVehicle.flying) ? 15 : 60)
}
}
}
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