Merge pull request #666 from hargata/Hargata/gps.timeout.fix

set time out to 4 seconds and max age to 1 second to improve accuracy
This commit is contained in:
Hargata Softworks
2024-10-24 14:14:35 -06:00
committed by GitHub

View File

@@ -252,7 +252,7 @@ function startRecording() {
navigator.wakeLock.request('screen').then((wl) => {
tripWakeLock = wl;
tripTimer = setInterval(() => {
navigator.geolocation.getCurrentPosition(recordPosition, stopRecording, { maximumAge: 10000, timeout: 5000, enableHighAccuracy: true });
navigator.geolocation.getCurrentPosition(recordPosition, stopRecording, { maximumAge: 1000, timeout: 4000, enableHighAccuracy: true });
}, 5000);
$(".trip-start").addClass('d-none');
$(".trip-stop").removeClass('d-none');