diff --git a/src/FlightMap/FlightMap.qml b/src/FlightMap/FlightMap.qml index 7fad44e2a7e8ebbda482c3abf365ac7801ecbcca..5387ebf51314115997a1a8dc27a72c62bf55483e 100644 --- a/src/FlightMap/FlightMap.qml +++ b/src/FlightMap/FlightMap.qml @@ -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 diff --git a/src/FlightMap/MapItems/VehicleMapItem.qml b/src/FlightMap/MapItems/VehicleMapItem.qml index 2da49863e4658566c6eda5b89139901a6c34d425..d15c0a7df99754abc980643c6493364485328c2d 100644 --- a/src/FlightMap/MapItems/VehicleMapItem.qml +++ b/src/FlightMap/MapItems/VehicleMapItem.qml @@ -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 } } }