Skip to content

Commit

Permalink
fixed: gps sensor can not reinitialize in gps fix estimation mode
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanLut committed Dec 16, 2023
1 parent ec6ea45 commit be33ed1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/io/gps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit be33ed1

Please sign in to comment.