@@ -85,11 +85,10 @@ void setup()
85
85
// SFE_UBLOX_STATUS_DATA_RECEIVED if the data we requested was read / polled successfully
86
86
// SFE_UBLOX_STATUS_DATA_SENT if the data we sent was writted successfully (ACK'd)
87
87
// Other values indicate errors. Please see the sfe_ublox_status_e enum for further details.
88
- // If you see a failure you can of course simply try sending the same command again.
89
88
90
89
// Referring to the u-blox M8 Receiver Description and Protocol Specification we see that
91
90
// the dynamic model is configured using the UBX-CFG-NAV5 message. So let's load our
92
- // custom packet with the correct information so we can read (poll) the current settings.
91
+ // custom packet with the correct information so we can read (poll / get ) the current settings.
93
92
94
93
customCfg.cls = UBX_CLASS_CFG; // This is the message Class
95
94
customCfg.id = UBX_CFG_NAV5; // This is the message ID
@@ -102,18 +101,9 @@ void setup()
102
101
// Now let's read the current navigation model settings. The results will be loaded into customCfg.
103
102
if (myGPS.sendCommand (&customCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK
104
103
{
105
- Serial.println (F (" sendCommand (poll) failed! Trying again..." ));
106
- // We need to reset the packet before we try again as the values could have changed
107
- customCfg.cls = UBX_CLASS_CFG;
108
- customCfg.id = UBX_CFG_NAV5;
109
- customCfg.len = 0 ;
110
- customCfg.startingSpot = 0 ;
111
- if (myGPS.sendCommand (&customCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK
112
- {
113
- Serial.println (F (" sendCommand (poll) failed again! Freezing." ));
114
- while (1 )
115
- ;
116
- }
104
+ Serial.println (F (" sendCommand (poll) failed! Freezing..." ));
105
+ while (1 )
106
+ ;
117
107
}
118
108
119
109
// Referring to the message definition for UBX-CFG-NAV5 we see that we need to change
0 commit comments