diff --git a/.github/workflows/compile-sketch.yml b/.github/workflows/compile-sketch.yml index 4b7eadd0..e2e0e540 100644 --- a/.github/workflows/compile-sketch.yml +++ b/.github/workflows/compile-sketch.yml @@ -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 diff --git a/library.properties b/library.properties index 1fd62589..88790b8b 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=SparkFun u-blox GNSS Arduino Library -version=2.2.28 +version=2.2.29 author=SparkFun Electronics maintainer=SparkFun Electronics sentence=Library for I2C, Serial and SPI Communication with u-blox GNSS modules

diff --git a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp index 4ed6325c..2f02cf42 100644 --- a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp +++ b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp @@ -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 @@ -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