Skip to content

Commit

Permalink
Force configure GNSS receiver on next boot if Rover/Base config fail.
Browse files Browse the repository at this point in the history
This avoid a module getting stuck in a partially configured state.
  • Loading branch information
nseidle committed Dec 12, 2024
1 parent ee59606 commit 079c345
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Firmware/RTK_Everywhere/States.ino
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ void stateUpdate()
displayRoverStart(0);
if (gnss->configureRover() == false)
{
settings.updateGNSSSettings = true; // On the next boot, update the GNSS receiver
recordSystemSettings(); // Record this state for next POR

systemPrintln("Rover config failed");
displayRoverFail(1000);
return;
Expand All @@ -115,7 +118,7 @@ void stateUpdate()
displayRoverFail(1000);
else
{
settings.updateGNSSSettings = false; // On the next boot, no need to update the ZED on this profile
settings.updateGNSSSettings = false; // On the next boot, no need to update the GNSS receiver
settings.lastState = STATE_ROVER_NOT_STARTED;
recordSystemSettings(); // Record this state for next POR

Expand Down Expand Up @@ -230,6 +233,9 @@ void stateUpdate()
}
else
{
settings.updateGNSSSettings = true; // On the next boot, update the GNSS receiver
recordSystemSettings(); // Record this state for next POR

displayBaseFail(1000);
}
}
Expand Down Expand Up @@ -567,7 +573,7 @@ void stateUpdate()
else
{
if (settings.debugNtp)
systemPrintln("NTP Server ZED configuration failed");
systemPrintln("NTP Server configuration failed");
displayNTPFail(1000); // Show 'NTP Failed'
// Do we stay in STATE_NTPSERVER_NOT_STARTED? Or should we reset?
}
Expand Down

0 comments on commit 079c345

Please sign in to comment.