Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Commit 9f3799d

Browse files
authored
Merge pull request #111 from sparkfun/Correcting_Example21
Clear extensionNo and fix compiler warnings
2 parents 61c85b6 + 5cd5a20 commit 9f3799d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

examples/Example21_ModuleInfo/Example21_ModuleInfo.ino

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,11 @@ void loop()
110110

111111
boolean SFE_UBLOX_GPS_ADD::getModuleInfo(uint16_t maxWait)
112112
{
113-
myGPS.minfo.hwVersion[0] = NULL;
114-
myGPS.minfo.swVersion[0] = NULL;
113+
myGPS.minfo.hwVersion[0] = 0;
114+
myGPS.minfo.swVersion[0] = 0;
115115
for (int i = 0; i < 10; i++)
116-
myGPS.minfo.extension[i][0] = NULL;
116+
myGPS.minfo.extension[i][0] = 0;
117+
myGPS.minfo.extensionNo = 0;
117118

118119
// Let's create our custom packet
119120
uint8_t customPayload[MAX_PAYLOAD_SIZE]; // This array holds the payload data bytes
@@ -152,7 +153,7 @@ boolean SFE_UBLOX_GPS_ADD::getModuleInfo(uint16_t maxWait)
152153
if (sendCommand(&customCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED)
153154
return (false); //If command send fails then bail
154155

155-
// Now let's extract the module info from customPayload
156+
// Now let's extract the module info from customPayload
156157

157158
uint16_t position = 0;
158159
for (int i = 0; i < 30; i++)

0 commit comments

Comments
 (0)