Commit 4719c514 authored by Don Gagne's avatar Don Gagne

Merge pull request #1846 from DonLakeFlyer/GPSLock

Don't show vehicle till 2d gps lock
parents 942b6d66 5832b6a3
......@@ -166,8 +166,7 @@ Item {
delegate:
VehicleMapItem {
coordinate: object.coordinate
heading: object.heading
vehicle: object
isSatellite: root.isSatelliteMap
}
}
......@@ -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
......
......@@ -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 {
transform: Rotation {
origin.x: vehicleIcon.width / 2
origin.y: vehicleIcon.height / 2
angle: heading
angle: vehicle.heading
}
}
}
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