Skip to content

Commit 039004e

Browse files
committed
Correct maxNMEAByteCount
1 parent 7004069 commit 039004e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/SparkFun_u-blox_GNSS_Arduino_Library.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ SFE_UBLOX_GNSS::SFE_UBLOX_GNSS(void)
5252
}
5353

5454
_logNMEA.all = 0; // Default to passing no NMEA messages to the file buffer
55-
_processNMEA.all = SFE_UBLOX_FILTER_NMEA_ALL; // Default to passing all NMEA messages to process NMEA
55+
_processNMEA.all = SFE_UBLOX_FILTER_NMEA_ALL; // Default to passing all NMEA messages to processNMEA
5656
}
5757

5858
//Stop all automatic message processing. Free all used RAM

src/SparkFun_u-blox_GNSS_Arduino_Library.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1289,12 +1289,12 @@ class SFE_UBLOX_GNSS
12891289

12901290
unsigned long lastCheck = 0;
12911291

1292-
uint16_t ubxFrameCounter; //Count all UBX frame bytes. [Fixed header(2bytes), CLS(1byte), ID(1byte), length(2bytes), payload(x bytes), checksums(2bytes)]
1292+
uint16_t ubxFrameCounter; //Count all UBX frame bytes. [Fixed header(2bytes), CLS(1byte), ID(1byte), length(2bytes), payload(x bytes), checksums(2bytes)]
12931293
uint8_t rollingChecksumA; //Rolls forward as we receive incoming bytes. Checked against the last two A/B checksum bytes
12941294
uint8_t rollingChecksumB; //Rolls forward as we receive incoming bytes. Checked against the last two A/B checksum bytes
12951295

1296-
int16_t nmeaByteCounter; //Count all NMEA message bytes.
1297-
const int16_t maxNMEAByteCount = 1024; // Abort NMEA message reception if nmeaByteCounter exceeds this
1296+
int8_t nmeaByteCounter; //Count all NMEA message bytes.
1297+
const int8_t maxNMEAByteCount = 82; // Abort NMEA message reception if nmeaByteCounter exceeds this (https://en.wikipedia.org/wiki/NMEA_0183#Message_structure)
12981298
uint8_t nmeaAddressField[6]; // NMEA Address Field - includes the start character (*)
12991299
boolean logThisNMEA(); // Return true if we should log this NMEA message
13001300
boolean processThisNMEA(); // Return true if we should pass this NMEA message to processNMEA

0 commit comments

Comments
 (0)