Skip to content

Commit 34880fc

Browse files
committed
v3.1.5 - correct #55
1 parent 7b2e036 commit 34880fc

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=SparkFun u-blox GNSS v3
2-
version=3.1.4
2+
version=3.1.5
33
author=SparkFun Electronics <[email protected]>
44
maintainer=SparkFun Electronics <sparkfun.com>
55
sentence=Library for I2C, Serial and SPI Communication with u-blox GNSS modules<br/><br/>

src/u-blox_GNSS.cpp

+13-3
Original file line numberDiff line numberDiff line change
@@ -8208,7 +8208,8 @@ bool DevUBLOXGNSS::getModuleInfo(uint16_t maxWait)
82088208
ptr = strstr((const char *)&payloadCfg[(30 * extensionNumber)], "FWVER="); // Check for FWVER (should be in extension 1)
82098209
if (ptr != nullptr)
82108210
{
8211-
ptr += strlen("FWVER="); // Point to the firmware type (HPG etc.)
8211+
// Point to the firmware type (HPG etc.)
8212+
ptr += strlen("FWVER=");
82128213
int i = 0;
82138214
while ((i < firmwareTypeLen) && (*ptr != '\0') && (*ptr != ' ')) // Extract the firmware type (3-7 chars)
82148215
moduleSWVersion->firmwareType[i++] = *ptr++;
@@ -8227,8 +8228,9 @@ bool DevUBLOXGNSS::getModuleInfo(uint16_t maxWait)
82278228
fwProtMod |= 0x01; // Record that we got the FWVER
82288229
}
82298230
}
8230-
ptr = strstr((const char *)&payloadCfg[(30 * extensionNumber)], "PROTVER="); // Check for PROTVER (should be in extension 2)
8231+
// Check for PROTVER (should be in extension 2)
82318232
if (ptr != nullptr)
8233+
ptr = strstr((const char *)&payloadCfg[(30 * extensionNumber)], "PROTVER=");
82328234
{
82338235
ptr += strlen("PROTVER="); // Point to the protocol version
82348236
int protHi = 0;
@@ -8241,7 +8243,9 @@ bool DevUBLOXGNSS::getModuleInfo(uint16_t maxWait)
82418243
fwProtMod |= 0x02; // Record that we got the PROTVER
82428244
}
82438245
}
8244-
ptr = strstr((const char *)&payloadCfg[(30 * extensionNumber)], "MOD="); // Check for MOD (should be in extension 3)
8246+
// Check for MOD (should be in extension 3)
8247+
// Note: see issue #55. It appears that the UBX-M10050-KB chip does not report MOD
8248+
ptr = strstr((const char *)&payloadCfg[(30 * extensionNumber)], "MOD=");
82458249
if (ptr != nullptr)
82468250
{
82478251
ptr += strlen("MOD="); // Point to the module name
@@ -8253,6 +8257,12 @@ bool DevUBLOXGNSS::getModuleInfo(uint16_t maxWait)
82538257
}
82548258
}
82558259

8260+
if ((fwProtMod & 0x04) == 0) // Is MOD missing?
8261+
{
8262+
strncpy(moduleSWVersion->moduleName, "NONE", moduleNameMaxLen);
8263+
fwProtMod |= 0x04; // Record that we updated the MOD
8264+
}
8265+
82568266
if (fwProtMod == 0x07) // Did we extract all three?
82578267
{
82588268
#ifndef SFE_UBLOX_REDUCED_PROG_MEM

0 commit comments

Comments
 (0)