@@ -2756,6 +2756,11 @@ sfe_ublox_status_e SFE_UBLOX_GNSS::sendCommand(ubxPacket *outgoingUBX, uint16_t
2756
2756
if (_printDebug == true )
2757
2757
{
2758
2758
_debugSerial->println (F (" sendCommand: Waiting for ACK response" ));
2759
+ _debugSerial->print (F (" expecting cls and id: 0x" ));
2760
+ _debugSerial->print (outgoingUBX->cls , HEX);
2761
+ _debugSerial->print (F (" 0x" ));
2762
+ _debugSerial->println (outgoingUBX->id , HEX);
2763
+
2759
2764
}
2760
2765
retVal = waitForACKResponse (outgoingUBX, outgoingUBX->cls , outgoingUBX->id , maxWait, expectACKonly); // Wait for Ack response
2761
2766
}
@@ -3029,6 +3034,13 @@ sfe_ublox_status_e SFE_UBLOX_GNSS::waitForACKResponse(ubxPacket *outgoingUBX, ui
3029
3034
packetAuto.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED;
3030
3035
3031
3036
unsigned long startTime = millis ();
3037
+ if (_printDebug == true )
3038
+ {
3039
+ _debugSerial->print (F (" waitForACKResponse: requested class and id: " ));
3040
+ _debugSerial->print (requestedClass, HEX);
3041
+ _debugSerial->print (F (" " ));
3042
+ _debugSerial->println (requestedID, HEX);
3043
+ }
3032
3044
while (millis () - startTime < maxTime)
3033
3045
{
3034
3046
if (checkUbloxInternal (outgoingUBX, requestedClass, requestedID) == true ) // See if new data is available. Process bytes as they come in.
@@ -3793,7 +3805,7 @@ boolean SFE_UBLOX_GNSS::setPortOutput(uint8_t portID, uint8_t outStreamSettings,
3793
3805
// payloadCfg is now loaded with current bytes. Change only the ones we need to
3794
3806
payloadCfg[14 ] = outStreamSettings; // OutProtocolMask LSB - Set outStream bits
3795
3807
3796
- return ((sendCommand (&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
3808
+ return ((sendCommand (&packetCfg, maxWait, true )) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
3797
3809
}
3798
3810
3799
3811
// Configure a given port to input UBX, NMEA, RTCM3 or a combination thereof
@@ -3814,7 +3826,7 @@ boolean SFE_UBLOX_GNSS::setPortInput(uint8_t portID, uint8_t inStreamSettings, u
3814
3826
// payloadCfg is now loaded with current bytes. Change only the ones we need to
3815
3827
payloadCfg[12 ] = inStreamSettings; // InProtocolMask LSB - Set inStream bits
3816
3828
3817
- return ((sendCommand (&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
3829
+ return ((sendCommand (&packetCfg, maxWait, true )) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
3818
3830
}
3819
3831
3820
3832
// Changes the I2C address that the u-blox module responds to
@@ -4028,7 +4040,7 @@ boolean SFE_UBLOX_GNSS::configureMessage(uint8_t msgClass, uint8_t msgID, uint8_
4028
4040
// payloadCfg is now loaded with current bytes. Change only the ones we need to
4029
4041
payloadCfg[2 + portID] = sendRate; // Send rate is relative to the event a message is registered on. For example, if the rate of a navigation message is set to 2, the message is sent every 2nd navigation solution.
4030
4042
4031
- return ((sendCommand (&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
4043
+ return ((sendCommand (&packetCfg, maxWait, true )) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
4032
4044
}
4033
4045
4034
4046
// Enable a given message type, default of 1 per update rate (usually 1 per second)
@@ -4117,7 +4129,7 @@ boolean SFE_UBLOX_GNSS::setSurveyMode(uint8_t mode, uint16_t observationTime, fl
4117
4129
payloadCfg[30 ] = svinAccLimit >> 16 ;
4118
4130
payloadCfg[31 ] = svinAccLimit >> 24 ;
4119
4131
4120
- return ((sendCommand (&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
4132
+ return ((sendCommand (&packetCfg, maxWait, true )) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
4121
4133
}
4122
4134
4123
4135
// Begin Survey-In for NEO-M8P
@@ -4179,7 +4191,7 @@ bool SFE_UBLOX_GNSS::setStaticPosition(int32_t ecefXOrLat, int8_t ecefXOrLatHP,
4179
4191
payloadCfg[17 ] = ecefYOrLonHP;
4180
4192
payloadCfg[18 ] = ecefZOrAltHP;
4181
4193
4182
- return ((sendCommand (&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
4194
+ return ((sendCommand (&packetCfg, maxWait, true )) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
4183
4195
}
4184
4196
4185
4197
bool SFE_UBLOX_GNSS::setStaticPosition (int32_t ecefXOrLat, int32_t ecefYOrLon, int32_t ecefZOrAlt, bool latlong, uint16_t maxWait)
@@ -4382,7 +4394,7 @@ boolean SFE_UBLOX_GNSS::addGeofence(int32_t latitude, int32_t longitude, uint32_
4382
4394
payloadCfg[54 ] = currentGeofenceParams->rads [3 ] >> 16 ;
4383
4395
payloadCfg[55 ] = currentGeofenceParams->rads [3 ] >> 24 ;
4384
4396
}
4385
- return ((sendCommand (&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
4397
+ return ((sendCommand (&packetCfg, maxWait, true )) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
4386
4398
}
4387
4399
4388
4400
// Clear all geofences using UBX-CFG-GEOFENCE
@@ -4408,7 +4420,7 @@ boolean SFE_UBLOX_GNSS::clearGeofences(uint16_t maxWait)
4408
4420
4409
4421
currentGeofenceParams->numFences = 0 ; // Zero the number of geofences currently in use
4410
4422
4411
- return ((sendCommand (&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
4423
+ return ((sendCommand (&packetCfg, maxWait, true )) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
4412
4424
}
4413
4425
4414
4426
// Clear the antenna control settings using UBX-CFG-ANT
@@ -4426,7 +4438,7 @@ boolean SFE_UBLOX_GNSS::clearAntPIO(uint16_t maxWait)
4426
4438
payloadCfg[2 ] = 0xFF ; // Antenna pin configuration: set pinSwitch and pinSCD to 31
4427
4439
payloadCfg[3 ] = 0xFF ; // Antenna pin configuration: set pinOCD to 31, set reconfig bit
4428
4440
4429
- return ((sendCommand (&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
4441
+ return ((sendCommand (&packetCfg, maxWait, true )) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
4430
4442
}
4431
4443
4432
4444
// Returns the combined geofence state using UBX-NAV-GEOFENCE
@@ -4702,7 +4714,7 @@ boolean SFE_UBLOX_GNSS::setDynamicModel(dynModel newDynamicModel, uint16_t maxWa
4702
4714
packetCfg.len = 36 ;
4703
4715
packetCfg.startingSpot = 0 ;
4704
4716
4705
- return (sendCommand (&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
4717
+ return (sendCommand (&packetCfg, maxWait, true ) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
4706
4718
}
4707
4719
4708
4720
// Get the dynamic platform model using UBX-CFG-NAV5
0 commit comments