Skip to content

Commit 079c345

Browse files
committed
Force configure GNSS receiver on next boot if Rover/Base config fail.
This avoid a module getting stuck in a partially configured state.
1 parent ee59606 commit 079c345

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Firmware/RTK_Everywhere/States.ino

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ void stateUpdate()
100100
displayRoverStart(0);
101101
if (gnss->configureRover() == false)
102102
{
103+
settings.updateGNSSSettings = true; // On the next boot, update the GNSS receiver
104+
recordSystemSettings(); // Record this state for next POR
105+
103106
systemPrintln("Rover config failed");
104107
displayRoverFail(1000);
105108
return;
@@ -115,7 +118,7 @@ void stateUpdate()
115118
displayRoverFail(1000);
116119
else
117120
{
118-
settings.updateGNSSSettings = false; // On the next boot, no need to update the ZED on this profile
121+
settings.updateGNSSSettings = false; // On the next boot, no need to update the GNSS receiver
119122
settings.lastState = STATE_ROVER_NOT_STARTED;
120123
recordSystemSettings(); // Record this state for next POR
121124

@@ -230,6 +233,9 @@ void stateUpdate()
230233
}
231234
else
232235
{
236+
settings.updateGNSSSettings = true; // On the next boot, update the GNSS receiver
237+
recordSystemSettings(); // Record this state for next POR
238+
233239
displayBaseFail(1000);
234240
}
235241
}
@@ -567,7 +573,7 @@ void stateUpdate()
567573
else
568574
{
569575
if (settings.debugNtp)
570-
systemPrintln("NTP Server ZED configuration failed");
576+
systemPrintln("NTP Server configuration failed");
571577
displayNTPFail(1000); // Show 'NTP Failed'
572578
// Do we stay in STATE_NTPSERVER_NOT_STARTED? Or should we reset?
573579
}

0 commit comments

Comments
 (0)