File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,11 @@ void menuSystem()
92
92
93
93
Serial.println (F (" r) Reset all settings to default" ));
94
94
95
+ // Support mode switching
96
+ Serial.println (F (" B) Switch to Base mode" ));
97
+ Serial.println (F (" R) Switch to Rover mode" ));
98
+ Serial.println (F (" W) Switch to WiFi Config mode" ));
99
+
95
100
Serial.println (F (" x) Exit" ));
96
101
97
102
byte incoming = getByteChoice (menuTimeout); // Timeout after x seconds
@@ -120,6 +125,19 @@ void menuSystem()
120
125
xSemaphoreGive (xFATSemaphore);
121
126
}
122
127
}
128
+ // Support mode switching
129
+ else if (incoming == ' B' ) {
130
+ forceSystemStateUpdate = true ; // Imediately go to this new state
131
+ changeState (STATE_BASE_NOT_STARTED);
132
+ }
133
+ else if (incoming == ' R' ) {
134
+ forceSystemStateUpdate = true ; // Imediately go to this new state
135
+ changeState (STATE_ROVER_NOT_STARTED);
136
+ }
137
+ else if (incoming == ' W' ) {
138
+ forceSystemStateUpdate = true ; // Imediately go to this new state
139
+ changeState (STATE_WIFI_CONFIG_NOT_STARTED);
140
+ }
123
141
else if (incoming == ' x' )
124
142
break ;
125
143
else if (incoming == STATUS_GETBYTE_TIMEOUT)
You can’t perform that action at this time.
0 commit comments