Skip to content

Commit 579fc3b

Browse files
committed
Only exit wifiConnect early when connected && AP_STA mode is not needed
If AP_STA mode is needed, we need to continue even if wifiIsConnected...
1 parent d95eefe commit 579fc3b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Firmware/RTK_Everywhere/WiFi.ino

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,11 @@ bool wifiConnect(unsigned long timeout)
498498

499499
bool wifiConnect(unsigned long timeout, bool useAPSTAMode, bool *wasInAPmode)
500500
{
501-
if (wifiIsConnected())
501+
// If WiFi is already connected and AP_STA mode is not needed, then return true now
502+
if (wifiIsConnected() && !useAPSTAMode)
503+
{
502504
return (true); // Nothing to do
505+
}
503506

504507
displayWiFiConnect();
505508

0 commit comments

Comments
 (0)