@@ -4180,6 +4180,7 @@ boolean SFE_UBLOX_GPS::resetOdometer(uint16_t maxWait)
4180
4180
packetCfg.len = 0 ;
4181
4181
packetCfg.startingSpot = 0 ;
4182
4182
4183
+ // This is a special case as we are only expecting an ACK but this is not a CFG message
4183
4184
return (sendCommand (&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
4184
4185
}
4185
4186
@@ -4239,6 +4240,18 @@ boolean SFE_UBLOX_GPS::isGNSSenabled(sfe_ublox_gnss_ids_e id, uint16_t maxWait)
4239
4240
return (retVal);
4240
4241
}
4241
4242
4243
+ // Reset ESF automatic IMU-mount alignment
4244
+ boolean SFE_UBLOX_GPS::resetIMUalignment (uint16_t maxWait)
4245
+ {
4246
+ packetCfg.cls = UBX_CLASS_ESF;
4247
+ packetCfg.id = UBX_ESF_RESETALG;
4248
+ packetCfg.len = 0 ;
4249
+ packetCfg.startingSpot = 0 ;
4250
+
4251
+ // This is a special case as we are only expecting an ACK but this is not a CFG message
4252
+ return (sendCommand (&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK
4253
+ }
4254
+
4242
4255
// CONFIGURATION INTERFACE (protocol v27 and above)
4243
4256
4244
4257
// Form 32-bit key from group/id/size
@@ -4728,7 +4741,6 @@ boolean SFE_UBLOX_GPS::setAutoNAVPOSECEF(boolean enable, boolean implicitUpdate,
4728
4741
}
4729
4742
4730
4743
// Enable automatic navigation message generation by the GNSS.
4731
- // Data is passed to the callback in packetUBXNAVPOSECEFcopy.
4732
4744
boolean SFE_UBLOX_GPS::setAutoNAVPOSECEFcallback (void (*callbackPointer)(UBX_NAV_POSECEF_data_t), uint16_t maxWait)
4733
4745
{
4734
4746
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -4877,7 +4889,6 @@ boolean SFE_UBLOX_GPS::setAutoNAVSTATUS(boolean enable, boolean implicitUpdate,
4877
4889
}
4878
4890
4879
4891
// Enable automatic navigation message generation by the GNSS.
4880
- // Data is passed to the callback in packetUBXNAVSTATUScopy.
4881
4892
boolean SFE_UBLOX_GPS::setAutoNAVSTATUScallback (void (*callbackPointer)(UBX_NAV_STATUS_data_t), uint16_t maxWait)
4882
4893
{
4883
4894
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -5048,7 +5059,6 @@ boolean SFE_UBLOX_GPS::setAutoDOP(boolean enable, boolean implicitUpdate, uint16
5048
5059
}
5049
5060
5050
5061
// Enable automatic navigation message generation by the GNSS.
5051
- // Data is passed to the callback in packetUBXNAVDOPcopy.
5052
5062
boolean SFE_UBLOX_GPS::setAutoDOPcallback (void (*callbackPointer)(UBX_NAV_DOP_data_t), uint16_t maxWait)
5053
5063
{
5054
5064
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -5198,7 +5208,6 @@ boolean SFE_UBLOX_GPS::setAutoNAVATT(boolean enable, boolean implicitUpdate, uin
5198
5208
}
5199
5209
5200
5210
// Enable automatic navigation message generation by the GNSS.
5201
- // Data is passed to the callback in packetUBXNAVATTcopy.
5202
5211
boolean SFE_UBLOX_GPS::setAutoNAVATTcallback (void (*callbackPointer)(UBX_NAV_ATT_data_t), uint16_t maxWait)
5203
5212
{
5204
5213
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -5520,7 +5529,6 @@ boolean SFE_UBLOX_GPS::setAutoNAVODO(boolean enable, boolean implicitUpdate, uin
5520
5529
}
5521
5530
5522
5531
// Enable automatic navigation message generation by the GNSS.
5523
- // Data is passed to the callback in packetUBXNAVODOcopy.
5524
5532
boolean SFE_UBLOX_GPS::setAutoNAVODOcallback (void (*callbackPointer)(UBX_NAV_ODO_data_t), uint16_t maxWait)
5525
5533
{
5526
5534
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -5668,7 +5676,6 @@ boolean SFE_UBLOX_GPS::setAutoNAVVELECEF(boolean enable, boolean implicitUpdate,
5668
5676
}
5669
5677
5670
5678
// Enable automatic navigation message generation by the GNSS.
5671
- // Data is passed to the callback in packetUBXNAVVELECEFcopy.
5672
5679
boolean SFE_UBLOX_GPS::setAutoNAVVELECEFcallback (void (*callbackPointer)(UBX_NAV_VELECEF_data_t), uint16_t maxWait)
5673
5680
{
5674
5681
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -5816,7 +5823,6 @@ boolean SFE_UBLOX_GPS::setAutoNAVVELNED(boolean enable, boolean implicitUpdate,
5816
5823
}
5817
5824
5818
5825
// Enable automatic navigation message generation by the GNSS.
5819
- // Data is passed to the callback in packetUBXNAVVELNEDcopy.
5820
5826
boolean SFE_UBLOX_GPS::setAutoNAVVELNEDcallback (void (*callbackPointer)(UBX_NAV_VELNED_data_t), uint16_t maxWait)
5821
5827
{
5822
5828
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -5964,7 +5970,6 @@ boolean SFE_UBLOX_GPS::setAutoNAVHPPOSECEF(boolean enable, boolean implicitUpdat
5964
5970
}
5965
5971
5966
5972
// Enable automatic navigation message generation by the GNSS.
5967
- // Data is passed to the callback in packetUBXNAVHPPOSECEFcopy.
5968
5973
boolean SFE_UBLOX_GPS::setAutoNAVHPPOSECEFcallback (void (*callbackPointer)(UBX_NAV_HPPOSECEF_data_t), uint16_t maxWait)
5969
5974
{
5970
5975
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -6134,7 +6139,6 @@ boolean SFE_UBLOX_GPS::setAutoHPPOSLLH(boolean enable, boolean implicitUpdate, u
6134
6139
}
6135
6140
6136
6141
// Enable automatic navigation message generation by the GNSS.
6137
- // Data is passed to the callback in packetUBXNAVHPPOSLLHcopy.
6138
6142
boolean SFE_UBLOX_GPS::setAutoHPPOSLLHcallback (void (*callbackPointer)(UBX_NAV_HPPOSLLH_data_t), uint16_t maxWait)
6139
6143
{
6140
6144
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -6282,7 +6286,6 @@ boolean SFE_UBLOX_GPS::setAutoNAVCLOCK(boolean enable, boolean implicitUpdate, u
6282
6286
}
6283
6287
6284
6288
// Enable automatic navigation message generation by the GNSS.
6285
- // Data is passed to the callback in packetUBXNAVCLOCKcopy.
6286
6289
boolean SFE_UBLOX_GPS::setAutoNAVCLOCKcallback (void (*callbackPointer)(UBX_NAV_CLOCK_data_t), uint16_t maxWait)
6287
6290
{
6288
6291
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -6482,7 +6485,6 @@ boolean SFE_UBLOX_GPS::setAutoRELPOSNED(boolean enable, boolean implicitUpdate,
6482
6485
}
6483
6486
6484
6487
// Enable automatic navigation message generation by the GNSS.
6485
- // Data is passed to the callback in packetUBXNAVRELPOSNEDcopy.
6486
6488
boolean SFE_UBLOX_GPS::setAutoRELPOSNEDcallback (void (*callbackPointer)(UBX_NAV_RELPOSNED_data_t), uint16_t maxWait)
6487
6489
{
6488
6490
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -6630,7 +6632,6 @@ boolean SFE_UBLOX_GPS::setAutoRXMSFRBX(boolean enable, boolean implicitUpdate, u
6630
6632
}
6631
6633
6632
6634
// Enable automatic navigation message generation by the GNSS.
6633
- // Data is passed to the callback in packetUBXRXMSFRBXcopy.
6634
6635
boolean SFE_UBLOX_GPS::setAutoRXMSFRBXcallback (void (*callbackPointer)(UBX_RXM_SFRBX_data_t), uint16_t maxWait)
6635
6636
{
6636
6637
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -6778,7 +6779,6 @@ boolean SFE_UBLOX_GPS::setAutoRXMRAWX(boolean enable, boolean implicitUpdate, ui
6778
6779
}
6779
6780
6780
6781
// Enable automatic navigation message generation by the GNSS.
6781
- // Data is passed to the callback in packetUBXRXMRAWXcopy.
6782
6782
boolean SFE_UBLOX_GPS::setAutoRXMRAWXcallback (void (*callbackPointer)(UBX_RXM_RAWX_data_t), uint16_t maxWait)
6783
6783
{
6784
6784
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -6986,7 +6986,6 @@ boolean SFE_UBLOX_GPS::setAutoTIMTM2(boolean enable, boolean implicitUpdate, uin
6986
6986
}
6987
6987
6988
6988
// Enable automatic navigation message generation by the GNSS.
6989
- // Data is passed to the callback in packetUBXTIMTM2copy.
6990
6989
boolean SFE_UBLOX_GPS::setAutoTIMTM2callback (void (*callbackPointer)(UBX_TIM_TM2_data_t), uint16_t maxWait)
6991
6990
{
6992
6991
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -7061,6 +7060,11 @@ void SFE_UBLOX_GPS::logTIMTM2(boolean enabled)
7061
7060
// ***** ESF ALG automatic support
7062
7061
7063
7062
boolean SFE_UBLOX_GPS::getEsfAlignment (uint16_t maxWait)
7063
+ {
7064
+ return (getESFALG (maxWait));
7065
+ }
7066
+
7067
+ boolean SFE_UBLOX_GPS::getESFALG (uint16_t maxWait)
7064
7068
{
7065
7069
if (packetUBXESFALG == NULL ) initPacketUBXESFALG (); // Check that RAM has been allocated for the ESF alignment data
7066
7070
if (packetUBXESFALG == NULL ) // Only attempt this if RAM allocation was successful
@@ -7158,7 +7162,6 @@ boolean SFE_UBLOX_GPS::setAutoESFALG(boolean enable, boolean implicitUpdate, uin
7158
7162
}
7159
7163
7160
7164
// Enable automatic navigation message generation by the GNSS.
7161
- // Data is passed to the callback in packetUBXESFALGcopy.
7162
7165
boolean SFE_UBLOX_GPS::setAutoESFALGcallback (void (*callbackPointer)(UBX_ESF_ALG_data_t), uint16_t maxWait)
7163
7166
{
7164
7167
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -7233,6 +7236,11 @@ void SFE_UBLOX_GPS::logESFALG(boolean enabled)
7233
7236
// ***** ESF STATUS automatic support
7234
7237
7235
7238
boolean SFE_UBLOX_GPS::getEsfInfo (uint16_t maxWait)
7239
+ {
7240
+ return (getESFSTATUS (maxWait));
7241
+ }
7242
+
7243
+ boolean SFE_UBLOX_GPS::getESFSTATUS (uint16_t maxWait)
7236
7244
{
7237
7245
if (packetUBXESFSTATUS == NULL ) initPacketUBXESFSTATUS (); // Check that RAM has been allocated for the ESF status data
7238
7246
if (packetUBXESFSTATUS == NULL ) // Only attempt this if RAM allocation was successful
@@ -7330,7 +7338,6 @@ boolean SFE_UBLOX_GPS::setAutoESFSTATUS(boolean enable, boolean implicitUpdate,
7330
7338
}
7331
7339
7332
7340
// Enable automatic navigation message generation by the GNSS.
7333
- // Data is passed to the callback in packetUBXESFSTATUScopy.
7334
7341
boolean SFE_UBLOX_GPS::setAutoESFSTATUScallback (void (*callbackPointer)(UBX_ESF_STATUS_data_t), uint16_t maxWait)
7335
7342
{
7336
7343
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -7375,15 +7382,16 @@ boolean SFE_UBLOX_GPS::assumeAutoESFSTATUS(boolean enabled, boolean implicitUpda
7375
7382
boolean SFE_UBLOX_GPS::initPacketUBXESFSTATUS ()
7376
7383
{
7377
7384
packetUBXESFSTATUS = new UBX_ESF_STATUS_t; // Allocate RAM for the main struct
7385
+
7378
7386
if (packetUBXESFSTATUS == NULL )
7379
7387
{
7380
7388
if ((_printDebug == true ) || (_printLimitedDebug == true )) // This is important. Print this if doing limited debugging
7381
7389
_debugSerial->println (F (" initPacketUBXESFSTATUS: PANIC! RAM allocation failed! This will end _very_ badly..." ));
7382
7390
return (false );
7383
7391
}
7384
7392
packetUBXESFSTATUS->automaticFlags .flags .all = 0 ;
7385
- packetUBXNAVSTATUS ->callbackPointer = NULL ;
7386
- packetUBXNAVSTATUS ->callbackData = NULL ;
7393
+ packetUBXESFSTATUS ->callbackPointer = NULL ;
7394
+ packetUBXESFSTATUS ->callbackData = NULL ;
7387
7395
packetUBXESFSTATUS->moduleQueried .moduleQueried .all = 0 ;
7388
7396
return (true );
7389
7397
}
@@ -7405,6 +7413,11 @@ void SFE_UBLOX_GPS::logESFSTATUS(boolean enabled)
7405
7413
// ***** ESF INS automatic support
7406
7414
7407
7415
boolean SFE_UBLOX_GPS::getEsfIns (uint16_t maxWait)
7416
+ {
7417
+ return (getESFINS (maxWait));
7418
+ }
7419
+
7420
+ boolean SFE_UBLOX_GPS::getESFINS (uint16_t maxWait)
7408
7421
{
7409
7422
if (packetUBXESFINS == NULL ) initPacketUBXESFINS (); // Check that RAM has been allocated for the ESF INS data
7410
7423
if (packetUBXESFINS == NULL ) // Only attempt this if RAM allocation was successful
@@ -7502,7 +7515,6 @@ boolean SFE_UBLOX_GPS::setAutoESFINS(boolean enable, boolean implicitUpdate, uin
7502
7515
}
7503
7516
7504
7517
// Enable automatic navigation message generation by the GNSS.
7505
- // Data is passed to the callback in packetUBXESFINScopy.
7506
7518
boolean SFE_UBLOX_GPS::setAutoESFINScallback (void (*callbackPointer)(UBX_ESF_INS_data_t), uint16_t maxWait)
7507
7519
{
7508
7520
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -7577,6 +7589,11 @@ void SFE_UBLOX_GPS::logESFINS(boolean enabled)
7577
7589
// ***** ESF MEAS automatic support
7578
7590
7579
7591
boolean SFE_UBLOX_GPS::getEsfDataInfo (uint16_t maxWait)
7592
+ {
7593
+ return (getESFMEAS (maxWait));
7594
+ }
7595
+
7596
+ boolean SFE_UBLOX_GPS::getESFMEAS (uint16_t maxWait)
7580
7597
{
7581
7598
if (packetUBXESFMEAS == NULL ) initPacketUBXESFMEAS (); // Check that RAM has been allocated for the ESF MEAS data
7582
7599
if (packetUBXESFMEAS == NULL ) // Only attempt this if RAM allocation was successful
@@ -7674,7 +7691,6 @@ boolean SFE_UBLOX_GPS::setAutoESFMEAS(boolean enable, boolean implicitUpdate, ui
7674
7691
}
7675
7692
7676
7693
// Enable automatic navigation message generation by the GNSS.
7677
- // Data is passed to the callback in packetUBXESFMEAScopy.
7678
7694
boolean SFE_UBLOX_GPS::setAutoESFMEAScallback (void (*callbackPointer)(UBX_ESF_MEAS_data_t), uint16_t maxWait)
7679
7695
{
7680
7696
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -7749,6 +7765,11 @@ void SFE_UBLOX_GPS::logESFMEAS(boolean enabled)
7749
7765
// ***** ESF RAW automatic support
7750
7766
7751
7767
boolean SFE_UBLOX_GPS::getEsfRawDataInfo (uint16_t maxWait)
7768
+ {
7769
+ return (getESFRAW (maxWait));
7770
+ }
7771
+
7772
+ boolean SFE_UBLOX_GPS::getESFRAW (uint16_t maxWait)
7752
7773
{
7753
7774
if (packetUBXESFRAW == NULL ) initPacketUBXESFRAW (); // Check that RAM has been allocated for the ESF RAW data
7754
7775
if (packetUBXESFRAW == NULL ) // Only attempt this if RAM allocation was successful
@@ -7846,7 +7867,6 @@ boolean SFE_UBLOX_GPS::setAutoESFRAW(boolean enable, boolean implicitUpdate, uin
7846
7867
}
7847
7868
7848
7869
// Enable automatic navigation message generation by the GNSS.
7849
- // Data is passed to the callback in packetUBXESFRAWcopy.
7850
7870
boolean SFE_UBLOX_GPS::setAutoESFRAWcallback (void (*callbackPointer)(UBX_ESF_RAW_data_t), uint16_t maxWait)
7851
7871
{
7852
7872
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -8023,7 +8043,6 @@ boolean SFE_UBLOX_GPS::setAutoHNRAtt(boolean enable, boolean implicitUpdate, uin
8023
8043
}
8024
8044
8025
8045
// Enable automatic navigation message generation by the GNSS.
8026
- // Data is passed to the callback in packetUBXHNRATTcopy.
8027
8046
boolean SFE_UBLOX_GPS::setAutoHNRAttcallback (void (*callbackPointer)(UBX_HNR_ATT_data_t), uint16_t maxWait)
8028
8047
{
8029
8048
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -8201,7 +8220,6 @@ boolean SFE_UBLOX_GPS::setAutoHNRDyn(boolean enable, boolean implicitUpdate, uin
8201
8220
}
8202
8221
8203
8222
// Enable automatic navigation message generation by the GNSS.
8204
- // Data is passed to the callback in packetUBXHNRINScopy.
8205
8223
boolean SFE_UBLOX_GPS::setAutoHNRDyncallback (void (*callbackPointer)(UBX_HNR_INS_data_t), uint16_t maxWait)
8206
8224
{
8207
8225
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -8378,7 +8396,6 @@ boolean SFE_UBLOX_GPS::setAutoHNRPVT(boolean enable, boolean implicitUpdate, uin
8378
8396
}
8379
8397
8380
8398
// Enable automatic navigation message generation by the GNSS.
8381
- // Data is passed to the callback in packetUBXHNRPVTcopy.
8382
8399
boolean SFE_UBLOX_GPS::setAutoHNRPVTcallback (void (*callbackPointer)(UBX_HNR_PVT_data_t), uint16_t maxWait)
8383
8400
{
8384
8401
// Enable auto messages. Set implicitUpdate to false as we expect the user to call checkUblox manually.
@@ -9411,7 +9428,7 @@ boolean SFE_UBLOX_GPS::getSensorFusionMeasurement(UBX_ESF_MEAS_sensorData_t *sen
9411
9428
return (false );
9412
9429
9413
9430
if (packetUBXESFMEAS->moduleQueried .moduleQueried .bits .data & (1 << sensor) == 0 )
9414
- getEsfDataInfo (maxWait);
9431
+ getESFMEAS (maxWait);
9415
9432
packetUBXESFMEAS->moduleQueried .moduleQueried .bits .data &= ~(1 << sensor); // Since we are about to give this to user, mark this data as stale
9416
9433
packetUBXESFMEAS->moduleQueried .moduleQueried .bits .all = false ;
9417
9434
sensorData->data .all = packetUBXESFMEAS->data .data [sensor].data .all ;
@@ -9431,7 +9448,7 @@ boolean SFE_UBLOX_GPS::getRawSensorMeasurement(UBX_ESF_RAW_sensorData_t *sensorD
9431
9448
return (false );
9432
9449
9433
9450
if (packetUBXESFRAW->moduleQueried .moduleQueried .bits .data & (1 << sensor) == 0 )
9434
- getEsfRawDataInfo (maxWait);
9451
+ getESFRAW (maxWait);
9435
9452
packetUBXESFRAW->moduleQueried .moduleQueried .bits .data &= ~(1 << sensor); // Since we are about to give this to user, mark this data as stale
9436
9453
packetUBXESFRAW->moduleQueried .moduleQueried .bits .all = false ;
9437
9454
sensorData->data .all = packetUBXESFRAW->data .data [sensor].data .all ;
@@ -9453,7 +9470,7 @@ boolean SFE_UBLOX_GPS::getSensorFusionStatus(UBX_ESF_STATUS_sensorStatus_t *sens
9453
9470
return (false );
9454
9471
9455
9472
if (packetUBXESFSTATUS->moduleQueried .moduleQueried .bits .status & (1 << sensor) == 0 )
9456
- getEsfInfo (maxWait);
9473
+ getESFSTATUS (maxWait);
9457
9474
packetUBXESFSTATUS->moduleQueried .moduleQueried .bits .status &= ~(1 << sensor); // Since we are about to give this to user, mark this data as stale
9458
9475
packetUBXESFSTATUS->moduleQueried .moduleQueried .bits .all = false ;
9459
9476
sensorStatus->sensStatus1 .all = packetUBXESFSTATUS->data .status [sensor].sensStatus1 .all ;
0 commit comments