Skip to content

Commit 80b7616

Browse files
committed
Retry UM980 getVersion() if initial query returns error
See issue here: https://community.sparkfun.com/t/rtk-everywhere-rc-v2-2-not-provisioning-pointperfect-token/65996/7
1 parent 1f24ae4 commit 80b7616

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Firmware/RTK_Everywhere/GNSS_UM980.ino

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,22 @@ void GNSS_UM980::begin()
9999
}
100100
systemPrintln("GNSS UM980 online");
101101

102-
// Shortly after reset, the UM980 responds to the VERSIONB command with OK but doesn't report version information
103-
if (ENABLE_DEVELOPER == false)
104-
delay(2000); // 1s fails, 2s ok
105-
106102
// Check firmware version and print info
107103
printModuleInfo();
108104

109105
// Shortly after reset, the UM980 responds to the VERSIONB command with OK but doesn't report version information
110106
snprintf(gnssFirmwareVersion, sizeof(gnssFirmwareVersion), "%s", _um980->getVersion());
111107

108+
if (strcmp(gnssFirmwareVersion, "Error") == 0)
109+
{
110+
// Shortly after reset, the UM980 responds to the VERSIONB command with OK but doesn't report version
111+
// information
112+
delay(2000); // 1s fails, 2s ok
113+
114+
// Ask for the version again after a short delay
115+
snprintf(gnssFirmwareVersion, sizeof(gnssFirmwareVersion), "%s", _um980->getVersion());
116+
}
117+
112118
if (sscanf(gnssFirmwareVersion, "%d", &gnssFirmwareVersionInt) != 1)
113119
gnssFirmwareVersionInt = 99;
114120

0 commit comments

Comments
 (0)