Skip to content

Commit 519a84d

Browse files
committed
Clean up the forceKeyAttempt menu logic
1 parent 18a1503 commit 519a84d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Firmware/RTK_Everywhere/menuPP.ino

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -976,20 +976,18 @@ void menuPointPerfect()
976976
{
977977
settings.enablePointPerfectCorrections ^= 1;
978978
restartRover = true; // Require a rover restart to enable / disable RTCM for PPL
979-
if (settings.enablePointPerfectCorrections)
980-
forceKeyAttempt = true; // Force a key update
979+
forceKeyAttempt = settings.enablePointPerfectCorrections; // Force a key update - or don't
981980
}
982981

983982
#ifdef COMPILE_NETWORK
984983
else if (incoming == 2 && pointPerfectIsEnabled())
985984
{
986985
settings.autoKeyRenewal ^= 1;
987-
if (settings.autoKeyRenewal)
988-
forceKeyAttempt = true; // Force a key update
986+
forceKeyAttempt = settings.autoKeyRenewal; // Force a key update - or don't
989987
}
990988
else if (incoming == 3 && pointPerfectIsEnabled())
991989
{
992-
forceKeyAttempt = true; // Force a key update
990+
forceKeyAttempt ^= 1;
993991
}
994992
#endif // COMPILE_NETWORK
995993
else if (incoming == 'c' && pointPerfectIsEnabled())

0 commit comments

Comments
 (0)