Browse Source

CP - If GCS starts receiving its own coordinates, don't change the map center if it is already tracking the vehicle.

QGC4.4
Gus Grubba 5 years ago
parent
commit
4340f2a2ea
  1. 5
      src/FlightMap/FlightMap.qml

5
src/FlightMap/FlightMap.qml

@ -78,7 +78,10 @@ Map {
onGcsPositionChanged: { onGcsPositionChanged: {
if (gcsPosition.isValid && allowGCSLocationCenter && !firstGCSPositionReceived && !firstVehiclePositionReceived) { if (gcsPosition.isValid && allowGCSLocationCenter && !firstGCSPositionReceived && !firstVehiclePositionReceived) {
firstGCSPositionReceived = true firstGCSPositionReceived = true
center = gcsPosition //-- Only center on gsc if we have no vehicle (and we are supposed to do so)
var activeVehicleCoordinate = activeVehicle ? activeVehicle.coordinate : QtPositioning.coordinate()
if(QGroundControl.settingsManager.flyViewSettings.keepMapCenteredOnVehicle.rawValue || !activeVehicleCoordinate.isValid)
center = gcsPosition
} }
} }

Loading…
Cancel
Save