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()
106
106
107
107
Serial.println (F (" r) Reset all settings to default" ));
108
108
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
+
109
114
Serial.println (F (" x) Exit" ));
110
115
111
116
byte incoming = getByteChoice (menuTimeout); // Timeout after x seconds
@@ -138,6 +143,19 @@ void menuSystem()
138
143
Serial.printf (" sdCardSemaphore failed to yield, %s line %d\r\n " , __FILE__, __LINE__);
139
144
}
140
145
}
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
+ }
141
159
else if (incoming == ' x' )
142
160
break ;
143
161
else if (incoming == STATUS_GETBYTE_TIMEOUT)
You can’t perform that action at this time.
0 commit comments