@@ -585,6 +585,7 @@ void SFE_UBLOX_GPS::processUBXpacket(ubxPacket *msg)
585
585
// Parse various byte fields into global vars
586
586
constexpr int startingSpot = 0 ; // fixed value used in processUBX
587
587
588
+ timeOfWeek = extractLong (0 );
588
589
gpsMillisecond = extractLong (0 ) % 1000 ; // Get last three digits of iTOW
589
590
gpsYear = extractInt (4 );
590
591
gpsMonth = extractByte (6 );
@@ -639,14 +640,14 @@ void SFE_UBLOX_GPS::processUBXpacket(ubxPacket *msg)
639
640
verticalAccuracy = extractLong (32 );
640
641
641
642
highResModuleQueried.all = true ;
642
- highResModuleQueried.timeOfWeek = true ;
643
643
highResModuleQueried.highResLatitude = true ;
644
644
highResModuleQueried.highResLongitude = true ;
645
645
highResModuleQueried.elipsoid = true ;
646
646
highResModuleQueried.meanSeaLevel = true ;
647
647
highResModuleQueried.geoidSeparation = true ;
648
648
highResModuleQueried.horizontalAccuracy = true ;
649
649
highResModuleQueried.verticalAccuracy = true ;
650
+ moduleQueried.gpsiTOW = true ; // this can arrive via HPPOS too.
650
651
651
652
if (_printDebug == true )
652
653
{
@@ -1765,12 +1766,13 @@ boolean SFE_UBLOX_GPS::getPVT(uint16_t maxWait)
1765
1766
1766
1767
uint32_t SFE_UBLOX_GPS::getTimeOfWeek (uint16_t maxWait /* = 250*/ )
1767
1768
{
1768
- if (highResModuleQueried. timeOfWeek == false )
1769
- getHPPOSLLH ();
1770
- highResModuleQueried. timeOfWeek = false ; // Since we are about to give this to user, mark this data as stale
1769
+ if (moduleQueried. gpsiTOW == false )
1770
+ getPVT ();
1771
+ moduleQueried. gpsiTOW = false ; // Since we are about to give this to user, mark this data as stale
1771
1772
return (timeOfWeek);
1772
1773
}
1773
1774
1775
+
1774
1776
int32_t SFE_UBLOX_GPS::getHighResLatitude (uint16_t maxWait /* = 250*/ )
1775
1777
{
1776
1778
if (highResModuleQueried.highResLatitude == false )
0 commit comments