File tree Expand file tree Collapse file tree 4 files changed +27
-0
lines changed
Expand file tree Collapse file tree 4 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -398,6 +398,10 @@ void displayUpdate()
398398 paintSystemTest ();
399399 break ;
400400
401+ case (STATE_KEYS_REQUESTED):
402+ // Do nothing. Quick, fall through state.
403+ break ;
404+
401405 case (STATE_ESPNOW_PAIRING_NOT_STARTED):
402406 paintEspNowPairing ();
403407 break ;
Original file line number Diff line number Diff line change @@ -502,6 +502,12 @@ void stateUpdate()
502502 }
503503 break ;
504504
505+ case (STATE_KEYS_REQUESTED): {
506+ forceKeyAttempt = true ; // Force a key update
507+ changeState (lastSystemState); // Return to the last system state
508+ }
509+ break ;
510+
505511 case (STATE_ESPNOW_PAIRING_NOT_STARTED): {
506512#ifdef COMPILE_ESPNOW
507513 paintEspNowPairing ();
@@ -760,6 +766,9 @@ const char *getState(SystemState state, char *buffer)
760766 case (STATE_PROFILE):
761767 return " STATE_PROFILE" ;
762768
769+ case (STATE_KEYS_REQUESTED):
770+ return " STATE_KEYS_REQUESTED" ;
771+
763772 case (STATE_ESPNOW_PAIRING_NOT_STARTED):
764773 return " STATE_ESPNOW_PAIRING_NOT_STARTED" ;
765774 case (STATE_ESPNOW_PAIRING):
@@ -933,6 +942,10 @@ void constructSetupDisplay(std::vector<setupButton> *buttons)
933942 {
934943 addSetupButton (buttons, " Config" , STATE_WIFI_CONFIG_NOT_STARTED);
935944 }
945+ if (settings.enablePointPerfectCorrections )
946+ {
947+ addSetupButton (buttons, " Get Keys" , STATE_KEYS_REQUESTED);
948+ }
936949 addSetupButton (buttons, " E-Pair" , STATE_ESPNOW_PAIRING_NOT_STARTED);
937950 // If only one active profile do not show any profiles
938951 if (getProfileCount () > 1 )
Original file line number Diff line number Diff line change @@ -951,6 +951,11 @@ void menuPointPerfect()
951951 systemPrintln (" Enabled" );
952952 else
953953 systemPrintln (" Disabled" );
954+ systemPrint (" 3) Request Key Update: " );
955+ if (forceKeyAttempt == true )
956+ systemPrintln (" Requested" );
957+ else
958+ systemPrintln (" Not requested" );
954959#endif // COMPILE_NETWORK
955960
956961 systemPrintln (" c) Clear the Keys" );
@@ -982,6 +987,10 @@ void menuPointPerfect()
982987 if (settings.autoKeyRenewal )
983988 forceKeyAttempt = true ; // Force a key update
984989 }
990+ else if (incoming == 3 && pointPerfectIsEnabled ())
991+ {
992+ forceKeyAttempt = true ; // Force a key update
993+ }
985994#endif // COMPILE_NETWORK
986995 else if (incoming == ' c' && pointPerfectIsEnabled ())
987996 {
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ typedef enum
2626 STATE_TEST,
2727 STATE_TESTING,
2828 STATE_PROFILE,
29+ STATE_KEYS_REQUESTED,
2930 STATE_ESPNOW_PAIRING_NOT_STARTED,
3031 STATE_ESPNOW_PAIRING,
3132 STATE_NTPSERVER_NOT_STARTED,
You can’t perform that action at this time.
0 commit comments