Skip to content

Commit ac9554d

Browse files
committed
Remove settings.updateGNSSSettings. Also:
Remove firstPowerOn (on ZED) Add missing ZED saveConfiguration
1 parent 3cee5ff commit ac9554d

File tree

14 files changed

+62
-173
lines changed

14 files changed

+62
-173
lines changed

Firmware/RTK_Everywhere/Display.ino

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2366,8 +2366,6 @@ void paintProfile(uint8_t profileUnit)
23662366

23672367
if (profileNumber >= 0)
23682368
{
2369-
settings.updateGNSSSettings =
2370-
true; // When this profile is loaded next, force system to update GNSS settings.
23712369
recordSystemSettings(); // Before switching, we need to record the current settings to LittleFS and SD
23722370

23732371
recordProfileNumber(

Firmware/RTK_Everywhere/GNSS_LG290P.ino

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,6 @@ bool GNSS_LG290P::checkPPPRates()
165165
//----------------------------------------
166166
bool GNSS_LG290P::configureGNSS()
167167
{
168-
// Skip configuring the GNSS receiver if no new changes are necessary
169-
if (settings.updateGNSSSettings == false)
170-
{
171-
systemPrintln("LG290P configuration maintained");
172-
return (true);
173-
}
174-
175168
for (int x = 0; x < 3; x++)
176169
{
177170
// Wait up to 5 seconds for device to come online
@@ -255,10 +248,7 @@ bool GNSS_LG290P::configureOnce()
255248
systemPrintln("LG290P configuration updated");
256249

257250
// Save the current configuration into non-volatile memory (NVM)
258-
// We don't need to re-configure the LG290P at next boot
259-
bool settingsWereSaved = saveConfiguration();
260-
if (settingsWereSaved)
261-
settings.updateGNSSSettings = false;
251+
saveConfiguration();
262252
}
263253
else
264254
online.gnss = false; // Take it offline
@@ -324,10 +314,7 @@ bool GNSS_LG290P::configureRover()
324314
else
325315
{
326316
// Save the current configuration into non-volatile memory (NVM)
327-
// We don't need to re-configure the LG290P at next boot
328-
bool settingsWereSaved = saveConfiguration();
329-
if (settingsWereSaved)
330-
settings.updateGNSSSettings = false;
317+
saveConfiguration();
331318

332319
// For RTCM and MSM messages to take effect (ie, PointPerfect is active) we must save/reset
333320
softwareReset();
@@ -414,10 +401,7 @@ bool GNSS_LG290P::configureBase()
414401
else
415402
{
416403
// Save the current configuration into non-volatile memory (NVM)
417-
// We don't need to re-configure the LG290P at next boot
418-
bool settingsWereSaved = saveConfiguration();
419-
if (settingsWereSaved)
420-
settings.updateGNSSSettings = false;
404+
saveConfiguration();
421405

422406
softwareReset();
423407

@@ -1757,8 +1741,6 @@ void GNSS_LG290P::menuMessagesSubtype(int *localMessageRate, const char *message
17571741
printUnknown(incoming);
17581742
}
17591743

1760-
settings.updateGNSSSettings = true; // Update the GNSS config at the next boot
1761-
17621744
clearBuffer(); // Empty buffer of any newline chars
17631745
}
17641746

Firmware/RTK_Everywhere/GNSS_Mosaic.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,14 @@ bool mosaicX5waitCR(unsigned long timeout = 25); // Header
549549

550550
class GNSS_MOSAIC : GNSS
551551
{
552+
// The mosaic-X5 does not have self-contained interface library.
553+
// But the ZED-F9P, UM980 and LG290P all do.
554+
// On the X5, we communicate manually over serial2GNSS using functions like
555+
// sendWithResponse and sendAndWaitForIdle.
556+
// In essence, the interface library is wholly contained in this class.
557+
// TODO: consider breaking the mosaic comms functions out into their own library
558+
// and add a private library class instance here.
559+
552560
protected:
553561

554562
// These globals are updated regularly via the SBF parser

Firmware/RTK_Everywhere/GNSS_Mosaic.ino

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -314,13 +314,6 @@ bool GNSS_MOSAIC::beginExternalEvent()
314314
if (online.gnss == false)
315315
return (false);
316316

317-
// If our settings haven't changed, trust GNSS's settings
318-
if (settings.updateGNSSSettings == false)
319-
{
320-
systemPrintln("Skipping mosaic-X5 event configuration");
321-
return (true);
322-
}
323-
324317
if (settings.dataPortChannel != MUX_PPS_EVENTTRIGGER)
325318
return (true); // No need to configure PPS if port is not selected
326319

@@ -344,13 +337,6 @@ bool GNSS_MOSAIC::beginPPS()
344337
if (online.gnss == false)
345338
return (false);
346339

347-
// If our settings haven't changed, trust GNSS's settings
348-
if (settings.updateGNSSSettings == false)
349-
{
350-
systemPrintln("Skipping mosaicX5BeginPPS");
351-
return (true);
352-
}
353-
354340
if (settings.dataPortChannel != MUX_PPS_EVENTTRIGGER)
355341
return (true); // No need to configure PPS if port is not selected
356342

@@ -435,10 +421,7 @@ bool GNSS_MOSAIC::configureBase()
435421
setLoggingType(); // Update Standard, PPP, or custom for icon selection
436422

437423
// Save the current configuration into non-volatile memory (NVM)
438-
// We don't need to re-configure the MOSAICX5 at next boot
439-
bool settingsWereSaved = saveConfiguration();
440-
if (settingsWereSaved)
441-
settings.updateGNSSSettings = false;
424+
saveConfiguration();
442425

443426
if (response == false)
444427
{
@@ -606,10 +589,7 @@ bool GNSS_MOSAIC::configureOnce()
606589
systemPrintln("mosaic-X5 configuration updated");
607590

608591
// Save the current configuration into non-volatile memory (NVM)
609-
// We don't need to re-configure the MOSAICX5 at next boot
610-
bool settingsWereSaved = saveConfiguration();
611-
if (settingsWereSaved)
612-
settings.updateGNSSSettings = false;
592+
saveConfiguration();
613593
}
614594
else
615595
online.gnss = false; // Take it offline
@@ -625,13 +605,6 @@ bool GNSS_MOSAIC::configureOnce()
625605
//----------------------------------------
626606
bool GNSS_MOSAIC::configureGNSS()
627607
{
628-
// Skip configuring the MOSAICX5 if no new changes are necessary
629-
if (settings.updateGNSSSettings == false)
630-
{
631-
systemPrintln("mosaic-X5 configuration maintained");
632-
return (true);
633-
}
634-
635608
// Attempt 3 tries on MOSAICX5 config
636609
for (int x = 0; x < 3; x++)
637610
{
@@ -679,10 +652,7 @@ bool GNSS_MOSAIC::configureRover()
679652
setLoggingType(); // Update Standard, PPP, or custom for icon selection
680653

681654
// Save the current configuration into non-volatile memory (NVM)
682-
// We don't need to re-configure the MOSAICX5 at next boot
683-
bool settingsWereSaved = saveConfiguration();
684-
if (settingsWereSaved)
685-
settings.updateGNSSSettings = false;
655+
saveConfiguration();
686656

687657
if (response == false)
688658
{
@@ -1727,8 +1697,6 @@ void GNSS_MOSAIC::menuMessagesNMEA()
17271697
printUnknown(incoming);
17281698
}
17291699

1730-
settings.updateGNSSSettings = true; // Update the GNSS config at the next boot
1731-
17321700
clearBuffer(); // Empty buffer of any newline chars
17331701
}
17341702

@@ -1798,8 +1766,6 @@ void GNSS_MOSAIC::menuMessagesRTCM(bool rover)
17981766
printUnknown(incoming);
17991767
}
18001768

1801-
settings.updateGNSSSettings = true; // Update the GNSS config at the next boot
1802-
18031769
clearBuffer(); // Empty buffer of any newline chars
18041770
}
18051771

Firmware/RTK_Everywhere/GNSS_UM980.ino

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,7 @@ bool GNSS_UM980::configureBase()
186186
response &= enableNMEA();
187187

188188
// Save the current configuration into non-volatile memory (NVM)
189-
// We don't need to re-configure the UM980 at next boot
190-
bool settingsWereSaved = _um980->saveConfiguration();
191-
if (settingsWereSaved)
192-
settings.updateGNSSSettings = false;
189+
_um980->saveConfiguration();
193190

194191
if (response == false)
195192
{
@@ -269,10 +266,7 @@ bool GNSS_UM980::configureOnce()
269266
systemPrintln("UM980 configuration updated");
270267

271268
// Save the current configuration into non-volatile memory (NVM)
272-
// We don't need to re-configure the UM980 at next boot
273-
bool settingsWereSaved = _um980->saveConfiguration();
274-
if (settingsWereSaved)
275-
settings.updateGNSSSettings = false;
269+
_um980->saveConfiguration();
276270
}
277271
else
278272
online.gnss = false; // Take it offline
@@ -294,13 +288,6 @@ bool GNSS_UM980::configureNtpMode()
294288
//----------------------------------------
295289
bool GNSS_UM980::configureGNSS()
296290
{
297-
// Skip configuring the UM980 if no new changes are necessary
298-
if (settings.updateGNSSSettings == false)
299-
{
300-
systemPrintln("UM980 configuration maintained");
301-
return (true);
302-
}
303-
304291
for (int x = 0; x < 3; x++)
305292
{
306293
if (configureOnce())
@@ -368,10 +355,7 @@ bool GNSS_UM980::configureRover()
368355
response &= enableNMEA();
369356

370357
// Save the current configuration into non-volatile memory (NVM)
371-
// We don't need to re-configure the UM980 at next boot
372-
bool settingsWereSaved = _um980->saveConfiguration();
373-
if (settingsWereSaved)
374-
settings.updateGNSSSettings = false;
358+
_um980->saveConfiguration();
375359

376360
if (response == false)
377361
{
@@ -1423,8 +1407,6 @@ void GNSS_UM980::menuMessagesSubtype(float *localMessageRate, const char *messag
14231407
printUnknown(incoming);
14241408
}
14251409

1426-
settings.updateGNSSSettings = true; // Update the GNSS config at the next boot
1427-
14281410
clearBuffer(); // Empty buffer of any newline chars
14291411
}
14301412

Firmware/RTK_Everywhere/GNSS_ZED.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ class GNSS_ZED : GNSS
365365
// one core?
366366
bool iAmLocked = false;
367367

368-
SFE_UBLOX_GNSS_SUPER *_zed = nullptr; // Don't instantiate until we know what gnssPlatform we're on
368+
SFE_UBLOX_GNSS_SUPER *_zed = nullptr; // Library class instance
369369

370370
// Record rxBytes so we can tell if Radio Ext (COM2) is receiving correction data.
371371
// On the mosaic, we know that InputLink will arrive at 1Hz. But on the ZED, UBX-MON-COMMS

0 commit comments

Comments
 (0)