Browse Source

Don't show vehicle till 2d gps lock

QGC4.4
Don Gagne 10 years ago
parent
commit
5832b6a3e6
  1. 22
      src/FlightMap/FlightMap.qml
  2. 15
      src/FlightMap/MapItems/VehicleMapItem.qml

22
src/FlightMap/FlightMap.qml

@ -166,8 +166,7 @@ Item { @@ -166,8 +166,7 @@ Item {
delegate:
VehicleMapItem {
coordinate: object.coordinate
heading: object.heading
vehicle: object
isSatellite: root.isSatelliteMap
}
}
@ -236,6 +235,25 @@ Item { @@ -236,6 +235,25 @@ Item {
*/
}
// Vehicle GPS lock display
Column {
id: gpsLockColumn
y: (parent.height - height) / 2
width: parent.width
Repeater {
model: multiVehicleManager.vehicles
delegate:
QGCLabel {
width: gpsLockColumn.width
horizontalAlignment: Text.AlignHCenter
visible: object.satelliteLock < 2
text: "No GPS Lock for Vehicle #" + object.id
}
}
}
// Mission item list
ListView {
id: missionItemSummaryList

15
src/FlightMap/MapItems/VehicleMapItem.qml

@ -27,15 +27,18 @@ This file is part of the QGROUNDCONTROL project @@ -27,15 +27,18 @@ This file is part of the QGROUNDCONTROL project
import QtQuick 2.4
import QtLocation 5.3
import QGroundControl.ScreenTools 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Vehicle 1.0
/// Marker for displaying a vehicle location on the map
MapQuickItem {
property real heading: 0
property bool isSatellite: false
property var vehicle ///< Vehicle object
property bool isSatellite: false ///< true: satellite map is showing
anchorPoint.x: vehicleIcon.width / 2
anchorPoint.y: vehicleIcon.height / 2
anchorPoint.x: vehicleIcon.width / 2
anchorPoint.y: vehicleIcon.height / 2
coordinate: vehicle.coordinate
visible: vehicle.satelliteLock >= 2 // 2D lock
sourceItem: Image {
id: vehicleIcon
@ -47,7 +50,7 @@ MapQuickItem { @@ -47,7 +50,7 @@ MapQuickItem {
transform: Rotation {
origin.x: vehicleIcon.width / 2
origin.y: vehicleIcon.height / 2
angle: heading
angle: vehicle.heading
}
}
}

Loading…
Cancel
Save