File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,12 @@ void wifiSetState(byte newState)
214214// We can also start as a WiFi station and attempt to connect to local WiFi for config
215215bool wifiStartAP ()
216216{
217- if (settings.wifiConfigOverAP == true )
217+ return (wifiStartAP (false )); // Don't force AP mode
218+ }
219+
220+ bool wifiStartAP (bool forceAP)
221+ {
222+ if (settings.wifiConfigOverAP == true || forceAP)
218223 {
219224 // Stop any current WiFi activity
220225 wifiStop ();
@@ -275,11 +280,7 @@ bool wifiStartAP()
275280 if (x == maxTries)
276281 {
277282 displayNoWiFi (2000 );
278- if (productVariant == REFERENCE_STATION)
279- requestChangeState (STATE_BASE_NOT_STARTED); // If WiFi failed, return to Base mode.
280- else
281- requestChangeState (STATE_ROVER_NOT_STARTED); // If WiFi failed, return to Rover mode.
282- return (false );
283+ return (wifiStartAP (true )); // Because there is no local WiFi available, force AP mode so user can still get access/configure it
283284 }
284285 }
285286
You can’t perform that action at this time.
0 commit comments