mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-26 15:54:15 +01:00
LP-145 reduce UBX false positive red X from 1 in 256 NMEA packets to 1 in 64k
This commit is contained in:
parent
f0ef594cdb
commit
44a57cb308
@ -143,7 +143,7 @@ int parse_ubx_stream(uint8_t *rx, uint16_t len, char *gps_rx_buffer, GPSPosition
|
||||
if (c == UBX_SYNC2) { // second UBX sync char found
|
||||
proto_state = UBX_CLASS;
|
||||
} else {
|
||||
goto RESTART; // declare a packet error and reparse packet
|
||||
goto RESTART_NOERROR; // declare a packet error and reparse packet
|
||||
}
|
||||
continue;
|
||||
case UBX_CLASS:
|
||||
@ -214,9 +214,7 @@ int parse_ubx_stream(uint8_t *rx, uint16_t len, char *gps_rx_buffer, GPSPosition
|
||||
// then we just restart at index 0, which is mid-packet, not the second byte
|
||||
RESTART:
|
||||
ret = PARSER_ERROR; // inform caller that we found at least one error (along with 0 or more good packets)
|
||||
#if defined(PIOS_GPS_MINIMAL)
|
||||
RESTART_NOERROR:
|
||||
#endif
|
||||
rx += restart_index; // restart parsing just past the most recent SYNC1
|
||||
len -= restart_index;
|
||||
i = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user