Skip to content

Commit

Permalink
Correct test for Galileo capability (#6434)
Browse files Browse the repository at this point in the history
* Improve test for Galileo capability
  • Loading branch information
stronnag authored Dec 21, 2020
1 parent b5a8e53 commit a15993c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main/io/gps_ublox.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,16 @@ static bool gpsParceFrameUBLOX(void)
// EXT CORE 3.01 (107900)
// 01234567890123456789012
gpsState.hwVersion = fastA2I(_buffer.ver.hwVersion);
capGalileo = ((gpsState.hwVersion >= 80000) && (_buffer.ver.swVersion[9] > '2')); // M8N and SW major 3 or later
if ((gpsState.hwVersion >= 80000) && (_buffer.ver.swVersion[9] > '2')) {
// check extensions;
// after hw + sw vers; each is 30 bytes
for(int j = 40; j < _payload_length; j += 30) {
if (strnstr((const char *)(_buffer.bytes+j), "GAL", 30)) {
capGalileo = true;
break;
}
}
}
}
break;
case MSG_ACK_ACK:
Expand Down

0 comments on commit a15993c

Please sign in to comment.