@@ -549,6 +549,25 @@ void SFE_UBLOX_GPS::process(uint8_t incoming, ubxPacket *incomingUBX, uint8_t re
549
549
incomingUBX->id = packetBuf.id ;
550
550
incomingUBX->counter = packetBuf.counter ; // Copy over the .counter too
551
551
}
552
+ // This is not an ACK and we do not have a complete class and ID match
553
+ // So let's check for an HPPOSLLH message arriving when we were expecting PVT and vice versa
554
+ else if ((packetBuf.cls == requestedClass) &&
555
+ (((packetBuf.id == UBX_NAV_PVT) && (requestedID == UBX_NAV_HPPOSLLH)) ||
556
+ ((packetBuf.id == UBX_NAV_HPPOSLLH) && (requestedID == UBX_NAV_PVT))))
557
+ {
558
+ // This is not the message we were expecting but we start diverting data into incomingUBX (usually packetCfg) and process it anyway
559
+ activePacketBuffer = SFE_UBLOX_PACKET_PACKETCFG;
560
+ incomingUBX->cls = packetBuf.cls ; // Copy the class and ID into incomingUBX (usually packetCfg)
561
+ incomingUBX->id = packetBuf.id ;
562
+ incomingUBX->counter = packetBuf.counter ; // Copy over the .counter too
563
+ if (_printDebug == true )
564
+ {
565
+ _debugSerial->print (F (" process: auto PVT/HPPOSLLH collision: Requested ID: 0x" ));
566
+ _debugSerial->print (requestedID, HEX);
567
+ _debugSerial->print (F (" Message ID: 0x" ));
568
+ _debugSerial->println (packetBuf.id , HEX);
569
+ }
570
+ }
552
571
else
553
572
{
554
573
// This is not an ACK and we do not have a class and ID match
@@ -802,6 +821,23 @@ void SFE_UBLOX_GPS::processUBX(uint8_t incoming, ubxPacket *incomingUBX, uint8_t
802
821
}
803
822
}
804
823
824
+ // This is not an ACK and we do not have a complete class and ID match
825
+ // So let's check for an HPPOSLLH message arriving when we were expecting PVT and vice versa
826
+ else if ((incomingUBX->cls == requestedClass) &&
827
+ (((incomingUBX->id == UBX_NAV_PVT) && (requestedID == UBX_NAV_HPPOSLLH)) ||
828
+ ((incomingUBX->id == UBX_NAV_HPPOSLLH) && (requestedID == UBX_NAV_PVT))))
829
+ {
830
+ // This isn't the message we are looking for...
831
+ // Let's say so and leave incomingUBX->classAndIDmatch _unchanged_
832
+ if (_printDebug == true )
833
+ {
834
+ _debugSerial->print (F (" processUBX: auto PVT/HPPOSLLH collision: Requested ID: 0x" ));
835
+ _debugSerial->print (requestedID, HEX);
836
+ _debugSerial->print (F (" Message ID: 0x" ));
837
+ _debugSerial->println (incomingUBX->id , HEX);
838
+ }
839
+ }
840
+
805
841
if (_printDebug == true )
806
842
{
807
843
_debugSerial->print (F (" Incoming: Size: " ));
@@ -1005,6 +1041,7 @@ void SFE_UBLOX_GPS::processUBXpacket(ubxPacket *msg)
1005
1041
highResModuleQueried.verticalAccuracy = true ;
1006
1042
moduleQueried.gpsiTOW = true ; // this can arrive via HPPOS too.
1007
1043
1044
+ /*
1008
1045
if (_printDebug == true)
1009
1046
{
1010
1047
_debugSerial->print(F("Sec: "));
@@ -1040,6 +1077,7 @@ void SFE_UBLOX_GPS::processUBXpacket(ubxPacket *msg)
1040
1077
_debugSerial->print(F("VERT M: "));
1041
1078
_debugSerial->println(((float)(int32_t)extractLong(32)) / 10000.0f);
1042
1079
}
1080
+ */
1043
1081
}
1044
1082
break ;
1045
1083
}
@@ -1541,15 +1579,15 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForNoACKResponse(ubxPacket *outgoingUBX, u
1541
1579
// and outgoingUBX->valid is VALID then this must be (e.g.) a PVT packet
1542
1580
else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED) && (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID))
1543
1581
{
1544
- if (_printDebug == true )
1545
- {
1546
- _debugSerial->print (F (" waitForNoACKResponse: valid but UNWANTED data after " ));
1547
- _debugSerial->print (millis () - startTime);
1548
- _debugSerial->print (F (" msec. Class: " ));
1549
- _debugSerial->print (outgoingUBX->cls );
1550
- _debugSerial->print (F (" ID: " ));
1551
- _debugSerial->print (outgoingUBX->id );
1552
- }
1582
+ // if (_printDebug == true)
1583
+ // {
1584
+ // _debugSerial->print(F("waitForNoACKResponse: valid but UNWANTED data after "));
1585
+ // _debugSerial->print(millis() - startTime);
1586
+ // _debugSerial->print(F(" msec. Class: "));
1587
+ // _debugSerial->print(outgoingUBX->cls);
1588
+ // _debugSerial->print(F(" ID: "));
1589
+ // _debugSerial->print(outgoingUBX->id);
1590
+ // }
1553
1591
}
1554
1592
1555
1593
// If the outgoingUBX->classAndIDmatch is NOT_VALID then we return CRC failure
0 commit comments