@@ -166,6 +166,13 @@ bool GNSS_UM980::configureBase()
166
166
return (false );
167
167
}
168
168
169
+ if (settings.gnssConfiguredBase )
170
+ {
171
+ if (settings.debugGnss )
172
+ systemPrintln (" Skipping UM980 Base configuration" );
173
+ return true ;
174
+ }
175
+
169
176
disableAllOutput ();
170
177
171
178
bool response = true ;
@@ -186,7 +193,7 @@ bool GNSS_UM980::configureBase()
186
193
response &= enableNMEA ();
187
194
188
195
// Save the current configuration into non-volatile memory (NVM)
189
- _um980->saveConfiguration ();
196
+ response &= _um980->saveConfiguration ();
190
197
191
198
if (response == false )
192
199
{
@@ -196,6 +203,8 @@ bool GNSS_UM980::configureBase()
196
203
if (settings.debugGnss )
197
204
systemPrintln (" UM980 Base configured" );
198
205
206
+ settings.gnssConfiguredBase = response;
207
+
199
208
return (response);
200
209
}
201
210
@@ -216,6 +225,12 @@ bool GNSS_UM980::configureOnce()
216
225
Enable selected RTCM messages on COM3
217
226
*/
218
227
228
+ if (settings.gnssConfiguredOnce )
229
+ {
230
+ systemPrintln (" UM980 configuration maintained" );
231
+ return (true );
232
+ }
233
+
219
234
if (settings.debugGnss )
220
235
debuggingEnable (); // Print all debug to Serial
221
236
@@ -266,11 +281,13 @@ bool GNSS_UM980::configureOnce()
266
281
systemPrintln (" UM980 configuration updated" );
267
282
268
283
// Save the current configuration into non-volatile memory (NVM)
269
- _um980->saveConfiguration ();
284
+ response &= _um980->saveConfiguration ();
270
285
}
271
286
else
272
287
online.gnss = false ; // Take it offline
273
288
289
+ settings.gnssConfiguredOnce = response;
290
+
274
291
return (response);
275
292
}
276
293
@@ -325,6 +342,13 @@ bool GNSS_UM980::configureRover()
325
342
return (false );
326
343
}
327
344
345
+ // If our settings haven't changed, trust GNSS's settings
346
+ if (settings.gnssConfiguredRover )
347
+ {
348
+ systemPrintln (" Skipping UM980 Rover configuration" );
349
+ return (true );
350
+ }
351
+
328
352
disableAllOutput ();
329
353
330
354
bool response = true ;
@@ -355,13 +379,15 @@ bool GNSS_UM980::configureRover()
355
379
response &= enableNMEA ();
356
380
357
381
// Save the current configuration into non-volatile memory (NVM)
358
- _um980->saveConfiguration ();
382
+ response &= _um980->saveConfiguration ();
359
383
360
384
if (response == false )
361
385
{
362
386
systemPrintln (" UM980 Rover failed to configure" );
363
387
}
364
388
389
+ settings.gnssConfiguredRover = response;
390
+
365
391
return (response);
366
392
}
367
393
@@ -1407,6 +1433,10 @@ void GNSS_UM980::menuMessagesSubtype(float *localMessageRate, const char *messag
1407
1433
printUnknown (incoming);
1408
1434
}
1409
1435
1436
+ settings.gnssConfiguredOnce = false ; // Update the GNSS config at the next boot
1437
+ settings.gnssConfiguredBase = false ;
1438
+ settings.gnssConfiguredRover = false ;
1439
+
1410
1440
clearBuffer (); // Empty buffer of any newline chars
1411
1441
}
1412
1442
0 commit comments