File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -153,11 +153,11 @@ uint32_t sdUsedSpaceMB = 0;
153
153
// Connection settings to NTRIP Caster
154
154
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
155
155
#ifdef COMPILE_WIFI
156
- #include < WiFi.h>
157
- #include < HTTPClient.h> // Needed for ThingStream API for ZTP
156
+ #include < WiFi.h> // Built-in.
157
+ #include < HTTPClient.h> // Built-in. Needed for ThingStream API for ZTP
158
158
#include < ArduinoJson.h> // http://librarymanager/All#Arduino_JSON_messagepack v6.19.4
159
- #include < WiFiClientSecure.h>
160
- #include < PubSubClient.h> // Used for MQTT obtaining of keys
159
+ #include < WiFiClientSecure.h> // Built-in.
160
+ #include < PubSubClient.h> // Built-in. Used for MQTT obtaining of keys
161
161
162
162
#include " esp_wifi.h" // Needed for init/deinit of resources to free up RAM
163
163
#include " base64.h" // Built-in ESP32 library. Needed for NTRIP Client credential encoding.
@@ -212,7 +212,7 @@ SFE_UBLOX_GNSS_ADD i2cGNSS;
212
212
uint8_t settingPayload[MAX_PAYLOAD_SIZE];
213
213
214
214
// These globals are updated regularly via the storePVTdata callback
215
- bool ubloxUpdated = false ;
215
+ bool pvtUpdated = false ;
216
216
double latitude;
217
217
double longitude;
218
218
float altitude;
Original file line number Diff line number Diff line change @@ -340,7 +340,7 @@ void storePVTdata(UBX_NAV_PVT_data_t *ubxDataStruct)
340
340
confirmedDate = ubxDataStruct->flags2 .bits .confirmedDate ;
341
341
confirmedTime = ubxDataStruct->flags2 .bits .confirmedTime ;
342
342
343
- ubloxUpdated = true ;
343
+ pvtUpdated = true ;
344
344
}
345
345
346
346
void storeHPdata (UBX_NAV_HPPOSLLH_data_t *ubxDataStruct)
Original file line number Diff line number Diff line change @@ -180,11 +180,12 @@ bool configureUbloxModule()
180
180
int maxWait = 2000 ;
181
181
182
182
// Wait for initial report from module
183
- while (ubloxUpdated == false )
183
+ while (pvtUpdated == false )
184
184
{
185
185
i2cGNSS.checkUblox (); // Regularly poll to get latest data and any RTCM
186
186
i2cGNSS.checkCallbacks (); // Process any callbacks: ie, eventTriggerReceived
187
187
delay (10 );
188
+ if (millis () - startTime > maxWait) break ;
188
189
}
189
190
190
191
// The first thing we do is go to 1Hz to lighten any I2C traffic from a previous configuration
You can’t perform that action at this time.
0 commit comments