From f3fab663dad2de01a617f761b11cc52ba49b4922 Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Thu, 11 May 2023 00:47:50 +0200 Subject: [PATCH] Fix GNSS new data (#12725) Fix gps new data Initialize next_fix --- src/main/io/gps.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/io/gps.c b/src/main/io/gps.c index 1def3070b4..825a767092 100644 --- a/src/main/io/gps.c +++ b/src/main/io/gps.c @@ -1480,12 +1480,12 @@ static uint8_t _ck_b; // State machine state static bool _skip_packet; -static uint8_t _step; +static uint8_t _step = 0; static uint8_t _msg_id; static uint16_t _payload_length; static uint16_t _payload_counter; -static bool next_fix; +static bool next_fix = false; static uint8_t _class; // do we have new position information? @@ -1955,8 +1955,8 @@ void onGpsNewData(void) lastTimeUs = timeUs; - if (!(STATE(GPS_FIX) && gpsSol.numSat >= GPS_MIN_SAT_COUNT)) { - // if we don't have a 3D fix and the minimum sats, don't give data to GPS rescue + if (!STATE(GPS_FIX)) { + // if we don't have a 3D fix don't give data to GPS rescue return; }