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

Commit f101690

Browse files
committed
Merge branch 'Experimental_custom_packetCfg' into Experimental__custom_packetCfg
2 parents e514b38 + 95a729a commit f101690

File tree

2 files changed

+83
-62
lines changed

2 files changed

+83
-62
lines changed

src/SparkFun_Ublox_Arduino_Library.cpp

Lines changed: 77 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -263,18 +263,18 @@ void SFE_UBLOX_GPS::setNMEAOutputPort(Stream &nmeaOutputPort)
263263
}
264264

265265
//Called regularly to check for available bytes on the user' specified port
266-
boolean SFE_UBLOX_GPS::checkUblox(uint8_t requestedClass, uint8_t requestedID)
266+
boolean SFE_UBLOX_GPS::checkUblox(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID)
267267
{
268268
if (commType == COMM_TYPE_I2C)
269-
return (checkUbloxI2C(requestedClass, requestedID));
269+
return (checkUbloxI2C(incomingUBX, requestedClass, requestedID));
270270
else if (commType == COMM_TYPE_SERIAL)
271-
return (checkUbloxSerial(requestedClass, requestedID));
271+
return (checkUbloxSerial(incomingUBX, requestedClass, requestedID));
272272
return false;
273273
}
274274

275275
//Polls I2C for data, passing any new bytes to process()
276276
//Returns true if new bytes are available
277-
boolean SFE_UBLOX_GPS::checkUbloxI2C(uint8_t requestedClass, uint8_t requestedID)
277+
boolean SFE_UBLOX_GPS::checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID)
278278
{
279279
if (millis() - lastCheck >= i2cPollingWait)
280280
{
@@ -401,7 +401,7 @@ boolean SFE_UBLOX_GPS::checkUbloxI2C(uint8_t requestedClass, uint8_t requestedID
401401
}
402402
}
403403

404-
process(incoming, requestedClass, requestedID); //Process this valid character
404+
process(incoming, incomingUBX, requestedClass, requestedID); //Process this valid character
405405
}
406406
}
407407
else
@@ -416,19 +416,19 @@ boolean SFE_UBLOX_GPS::checkUbloxI2C(uint8_t requestedClass, uint8_t requestedID
416416
} //end checkUbloxI2C()
417417

418418
//Checks Serial for data, passing any new bytes to process()
419-
boolean SFE_UBLOX_GPS::checkUbloxSerial(uint8_t requestedClass, uint8_t requestedID)
419+
boolean SFE_UBLOX_GPS::checkUbloxSerial(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID)
420420
{
421421
while (_serialPort->available())
422422
{
423-
process(_serialPort->read(), requestedClass, requestedID);
423+
process(_serialPort->read(), incomingUBX, requestedClass, requestedID);
424424
}
425425
return (true);
426426

427427
} //end checkUbloxSerial()
428428

