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()
398
398
paintSystemTest ();
399
399
break ;
400
400
401
+ case (STATE_KEYS_REQUESTED):
402
+ // Do nothing. Quick, fall through state.
403
+ break ;
404
+
401
405
case (STATE_ESPNOW_PAIRING_NOT_STARTED):
402
406
paintEspNowPairing ();
403
407
break ;
Original file line number Diff line number Diff line change @@ -502,6 +502,12 @@ void stateUpdate()
502
502
}
503
503
break ;
504
504
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
+
505
511
case (STATE_ESPNOW_PAIRING_NOT_STARTED): {
506
512
#ifdef COMPILE_ESPNOW
507
513
paintEspNowPairing ();
@@ -760,6 +766,9 @@ const char *getState(SystemState state, char *buffer)
760
766
case (STATE_PROFILE):
761
767
return " STATE_PROFILE" ;
762
768
769
+ case (STATE_KEYS_REQUESTED):
770
+ return " STATE_KEYS_REQUESTED" ;
771
+
763
772
case (STATE_ESPNOW_PAIRING_NOT_STARTED):
764
773
return " STATE_ESPNOW_PAIRING_NOT_STARTED" ;
765
774
case (STATE_ESPNOW_PAIRING):
@@ -933,6 +942,10 @@ void constructSetupDisplay(std::vector<setupButton> *buttons)
933
942
{
934
943
addSetupButton (buttons, " Config" , STATE_WIFI_CONFIG_NOT_STARTED);
935
944
}
945
+ if (settings.enablePointPerfectCorrections )
946
+ {
947
+ addSetupButton (buttons, " Get Keys" , STATE_KEYS_REQUESTED);
948
+ }
936
949
addSetupButton (buttons, " E-Pair" , STATE_ESPNOW_PAIRING_NOT_STARTED);
937
950
// If only one active profile do not show any profiles
938
951
if (getProfileCount () > 1 )
Original file line number Diff line number Diff line change @@ -951,6 +951,11 @@ void menuPointPerfect()
951
951
systemPrintln (" Enabled" );
952
952
else
953
953
systemPrintln (" Disabled" );
954
+ systemPrint (" 3) Request Key Update: " );
955
+ if (forceKeyAttempt == true )
956
+ systemPrintln (" Requested" );
957
+ else
958
+ systemPrintln (" Not requested" );
954
959
#endif // COMPILE_NETWORK
955
960
956
961
systemPrintln (" c) Clear the Keys" );
@@ -982,6 +987,10 @@ void menuPointPerfect()
982
987
if (settings.autoKeyRenewal )
983
988
forceKeyAttempt = true ; // Force a key update
984
989
}
990
+ else if (incoming == 3 && pointPerfectIsEnabled ())
991
+ {
992
+ forceKeyAttempt = true ; // Force a key update
993
+ }
985
994
#endif // COMPILE_NETWORK
986
995
else if (incoming == ' c' && pointPerfectIsEnabled ())
987
996
{
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ typedef enum
26
26
STATE_TEST,
27
27
STATE_TESTING,
28
28
STATE_PROFILE,
29
+ STATE_KEYS_REQUESTED,
29
30
STATE_ESPNOW_PAIRING_NOT_STARTED,
30
31
STATE_ESPNOW_PAIRING,
31
32
STATE_NTPSERVER_NOT_STARTED,
You can’t perform that action at this time.
0 commit comments