Skip to content

Commit

Permalink
Fix GNSS new data (#12725)
Browse files Browse the repository at this point in the history
Fix gps new data

Initialize next_fix
  • Loading branch information
haslinghuis committed May 10, 2023
1 parent 8e3389f commit f3fab66
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/io/gps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit f3fab66

Please sign in to comment.