-
Notifications
You must be signed in to change notification settings - Fork 2
Description
After commit 4904613, the NMEA CR and LF are: retained in the parse->buffer; included in the parse->length; and, critically, are passed through to the badCrcCallback.
On the Unicore UM980, the pseudo-NMEA command responses include the $ prefix in the checksum calculation. This means the badCrcCallback is triggered each time a response is received.
The Unicore Library badNmeaChecksum function is hard-coded to expect the NMEA checksum in the last two bytes. The CR and LF mess this up, causing the modified checksum check to fail.
The Unicore Library sends a MODE command during begin to establish if the GNSS isConnected. Because the CR and LF are present, isConnected fails and so the begin fails.
Long story short, any code which uses UM980::begin will currently fail. This includes RTK Everywhere on Torch...
We have broken backward-compatibility... All code which includes a badCrcCallback for NMEA is now getting the CR and LF, when it wasn't previously.
Thinking about possible fixes:
We can add a nasty fix in the UM980 Library to test for and ignore the CR and LF.
Or, in this library, we could reduce parse->length by 2 before passing parse to the badCrcCallback. In essence, this is what the previous library was doing.
Or, we could do something clever with the new bytesToIgnore parameter, including passing that to the badCrcCallback....?
Votes please.