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)
214
214
// We can also start as a WiFi station and attempt to connect to local WiFi for config
215
215
bool wifiStartAP ()
216
216
{
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)
218
223
{
219
224
// Stop any current WiFi activity
220
225
wifiStop ();
@@ -275,11 +280,7 @@ bool wifiStartAP()
275
280
if (x == maxTries)
276
281
{
277
282
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
283
284
}
284
285
}
285
286
You can’t perform that action at this time.
0 commit comments