I'm writing a new example to test RTCM generation in Rover mode - specifically to test 1230 generation with v2.02 firmware
My loop() is simply:
void loop()
{
myGNSS.update(); // Process bytes as they arrive from LG290P. Call rtcmCallback as needed
}
I have called myGNSS.rtcmSubscribeAll(rtcmCallback) to set up the callback for RTCM
update processes incoming RTCM and calls rtcmCallback as needed
update sets lg290PLibrarySemaphoreBlock true
In code below rtcmCallback, I want to use the GNSS time, which I get using myGNSS.getHour() etc.
getHour() ensures the PQTMPVT message is enabled by calling ensurePvtEnabled()
ensurePvtEnabled() calls ensureMsgEnabled to enable "PQTMPVT" if needed
ensureMsgEnabled calls setMessageRate
setMessageRate calls sendOkCommand to enable the PVT message
sendOkCommand calls sendCommand
sendCommand exits early because lg290PLibrarySemaphoreBlock is true because we are still inside update()
|
bool LG290P::sendCommand(const char *command, const char *parms, uint16_t maxWaitMs, bool waitForResponse) |
|
{ |
|
if (lg290PLibrarySemaphoreBlock) |
|
return false; |
Long story short, PVT is never enabled and getHour etc. return zero
I'm still thinking about possible solutions...
I'm writing a new example to test RTCM generation in Rover mode - specifically to test 1230 generation with v2.02 firmware
My
loop()is simply:I have called
myGNSS.rtcmSubscribeAll(rtcmCallback)to set up the callback for RTCMupdateprocesses incoming RTCM and callsrtcmCallbackas neededupdatesetslg290PLibrarySemaphoreBlocktrueIn code below
rtcmCallback, I want to use the GNSS time, which I get usingmyGNSS.getHour()etc.getHour()ensures the PQTMPVT message is enabled by callingensurePvtEnabled()ensurePvtEnabled()callsensureMsgEnabledto enable "PQTMPVT" if neededensureMsgEnabledcallssetMessageRatesetMessageRatecallssendOkCommandto enable the PVT messagesendOkCommandcallssendCommandsendCommandexits early becauselg290PLibrarySemaphoreBlockistruebecause we are still insideupdate()SparkFun_LG290P_GNSS_Arduino_Library/src/SparkFun_LG290P_GNSS.cpp
Lines 1085 to 1088 in 1e5db69
Long story short, PVT is never enabled and
getHouretc. return zeroI'm still thinking about possible solutions...