-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
In handleGnssDataTask
, data is written from the ring buffer to the SD card in two separate 'chunks' if the data spans the end of the ring buffer:
SparkFun_RTK_Firmware/Firmware/RTK_Surveyor/Tasks.ino
Lines 843 to 845 in 1b542ac
// Reduce bytes to record if we have more then the end of the buffer | |
if ((sdRingBufferTail + bytesToSend) > settings.gnssHandlerBufferSize) | |
bytesToSend = settings.gnssHandlerBufferSize - sdRingBufferTail; |
If enableARPLogging
is enabled, the ARP can be written to the ubxFile in between the two chunks of GNSS data - resulting in message corruption and checksum errors.
The errors can be avoided if all the available data is written to SD card. To keep it simple, two writes are required: from sdRingBufferTail
to settings.gnssHandlerBufferSize
; then from the start of the buffer to dataHead
.
In RTK Everywhere, I made the same change in this commit:
Metadata
Metadata
Assignees
Labels
No labels