1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

Fix GNSS new data (#12725)

Fix gps new data

Initialize next_fix
This commit is contained in:
Mark Haslinghuis 2023-05-11 00:47:50 +02:00 committed by GitHub
parent 8e3389f452
commit f3fab663da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}