@@ -1233,7 +1233,7 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForACKResponse(ubxPacket *outgoingUBX, uin
12331233 if  ((outgoingUBX->classAndIDmatch  == SFE_UBLOX_PACKET_VALIDITY_VALID)
12341234 && (packetAck.classAndIDmatch  == SFE_UBLOX_PACKET_VALIDITY_VALID)
12351235 && (outgoingUBX->valid  == SFE_UBLOX_PACKET_VALIDITY_VALID)
1236-  && (outgoingUBX->class  == requestedClass)
1236+  && (outgoingUBX->cls  == requestedClass)
12371237 && (outgoingUBX->id  == requestedID))
12381238 {
12391239 if  (_printDebug == true )
@@ -1248,7 +1248,7 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForACKResponse(ubxPacket *outgoingUBX, uin
12481248 //  We can be confident that the data packet (if we are going to get one) will always arrive
12491249 //  before the matching ACK. So if we accidentally sent a config packet which only produces an ACK
12501250 //  then outgoingUBX->classAndIDmatch will be NOT_DEFINED and the packetAck.classAndIDmatch will VALID.
1251-  //  We should not check outgoingUBX->valid, outgoingUBX->class  or outgoingUBX->id
1251+  //  We should not check outgoingUBX->valid, outgoingUBX->cls  or outgoingUBX->id
12521252 //  as these may have been changed by a PVT packet.
12531253 else  if  ((outgoingUBX->classAndIDmatch  == SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED)
12541254 && (packetAck.classAndIDmatch  == SFE_UBLOX_PACKET_VALIDITY_VALID))
@@ -1263,14 +1263,14 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForACKResponse(ubxPacket *outgoingUBX, uin
12631263 }
12641264
12651265 //  If both the outgoingUBX->classAndIDmatch and packetAck.classAndIDmatch are VALID
1266-  //  but the outgoingUBX->class  or ID no longer match then we can be confident that we had
1266+  //  but the outgoingUBX->cls  or ID no longer match then we can be confident that we had
12671267 //  valid data but it has been or is currently being overwritten by another packet (e.g. PVT).
12681268 //  If (e.g.) a PVT packet is _being_ received: outgoingUBX->valid will be NOT_DEFINED
12691269 //  If (e.g.) a PVT packet _has been_ received: outgoingUBX->valid will be VALID (or just possibly NOT_VALID)
12701270 //  So we cannot use outgoingUBX->valid as part of this check.
12711271 else  if  ((outgoingUBX->classAndIDmatch  == SFE_UBLOX_PACKET_VALIDITY_VALID)
12721272 && (packetAck.classAndIDmatch  == SFE_UBLOX_PACKET_VALIDITY_VALID)
1273-  && !((outgoingUBX->class  != requestedClass)
1273+  && !((outgoingUBX->cls  != requestedClass)
12741274 || (outgoingUBX->id  != requestedID)))
12751275 {
12761276 if  (_printDebug == true )
@@ -1300,7 +1300,7 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForACKResponse(ubxPacket *outgoingUBX, uin
13001300 //  If our packet was not-acknowledged (NACK) we do not receive a data packet - we only get the NACK.
13011301 //  So you would expect outgoingUBX->valid and outgoingUBX->classAndIDmatch to still be NOT_DEFINED
13021302 //  But if a full PVT packet arrives afterwards outgoingUBX->valid could be VALID (or just possibly NOT_VALID)
1303-  //  but outgoingUBX->class  and outgoingUBX->id would not match...
1303+  //  but outgoingUBX->cls  and outgoingUBX->id would not match...
13041304 //  So I think this is telling us we need a special state for packetAck.classAndIDmatch to tell us
13051305 //  the packet was definitely NACK'd otherwise we are possibly just guessing...
13061306 else  if  (packetAck.classAndIDmatch  == SFE_UBLOX_PACKET_NOTACKNOWLEDGED)
@@ -1320,7 +1320,7 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForACKResponse(ubxPacket *outgoingUBX, uin
13201320 else  if  ((outgoingUBX->classAndIDmatch  == SFE_UBLOX_PACKET_VALIDITY_VALID)
13211321 && (packetAck.classAndIDmatch  == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID)
13221322 && (outgoingUBX->valid  == SFE_UBLOX_PACKET_VALIDITY_VALID)
1323-  && (outgoingUBX->class  == requestedClass)
1323+  && (outgoingUBX->cls  == requestedClass)
13241324 && (outgoingUBX->id  == requestedID))
13251325 {
13261326 if  (_printDebug == true )
@@ -1370,7 +1370,7 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForACKResponse(ubxPacket *outgoingUBX, uin
13701370 if  ((outgoingUBX->classAndIDmatch  == SFE_UBLOX_PACKET_VALIDITY_VALID)
13711371 && (packetAck.classAndIDmatch  == SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED)
13721372 && (outgoingUBX->valid  == SFE_UBLOX_PACKET_VALIDITY_VALID)
1373-  && (outgoingUBX->class  == requestedClass)
1373+  && (outgoingUBX->cls  == requestedClass)
13741374 && (outgoingUBX->id  == requestedID))
13751375 {
13761376 if  (_printDebug == true )
@@ -1416,7 +1416,7 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForNoACKResponse(ubxPacket *outgoingUBX, u
14161416 //  then we can be confident that the data in outgoingUBX is valid
14171417 if  ((outgoingUBX->classAndIDmatch  == SFE_UBLOX_PACKET_VALIDITY_VALID)
14181418 && (outgoingUBX->valid  == SFE_UBLOX_PACKET_VALIDITY_VALID)
1419-  && (outgoingUBX->class  == requestedClass)
1419+  && (outgoingUBX->cls  == requestedClass)
14201420 && (outgoingUBX->id  == requestedID))
14211421 {
14221422 if  (_printDebug == true )
@@ -1429,13 +1429,13 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForNoACKResponse(ubxPacket *outgoingUBX, u
14291429 }
14301430
14311431 //  If the outgoingUBX->classAndIDmatch is VALID
1432-  //  but the outgoingUBX->class  or ID no longer match then we can be confident that we had
1432+  //  but the outgoingUBX->cls  or ID no longer match then we can be confident that we had
14331433 //  valid data but it has been or is currently being overwritten by another packet (e.g. PVT).
14341434 //  If (e.g.) a PVT packet is _being_ received: outgoingUBX->valid will be NOT_DEFINED
14351435 //  If (e.g.) a PVT packet _has been_ received: outgoingUBX->valid will be VALID (or just possibly NOT_VALID)
14361436 //  So we cannot use outgoingUBX->valid as part of this check.
14371437 else  if  ((outgoingUBX->classAndIDmatch  == SFE_UBLOX_PACKET_VALIDITY_VALID)
1438-  && !((outgoingUBX->class  != requestedClass)
1438+  && !((outgoingUBX->cls  != requestedClass)
14391439 || (outgoingUBX->id  != requestedID)))
14401440 {
14411441 if  (_printDebug == true )
@@ -1457,7 +1457,7 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForNoACKResponse(ubxPacket *outgoingUBX, u
14571457 _debugSerial->print (F (" waitForNoACKResponse: valid but UNWANTED data after "  ));
14581458 _debugSerial->print (millis () - startTime);
14591459 _debugSerial->print (F ("  msec. Class: "  ));
1460-  _debugSerial->print (outgoingUBX->class );
1460+  _debugSerial->print (outgoingUBX->cls );
14611461 _debugSerial->print (F ("  ID: "  ));
14621462 _debugSerial->print (outgoingUBX->id );
14631463 }
0 commit comments