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 @@ -106,6 +106,11 @@ void menuSystem()
106106
107107 Serial.println (F (" r) Reset all settings to default" ));
108108
109+ // Support mode switching
110+ Serial.println (F (" B) Switch to Base mode" ));
111+ Serial.println (F (" R) Switch to Rover mode" ));
112+ Serial.println (F (" W) Switch to WiFi Config mode" ));
113+
109114 Serial.println (F (" x) Exit" ));
110115
111116 byte incoming = getByteChoice (menuTimeout); // Timeout after x seconds
@@ -138,6 +143,19 @@ void menuSystem()
138143 Serial.printf (" sdCardSemaphore failed to yield, %s line %d\r\n " , __FILE__, __LINE__);
139144 }
140145 }
146+ // Support mode switching
147+ else if (incoming == ' B' ) {
148+ forceSystemStateUpdate = true ; // Imediately go to this new state
149+ changeState (STATE_BASE_NOT_STARTED);
150+ }
151+ else if (incoming == ' R' ) {
152+ forceSystemStateUpdate = true ; // Imediately go to this new state
153+ changeState (STATE_ROVER_NOT_STARTED);
154+ }
155+ else if (incoming == ' W' ) {
156+ forceSystemStateUpdate = true ; // Imediately go to this new state
157+ changeState (STATE_WIFI_CONFIG_NOT_STARTED);
158+ }
141159 else if (incoming == ' x' )
142160 break ;
143161 else if (incoming == STATUS_GETBYTE_TIMEOUT)
You can’t perform that action at this time.
0 commit comments