Skip to content

v2.0.10 #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 7, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,13 @@ void setup()
// Let's configure the module's navigation rate as if we were using setNavigationFrequency

// Let's create our custom packet
uint8_t customPayload[MAX_PAYLOAD_SIZE]; // This array holds the payload data bytes
uint8_t customPayload[MAX_PAYLOAD_SIZE]; // This array holds the payload data bytes. MAX_PAYLOAD_SIZE defaults to 256. The CFG_RATE payload is only 6 bytes!

// setPacketCfgPayloadSize tells the library how many bytes our customPayload can hold.
// It is more memory-efficient to call setPacketCfgPayloadSize before .begin (to avoid creating a new buffer, copying across
// the contents of the old buffer and then deleting the old buffer). But let's call it here just to prove that we can.
myGNSS.setPacketCfgPayloadSize(MAX_PAYLOAD_SIZE);

// The next line creates and initialises the packet information which wraps around the payload
ubxPacket customCfg = {0, 0, 0, 0, 0, customPayload, 0, 0, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED};

Expand Down
14 changes: 14 additions & 0 deletions examples/Example21_ModuleInfo/Example21_ModuleInfo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ void setup()

//myGNSS.enableDebugging(); // Uncomment this line to enable debug messages

// setPacketCfgPayloadSize tells the library how many bytes our customPayload can hold.
// If we call it after the .begin, the library will attempt to resize the existing 256 byte payload buffer
// by creating a new buffer, copying across the contents of the old buffer, and then delete the old buffer.
// This uses a lot of RAM and causes the code to fail on the ATmega328P. (We are also allocating another 341 bytes for minfo.)
// To keep the code ATmega328P compliant - don't call setPacketCfgPayloadSize after .begin. Call it here instead.
myGNSS.setPacketCfgPayloadSize(MAX_PAYLOAD_SIZE);

if (myGNSS.begin() == false) //Connect to the u-blox module using Wire port
{
Serial.println(F("u-blox GNSS not detected at default I2C address. Please check wiring. Freezing."));
Expand Down Expand Up @@ -119,6 +126,13 @@ boolean SFE_UBLOX_GPS_ADD::getModuleInfo(uint16_t maxWait)
// Let's create our custom packet
uint8_t customPayload[MAX_PAYLOAD_SIZE]; // This array holds the payload data bytes

// setPacketCfgPayloadSize tells the library how many bytes our customPayload can hold.
// If we call it here, after the .begin, the library will attempt to resize the existing 256 byte payload buffer
// by creating a new buffer, copying across the contents of the old buffer, and then delete the old buffer.
// This uses a lot of RAM and causes the code to fail on the ATmega328P. (We are also allocating another 341 bytes for minfo.)
// To keep the code ATmega328P compliant - don't call setPacketCfgPayloadSize here. Call it before .begin instead.
//myGNSS.setPacketCfgPayloadSize(MAX_PAYLOAD_SIZE);

// The next line creates and initialises the packet information which wraps around the payload
ubxPacket customCfg = {0, 0, 0, 0, 0, customPayload, 0, 0, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED};

Expand Down
2 changes: 2 additions & 0 deletions examples/Example3_GetPosition/Example3_GetPosition.ino
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ void setup()

Wire.begin();

//myGNSS.enableDebugging(); // Uncomment this line to enable helpful debug messages on Serial

if (myGNSS.begin() == false) //Connect to the u-blox module using Wire port
{
Serial.println(F("u-blox GNSS not detected at default I2C address. Please check wiring. Freezing."));
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.0.9
version=2.0.10
author=SparkFun Electronics <[email protected]>
maintainer=SparkFun Electronics <sparkfun.com>
sentence=Library for I2C and Serial Communication with u-blox GNSS modules<br/><br/>
Expand Down