Merge pull request #41 from UT2UH/TResolved

getTimeFullyResolved helper added - thank you @UT2UH
This commit is contained in:
Paul
2021-06-27 16:48:41 +01:00
committed by GitHub
4 changed files with 23 additions and 0 deletions
@@ -9924,6 +9924,21 @@ bool SFE_UBLOX_GNSS::getTimeValid(uint16_t maxWait)
return ((bool)packetUBXNAVPVT->data.valid.bits.validTime);
}
//Check to see if the UTC time has been fully resolved
bool SFE_UBLOX_GNSS::getTimeFullyResolved(uint16_t maxWait)
{
if (packetUBXNAVPVT == NULL) initPacketUBXNAVPVT(); //Check that RAM has been allocated for the PVT data
if (packetUBXNAVPVT == NULL) //Bail if the RAM allocation failed
return (false);
if (packetUBXNAVPVT->moduleQueried.moduleQueried1.bits.fullyResolved == false)
getPVT(maxWait);
packetUBXNAVPVT->moduleQueried.moduleQueried1.bits.fullyResolved = false; //Since we are about to give this to user, mark this data as stale
packetUBXNAVPVT->moduleQueried.moduleQueried1.bits.all = false;
return ((bool)packetUBXNAVPVT->data.valid.bits.fullyResolved);
}
//Get the confirmed date validity
bool SFE_UBLOX_GNSS:: getConfirmedDate(uint16_t maxWait)
{