Commit 31fe3ed1 authored by Eike Hein's avatar Eike Hein

Merge branch 'fix2' into 'master'

Add application position if there is no vehicle connected

See merge request !2
parents 160121af 01d71470
......@@ -192,15 +192,19 @@ Kirigami.ApplicationWindow {
property var _lastKnownCoordinate: null
active: connected && kirogiSettings.allowLocationRequests && locationPermissions.granted
active: kirogiSettings.allowLocationRequests && locationPermissions.granted
updateInterval: 5000
preferredPositioningMethods: PositionSource.SatellitePositioningMethods
onPositionChanged: {
if (position.latitudeValid && position.longitudeValid && position.altitudeValid) {
_lastKnownCoordinate = position.coordinate;
currentVehicle.setControllerGpsPosition(_lastKnownCoordinate);
// Position via internet IP does not provide a valid altitude
if (position.latitudeValid && position.longitudeValid) {
_lastKnownCoordinate = position.coordinate
if(currentVehicle) {
currentVehicle.setControllerGpsPosition(_lastKnownCoordinate)
}
}
}
}
......
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