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

Commit f6a1fe0

Browse files
committed
Adding PR #154 (u-blox 7 series)
1 parent 75eedde commit f6a1fe0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/Series_6_7/Example1_GetPositionAndTime_Series_6_7/SparkFun_Ublox_Arduino_Library_Series_6_7.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,9 @@ void SFE_UBLOX_GPS::processUBXpacket(ubxPacket *msg)
899899
switch (msg->cls)
900900
{
901901
case UBX_CLASS_NAV:
902-
if (msg->id == UBX_NAV_PVT && msg->len == 92)
902+
//u-blox8 length == 92
903+
//u-blox7 length == 84
904+
if ((msg->id == UBX_NAV_PVT) && ((msg->len == 92) || (msg->len == 84)))
903905
{
904906
//Parse various byte fields into global vars
905907
constexpr int startingSpot = 0; //fixed value used in processUBX
@@ -915,6 +917,7 @@ void SFE_UBLOX_GPS::processUBXpacket(ubxPacket *msg)
915917
gpsNanosecond = extractLong(16); //Includes milliseconds
916918

917919
fixType = extractByte(20 - startingSpot);
920+
//Note: the u-blox7 does not support carrSoln. carrierSolution will be zero.
918921
carrierSolution = extractByte(21 - startingSpot) >> 6; //Get 6th&7th bits of this byte
919922
SIV = extractByte(23 - startingSpot);
920923
longitude = extractLong(24 - startingSpot);

0 commit comments

Comments
 (0)