mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-04-08 00:53:48 +02:00
LP-145 uncrustify and comments
This commit is contained in:
parent
44a57cb308
commit
bb04d62756
@ -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
|
if (c == UBX_SYNC2) { // second UBX sync char found
|
||||||
proto_state = UBX_CLASS;
|
proto_state = UBX_CLASS;
|
||||||
} else {
|
} else {
|
||||||
goto RESTART_NOERROR; // declare a packet error and reparse packet
|
goto RESTART_NOERROR; // reparse packet but don't declare error
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
case UBX_CLASS:
|
case UBX_CLASS:
|
||||||
@ -163,7 +163,7 @@ int parse_ubx_stream(uint8_t *rx, uint16_t len, char *gps_rx_buffer, GPSPosition
|
|||||||
if (ubx->header.len > sizeof(UBXPayload)) {
|
if (ubx->header.len > sizeof(UBXPayload)) {
|
||||||
gpsRxStats->gpsRxOverflow++;
|
gpsRxStats->gpsRxOverflow++;
|
||||||
#if defined(PIOS_GPS_MINIMAL)
|
#if defined(PIOS_GPS_MINIMAL)
|
||||||
goto RESTART_NOERROR; // known issue that some packets are too long - reparse packet
|
goto RESTART_NOERROR; // known issue that some packets are too long on CC3D - reparse packet
|
||||||
#else
|
#else
|
||||||
goto RESTART; // declare a packet error and reparse packet
|
goto RESTART; // declare a packet error and reparse packet
|
||||||
#endif
|
#endif
|
||||||
@ -213,9 +213,9 @@ int parse_ubx_stream(uint8_t *rx, uint16_t len, char *gps_rx_buffer, GPSPosition
|
|||||||
// if restarting due to error detected in 2nd call to this function (on split packet)
|
// if restarting due to error detected in 2nd call to this function (on split packet)
|
||||||
// then we just restart at index 0, which is mid-packet, not the second byte
|
// then we just restart at index 0, which is mid-packet, not the second byte
|
||||||
RESTART:
|
RESTART:
|
||||||
ret = PARSER_ERROR; // inform caller that we found at least one error (along with 0 or more good packets)
|
ret = PARSER_ERROR; // inform caller that we found at least one error (along with 0 or more good packets)
|
||||||
RESTART_NOERROR:
|
RESTART_NOERROR:
|
||||||
rx += restart_index; // restart parsing just past the most recent SYNC1
|
rx += restart_index; // restart parsing just past the most recent SYNC1
|
||||||
len -= restart_index;
|
len -= restart_index;
|
||||||
i = 0;
|
i = 0;
|
||||||
proto_state = START;
|
proto_state = START;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user