429429
//Processes NMEA and UBX binary sentences one byte at a time
430430
//Take a given byte and file it into the proper array
431-
void SFE_UBLOX_GPS::process(uint8_t incoming, uint8_t requestedClass, uint8_t requestedID)
431+
void SFE_UBLOX_GPS::process(uint8_t incoming, ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID)
432432
{
433433
if (currentSentence == NONE || currentSentence == NMEA)
434434
{
@@ -477,8 +477,8 @@ void SFE_UBLOX_GPS::process(uint8_t incoming, uint8_t requestedClass, uint8_t re
477477
}
478478
else
479479
{
480-
packetCfg.counter = 0;
481-
packetCfg.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED;
480+
incomingUBX->counter = 0;
481+
incomingUBX->valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED;
482482
ubxFrameClass = CLASS_NOT_AN_ACK;
483483
}
484484
}
@@ -489,7 +489,7 @@ void SFE_UBLOX_GPS::process(uint8_t incoming, uint8_t requestedClass, uint8_t re
489489
if (ubxFrameClass == CLASS_ACK)
490490
processUBX(incoming, &packetAck, requestedClass, requestedID);
491491
else if (ubxFrameClass == CLASS_NOT_AN_ACK)
492-
processUBX(incoming, &packetCfg, requestedClass, requestedID);
492+
processUBX(incoming, incomingUBX, requestedClass, requestedID);
493493
}
494494
else if (currentSentence == NMEA)
495495
{
@@ -611,7 +611,7 @@ void SFE_UBLOX_GPS::processUBX(uint8_t incoming, ubxPacket *incomingUBX, uint8_t
611611
currentSentence = NONE; //We're done! Reset the sentence to being looking for a new start char
612612

613613
//Validate this sentence
614-
if (incomingUBX->checksumA == rollingChecksumA && incomingUBX->checksumB == rollingChecksumB)
614+
if ((incomingUBX->checksumA == rollingChecksumA) && (incomingUBX->checksumB == rollingChecksumB))
615615
{
616616
incomingUBX->valid = SFE_UBLOX_PACKET_VALIDITY_VALID;
617617

@@ -633,6 +633,13 @@ void SFE_UBLOX_GPS::processUBX(uint8_t incoming, ubxPacket *incomingUBX, uint8_t
633633
&& (incomingUBX->payload[0] == requestedClass) && (incomingUBX->payload[1] == requestedID))
634634
{
635635
incomingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_VALID; // If we have a match, set the classAndIDmatch flag to NOT_VALID
636+
if (_printDebug == true)
637+
{
638+
_debugSerial->print(F("processUBX: NACK received: Requested Class: "));
639+
_debugSerial->print(incomingUBX->payload[0]);
640+
_debugSerial->print(F(" Requested ID: "));
641+
_debugSerial->println(incomingUBX->payload[1]);
642+
}
636643
}
637644

638645
if (_printDebug == true)
@@ -642,7 +649,7 @@ void SFE_UBLOX_GPS::processUBX(uint8_t incoming, ubxPacket *incomingUBX, uint8_t
642649
_debugSerial->print(F(" Received: "));
643650
printPacket(incomingUBX);
644651

645-
if (packetCfg.valid == SFE_UBLOX_PACKET_VALIDITY_VALID)
652+
if (incomingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID)
646653
{
647654
if (_printDebug == true)
648655
{
@@ -656,7 +663,7 @@ void SFE_UBLOX_GPS::processUBX(uint8_t incoming, ubxPacket *incomingUBX, uint8_t
656663
_debugSerial->println(F("packetAck now valid"));
657664
}
658665
}
659-
if (packetCfg.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID)
666+
if (incomingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID)
660667
{
661668
if (_printDebug == true)
662669
{
@@ -682,6 +689,7 @@ void SFE_UBLOX_GPS::processUBX(uint8_t incoming, ubxPacket *incomingUBX, uint8_t
682689
// This is potentially risky as we are saying that we saw the requested Class and ID
683690
// but that the packet checksum failed. Potentially it could be the class or ID bytes
684691
// that caused the checksum error!
692+
685693
if ((incomingUBX->cls == requestedClass) && (incomingUBX->id == requestedID))
686694
{
687695
incomingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_VALID; // If we have a match, set the classAndIDmatch flag to not valid
@@ -906,15 +914,15 @@ sfe_ublox_status_e SFE_UBLOX_GPS::sendCommand(ubxPacket outgoingUBX, uint16_t ma
906914
{
907915
_debugSerial->println(F("sendCommand: Waiting for ACK response"));
908916
}
909-
retVal = waitForACKResponse(outgoingUBX.cls, outgoingUBX.id, maxWait); //Wait for Ack response
917+
retVal = waitForACKResponse(&outgoingUBX, outgoingUBX.cls, outgoingUBX.id, maxWait); //Wait for Ack response
910918
}
911919
else
912920
{
913921
if (_printDebug == true)
914922
{
915923
_debugSerial->println(F("sendCommand: Waiting for No ACK response"));
916924
}
917-
retVal = waitForNoACKResponse(outgoingUBX.cls, outgoingUBX.id, maxWait); //Wait for Ack response
925+
retVal = waitForNoACKResponse(&outgoingUBX, outgoingUBX.cls, outgoingUBX.id, maxWait); //Wait for Ack response
918926
}
919927
}
920928
return retVal;
@@ -1124,20 +1132,20 @@ void SFE_UBLOX_GPS::printPacket(ubxPacket *packet)
11241132
//Returns SFE_UBLOX_STATUS_FAIL if we got an invalid packetCfg (checksum failure)
11251133
//Returns SFE_UBLOX_STATUS_COMMAND_UNKNOWN if we got a NACK (command unknown)
11261134
//Returns SFE_UBLOX_STATUS_TIMEOUT if we timed out
1127-
sfe_ublox_status_e SFE_UBLOX_GPS::waitForACKResponse(uint8_t requestedClass, uint8_t requestedID, uint16_t maxTime)
1135+
sfe_ublox_status_e SFE_UBLOX_GPS::waitForACKResponse(ubxPacket *outgoingUBX, uint8_t requestedClass, uint8_t requestedID, uint16_t maxTime)
11281136
{
1129-
packetCfg.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; //This will go VALID (or NOT_VALID) when we receive a response to the packet we sent
1137+
outgoingUBX->valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; //This will go VALID (or NOT_VALID) when we receive a response to the packet we sent
11301138
packetAck.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED;
1131-
packetCfg.classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; // This will go VALID (or NOT_VALID) when we receive a packet that matches the requested class and ID
1139+
outgoingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; // This will go VALID (or NOT_VALID) when we receive a packet that matches the requested class and ID
11321140
packetAck.classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED;
11331141

11341142
unsigned long startTime = millis();
11351143
while (millis() - startTime < maxTime)
11361144
{
1137-
if (checkUblox(requestedClass, requestedID) == true) //See if new data is available. Process bytes as they come in.
1145+
if (checkUblox(outgoingUBX, requestedClass, requestedID) == true) //See if new data is available. Process bytes as they come in.
11381146
{
1139-
// If both the packetCfg.classAndIDmatch and packetAck.classAndIDmatch are VALID then we are all done
1140-
if ((packetCfg.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID)
1147+
// If both the outgoingUBX->classAndIDmatch and packetAck.classAndIDmatch are VALID then we are all done
1148+
if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID)
11411149
&& (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID))
11421150
{
11431151
if (_printDebug == true)
@@ -1149,10 +1157,10 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForACKResponse(uint8_t requestedClass, uin
11491157
return (SFE_UBLOX_STATUS_DATA_RECEIVED); //We received valid data and a correct ACK!
11501158
}
11511159

1152-
// If the packetCfg.classAndIDmatch is NOT_VALID but the packetAck.classAndIDmatch is VALID
1160+
// If the outgoingUBX->classAndIDmatch is NOT_VALID but the packetAck.classAndIDmatch is VALID
11531161
// then we could take a gamble and return DATA_RECEIVED, but it is safer to return
11541162
// FAIL instead
1155-
else if ((packetCfg.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID)
1163+
else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID)
11561164
&& (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID))
11571165
{
11581166
if (_printDebug == true)
@@ -1164,10 +1172,10 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForACKResponse(uint8_t requestedClass, uin
11641172
return (SFE_UBLOX_STATUS_FAIL); //We received valid data and a correct ACK!
11651173
}
11661174

1167-
// If the packetCfg.classAndIDmatch is VALID but the packetAck.classAndIDmatch is NOT_VALID
1175+
// If the outgoingUBX->classAndIDmatch is VALID but the packetAck.classAndIDmatch is NOT_VALID
11681176
// then we will take a gamble and return DATA_RECEIVED. If we were playing safe, we should
11691177
// return FAIL instead
1170-
else if ((packetCfg.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID)
1178+
else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID)
11711179
&& (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID))
11721180
{
11731181
if (_printDebug == true)
@@ -1179,9 +1187,9 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForACKResponse(uint8_t requestedClass, uin
11791187
return (SFE_UBLOX_STATUS_DATA_RECEIVED); //We received valid data and an invalid ACK!
11801188
}
11811189

1182-
// If the packetCfg.classAndIDmatch is NOT_VALID and the packetAck.classAndIDmatch is NOT_VALID
1190+
// If the outgoingUBX->classAndIDmatch is NOT_VALID and the packetAck.classAndIDmatch is NOT_VALID
11831191
// then we return a FAIL
1184-
else if ((packetCfg.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID)
1192+
else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID)
11851193
&& (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID))
11861194
{
11871195
if (_printDebug == true)
@@ -1193,9 +1201,9 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForACKResponse(uint8_t requestedClass, uin
11931201
return (SFE_UBLOX_STATUS_FAIL); //We received invalid data and an invalid ACK!
11941202
}
11951203

1196-
// If the packetCfg.classAndIDmatch is VALID and the packetAck.classAndIDmatch is NOT_DEFINED
1204+
// If the outgoingUBX->classAndIDmatch is VALID and the packetAck.classAndIDmatch is NOT_DEFINED
11971205
// then we keep waiting for an ACK
1198-
else if ((packetCfg.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID)
1206+
else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID)
11991207
&& (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED))
12001208
{
12011209
if (_printDebug == true)
@@ -1206,9 +1214,9 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForACKResponse(uint8_t requestedClass, uin
12061214
}
12071215
}
12081216

1209-
// If the packetCfg.classAndIDmatch is NOT_DEFINED and the packetAck.classAndIDmatch is VALID
1217+
// If the outgoingUBX->classAndIDmatch is NOT_DEFINED and the packetAck.classAndIDmatch is VALID
12101218
// then we return DATA_SENT.
1211-
else if ((packetCfg.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED)
1219+
else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED)
12121220
&& (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID))
12131221
{
12141222
if (_printDebug == true)
@@ -1226,9 +1234,9 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForACKResponse(uint8_t requestedClass, uin
12261234
} //while (millis() - startTime < maxTime)
12271235

12281236
// We have timed out...
1229-
// If the packetCfg.classAndIDmatch is VALID then we can take a gamble and return DATA_RECEIVED
1237+
// If the outgoingUBX->classAndIDmatch is VALID then we can take a gamble and return DATA_RECEIVED
12301238
// even though we did not get an ACK
1231-
if ((packetCfg.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID)
1239+
if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID)
12321240
&& (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED))
12331241
{
12341242
if (_printDebug == true)
@@ -1254,23 +1262,23 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForACKResponse(uint8_t requestedClass, uin
12541262
//Returns SFE_UBLOX_STATUS_DATA_RECEIVED if we got a config packet full of response data that has CLS/ID match to our query packet
12551263
//Returns SFE_UBLOX_STATUS_CRC_FAIL if we got a corrupt config packet that has CLS/ID match to our query packet
12561264
//Returns SFE_UBLOX_STATUS_TIMEOUT if we timed out
1257-
sfe_ublox_status_e SFE_UBLOX_GPS::waitForNoACKResponse(uint8_t requestedClass, uint8_t requestedID, uint16_t maxTime)
1265+
sfe_ublox_status_e SFE_UBLOX_GPS::waitForNoACKResponse(ubxPacket *outgoingUBX, uint8_t requestedClass, uint8_t requestedID, uint16_t maxTime)
12581266
{
1259-
packetCfg.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; //This will go VALID (or NOT_VALID) when we receive a response to the packet we sent
1267+
outgoingUBX->valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; //This will go VALID (or NOT_VALID) when we receive a response to the packet we sent
12601268
packetAck.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED;
1261-
packetCfg.classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; // This will go VALID (or NOT_VALID) when we receive a packet that matches the requested class and ID
1269+
outgoingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; // This will go VALID (or NOT_VALID) when we receive a packet that matches the requested class and ID
12621270
packetAck.classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED;
1263-
packetCfg.cls = 255; // Use the packet class and id to indicate if an unexpected packet has been received
1264-
packetCfg.id = 255;
1271+
outgoingUBX->cls = 255; // Use the packet class and id to indicate if an unexpected packet has been received
1272+
outgoingUBX->id = 255;
12651273

12661274
unsigned long startTime = millis();
12671275
while (millis() - startTime < maxTime)
12681276
{
1269-
if (checkUblox(requestedClass, requestedID) == true) //See if new data is available. Process bytes as they come in.
1277+
if (checkUblox(outgoingUBX, requestedClass, requestedID) == true) //See if new data is available. Process bytes as they come in.
12701278
{
12711279

1272-
// If the packetCfg.classAndIDmatch is VALID then we are all done
1273-
if (packetCfg.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID)
1280+
// If the outgoingUBX->classAndIDmatch is VALID then we are all done
1281+
if (outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID)
12741282
{
12751283
if (_printDebug == true)
12761284
{
@@ -1281,35 +1289,48 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForNoACKResponse(uint8_t requestedClass, u
12811289
return (SFE_UBLOX_STATUS_DATA_RECEIVED); //We received valid data and a correct ACK!
12821290
}
12831291

1284-
// If the packetCfg.classAndIDmatch is NOT_VALID then we return CRC failure
1285-
else if (packetCfg.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID)
1292+
// If the outgoingUBX->classAndIDmatch is NOT_VALID then we return CRC failure
1293+
else if (outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID)
12861294
{
1287-
if (_printDebug == true)
1295+
if (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID)
12881296
{
1289-
_debugSerial->print(F("waitForNoACKResponse: CLS/ID match but failed CRC after "));
1290-
_debugSerial->print(millis() - startTime);
1291-
_debugSerial->println(F(" msec"));
1297+
if (_printDebug == true)
1298+
{
1299+
_debugSerial->print(F("waitForNoACKResponse: CLS/ID match but NACK received after "));
1300+
_debugSerial->print(millis() - startTime);
1301+
_debugSerial->println(F(" msec"));
1302+
}
1303+
return (SFE_UBLOX_STATUS_CRC_FAIL); //We received invalid data
1304+
}
1305+
else if (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID)
1306+
{
1307+
if (_printDebug == true)
1308+
{
1309+
_debugSerial->print(F("waitForNoACKResponse: CLS/ID match but failed CRC after "));
1310+
_debugSerial->print(millis() - startTime);
1311+
_debugSerial->println(F(" msec"));
1312+
}
1313+
return (SFE_UBLOX_STATUS_CRC_FAIL); //We received invalid data
12921314
}
1293-
return (SFE_UBLOX_STATUS_CRC_FAIL); //We received invalid data
12941315
}
12951316

1296-
else if ((packetCfg.cls < 255) && (packetCfg.id < 255) && (packetCfg.valid != SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED))
1317+
else if ((outgoingUBX->cls < 255) && (outgoingUBX->id < 255) && (outgoingUBX->valid != SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED))
12971318
{
12981319
//We got a valid or invalid packet but it was not the droid we were looking for
12991320
//Reset packet and continue checking incoming data for matching cls/id
13001321
if (_printDebug == true)
13011322
{
13021323
_debugSerial->print(F("waitForNoACKResponse: CLS/ID mismatch: "));
13031324
_debugSerial->print(F("CLS: "));
1304-
_debugSerial->print(packetCfg.cls, HEX);
1325+
_debugSerial->print(outgoingUBX->cls, HEX);
13051326
_debugSerial->print(F(" ID: "));
1306-
_debugSerial->print(packetCfg.id, HEX);
1327+
_debugSerial->print(outgoingUBX->id, HEX);
13071328
_debugSerial->println();
13081329
}
13091330

1310-
packetCfg.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; //This will go VALID (or NOT_VALID) when we receive a response to the packet we sent
1311-
packetCfg.cls = 255;
1312-
packetCfg.id = 255;
1331+
outgoingUBX->valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; //This will go VALID (or NOT_VALID) when we receive a response to the packet we sent
1332+
outgoingUBX->cls = 255;
1333+
outgoingUBX->id = 255;
13131334
}
13141335
}
13151336

@@ -2434,7 +2455,7 @@ boolean SFE_UBLOX_GPS::getPVT(uint16_t maxWait)
24342455
{
24352456
_debugSerial->println(F("getPVT: Autoreporting"));
24362457
}
2437-
checkUblox(UBX_CLASS_NAV, UBX_NAV_PVT);
2458+
checkUblox(&packetCfg, UBX_CLASS_NAV, UBX_NAV_PVT);
24382459
return moduleQueried.all;
24392460
}
24402461
else if (autoPVT && !autoPVTImplicitUpdate)

0 commit comments

Comments
 (0)