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 { ...@@ -166,8 +166,7 @@ Item {
delegate: delegate:
VehicleMapItem { VehicleMapItem {
coordinate: object.coordinate vehicle: object
heading: object.heading
isSatellite: root.isSatelliteMap 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 // Mission item list
ListView { ListView {
id: missionItemSummaryList id: missionItemSummaryList
......
...@@ -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 QtQuick 2.4
import QtLocation 5.3 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 /// Marker for displaying a vehicle location on the map
MapQuickItem { MapQuickItem {
property real heading: 0 property var vehicle ///< Vehicle object
property bool isSatellite: false property bool isSatellite: false ///< true: satellite map is showing
anchorPoint.x: vehicleIcon.width / 2 anchorPoint.x: vehicleIcon.width / 2
anchorPoint.y: vehicleIcon.height / 2 anchorPoint.y: vehicleIcon.height / 2
coordinate: vehicle.coordinate
visible: vehicle.satelliteLock >= 2 // 2D lock
sourceItem: Image { sourceItem: Image {
id: vehicleIcon id: vehicleIcon
...@@ -47,7 +50,7 @@ MapQuickItem { ...@@ -47,7 +50,7 @@ MapQuickItem {
transform: Rotation { transform: Rotation {
origin.x: vehicleIcon.width / 2 origin.x: vehicleIcon.width / 2
origin.y: vehicleIcon.height / 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