Commit 01d71470 authored by patrick pereira's avatar patrick pereira 🏃

main: Update position without a connected device

Signed-off-by: patrick pereira's avatarPatrick José Pereira <patrickelectric@gmail.com>
parent e103b4fa
......@@ -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