Commit 4340f2a2 authored by Gus Grubba's avatar Gus Grubba
Browse files

CP - If GCS starts receiving its own coordinates, don't change the map center...

CP - If GCS starts receiving its own coordinates, don't change the map center if it is already tracking the vehicle.
parent 62ebf7ee
......@@ -78,6 +78,9 @@ Map {
onGcsPositionChanged: {
if (gcsPosition.isValid && allowGCSLocationCenter && !firstGCSPositionReceived && !firstVehiclePositionReceived) {
firstGCSPositionReceived = true
//-- 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
}
}
......
Supports Markdown
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