Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/compile-sketch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
board:
# Uno
# https://github.com/arduino/ArduinoCore-avr/blob/master/boards.txt
- fqbn: arduino:avr:uno
- fqbn: arduino:avr:mega
platforms: |
- name: arduino:avr
source-url: https://downloads.arduino.cc/packages/package_index.json
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=SparkFun u-blox GNSS Arduino Library
version=2.2.28
version=2.2.29
author=SparkFun Electronics <techsupport@sparkfun.com>
maintainer=SparkFun Electronics <sparkfun.com>
sentence=Library for I2C, Serial and SPI Communication with u-blox GNSS modules<br/><br/>
Expand Down
4 changes: 2 additions & 2 deletions src/SparkFun_u-blox_GNSS_Arduino_Library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7124,7 +7124,7 @@ bool SFE_UBLOX_GNSS::storePacket(ubxPacket *msg)

// Now, check if there is enough space in the buffer for all of the data
uint16_t totalLength = msg->len + 8; // Total length. Include sync chars, class, id, length and checksum bytes
if (totalLength > fileBufferSpaceAvailable())
if (totalLength >= fileBufferSpaceAvailable()) // Use >= so a write can never exactly fill the buffer (head == tail would then wrongly mean empty)
{
#ifndef SFE_UBLOX_REDUCED_PROG_MEM
if ((_printDebug == true) || (_printLimitedDebug == true)) // This is important. Print this if doing limited debugging
Expand Down Expand Up @@ -7175,7 +7175,7 @@ bool SFE_UBLOX_GNSS::storeFileBytes(uint8_t *theBytes, uint16_t numBytes)
}

// Now, check if there is enough space in the buffer for all of the data
if (numBytes > fileBufferSpaceAvailable())
if (numBytes >= fileBufferSpaceAvailable()) // Use >= so a write can never exactly fill the buffer (head == tail would then wrongly mean empty)
{
#ifndef SFE_UBLOX_REDUCED_PROG_MEM
if ((_printDebug == true) || (_printLimitedDebug == true)) // This is important. Print this if doing limited debugging
Expand Down
Loading