Commit 4a39f75a authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #3734 from DonLakeFlyer/SmallFixes

Center hdop in toolbar, fix goto enabled state handling
parents d276f239 4210e759
......@@ -126,11 +126,13 @@ FlightMap {
onClicked: {
if (_activeVehicle) {
if (_activeVehicle.guidedMode && flightWidgets.guidedModeBar.state == "Shown") {
_gotoHereCoordinate = flightMap.toCoordinate(Qt.point(mouse.x, mouse.y))
flightWidgets.guidedModeBar.confirmAction(flightWidgets.guidedModeBar.confirmGoTo)
} else {
if (flightWidgets.guidedModeBar.state != "Shown") {
flightWidgets.guidedModeBar.state = "Shown"
} else {
if (flightWidgets.gotoEnabled) {
_gotoHereCoordinate = flightMap.toCoordinate(Qt.point(mouse.x, mouse.y))
flightWidgets.guidedModeBar.confirmAction(flightWidgets.guidedModeBar.confirmGoTo)
}
}
}
}
......
......@@ -25,7 +25,8 @@ import QGroundControl.FlightMap 1.0
Item {
id: _root
property alias guidedModeBar: _guidedModeBar
property alias guidedModeBar: _guidedModeBar
property bool gotoEnabled: _activeVehicle && _activeVehicle.guidedMode && _activeVehicle.flying
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool _isSatellite: _mainIsMap ? (_flightMap ? _flightMap.isSatelliteMap : true) : true
......@@ -444,7 +445,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
color: _lightWidgetBorders ? qgcPal.mapWidgetBorderDark : qgcPal.mapWidgetBorderLight
text: "Click in map to move vehicle"
visible: _activeVehicle && _activeVehicle.guidedMode && _activeVehicle.flying
visible: gotoEnabled
}
Row {
......
......@@ -521,7 +521,7 @@ void Vehicle::_handleExtendedSysState(mavlink_message_t& message)
mavlink_msg_extended_sys_state_decode(&message, &extendedState);
switch (extendedState.landed_state) {
case MAV_LANDED_STATE_UNDEFINED:
case MAV_LANDED_STATE_UNDEFINED:
break;
case MAV_LANDED_STATE_ON_GROUND:
setFlying(false);
......
......@@ -139,12 +139,14 @@ Row {
anchors.left: gpsIcon.right
QGCLabel {
anchors.horizontalCenter: hdopValue.horizontalCenter
visible: activeVehicle && !isNaN(activeVehicle.gps.hdop.value)
color: qgcPal.buttonText
text: activeVehicle ? activeVehicle.gps.count.valueString : ""
}
QGCLabel {
id: hdopValue
visible: activeVehicle && !isNaN(activeVehicle.gps.hdop.value)
color: qgcPal.buttonText
text: activeVehicle ? activeVehicle.gps.hdop.value.toFixed(1) : ""
......
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