@@ -601,6 +601,7 @@ void SFE_UBLOX_GPS::processUBXpacket(ubxPacket *msg)
601
601
// Parse various byte fields into global vars
602
602
constexpr int startingSpot = 0 ; // fixed value used in processUBX
603
603
604
+ timeOfWeek = extractLong (0 );
604
605
gpsMillisecond = extractLong (0 ) % 1000 ; // Get last three digits of iTOW
605
606
gpsYear = extractInt (4 );
606
607
gpsMonth = extractByte (6 );
@@ -655,14 +656,14 @@ void SFE_UBLOX_GPS::processUBXpacket(ubxPacket *msg)
655
656
verticalAccuracy = extractLong (32 );
656
657
657
658
highResModuleQueried.all = true ;
658
- highResModuleQueried.timeOfWeek = true ;
659
659
highResModuleQueried.highResLatitude = true ;
660
660
highResModuleQueried.highResLongitude = true ;
661
661
highResModuleQueried.elipsoid = true ;
662
662
highResModuleQueried.meanSeaLevel = true ;
663
663
highResModuleQueried.geoidSeparation = true ;
664
664
highResModuleQueried.horizontalAccuracy = true ;
665
665
highResModuleQueried.verticalAccuracy = true ;
666
+ moduleQueried.timeOfWeek = true ; // this can arrive here too.
666
667
667
668
if (_printDebug == true )
668
669
{
@@ -1781,12 +1782,13 @@ boolean SFE_UBLOX_GPS::getPVT(uint16_t maxWait)
1781
1782
1782
1783
uint32_t SFE_UBLOX_GPS::getTimeOfWeek (uint16_t maxWait /* = 250*/ )
1783
1784
{
1784
- if (highResModuleQueried. timeOfWeek == false )
1785
- getHPPOSLLH ();
1786
- highResModuleQueried. timeOfWeek = false ; // Since we are about to give this to user, mark this data as stale
1785
+ if (moduleQueried. gpsiTOW == false )
1786
+ getPVT ();
1787
+ moduleQueried. gpsiTOW = false ; // Since we are about to give this to user, mark this data as stale
1787
1788
return (timeOfWeek);
1788
1789
}
1789
1790
1791
+
1790
1792
int32_t SFE_UBLOX_GPS::getHighResLatitude (uint16_t maxWait /* = 250*/ )
1791
1793
{
1792
1794
if (highResModuleQueried.highResLatitude == false )
0 commit comments