From be33ed109b181d160672063c41bc3256a3119414 Mon Sep 17 00:00:00 2001 From: Roman Lut <11955117+RomanLut@users.noreply.github.com> Date: Sat, 16 Dec 2023 19:56:53 +0100 Subject: [PATCH] fixed: gps sensor can not reinitialize in gps fix estimation mode --- src/main/io/gps.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/io/gps.c b/src/main/io/gps.c index 294b9414297..e8975fa043d 100755 --- a/src/main/io/gps.c +++ b/src/main/io/gps.c @@ -399,11 +399,13 @@ void gpsProcessNewSolutionData(bool timeout) // Update time gpsUpdateTime(); - // Update timeout - gpsSetProtocolTimeout(gpsState.baseTimeoutMs); + if (!timeout) { + // Update timeout + gpsSetProtocolTimeout(gpsState.baseTimeoutMs); - // Update statistics - gpsStats.lastMessageDt = gpsState.lastMessageMs - gpsState.lastLastMessageMs; + // Update statistics + gpsStats.lastMessageDt = gpsState.lastMessageMs - gpsState.lastLastMessageMs; + } gpsSol.flags.hasNewData = true; // Toggle heartbeat