Skip to content

Commit 19a1167

Browse files
committed
Print message when WiFi scanning. Remove double display. Disable error message on WiFi connect failure.
1 parent f5ba697 commit 19a1167

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Firmware/RTK_Everywhere/WiFi.ino

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,10 +1327,7 @@ bool RTK_WIFI::connect(unsigned long timeout, bool startAP)
13271327

13281328
// Enable WiFi station if necessary
13291329
if (wifiStationRunning == false)
1330-
{
1331-
displayWiFiConnect();
13321330
started = enable(wifiEspNowRunning, wifiSoftApRunning, true, __FILE__, __LINE__);
1333-
}
13341331
else if (startAP && !wifiSoftApRunning)
13351332
started = enable(wifiEspNowRunning, true, wifiStationRunning, __FILE__, __LINE__);
13361333

@@ -2827,6 +2824,7 @@ bool RTK_WIFI::stopStart(WIFI_ACTION_t stopping, WIFI_ACTION_t starting)
28272824
systemPrintf("channel: %d\r\n", channel);
28282825
_started = _started | WIFI_STA_START_SCAN;
28292826

2827+
systemPrintln("Scanning for WiFi...");
28302828
displayWiFiConnect();
28312829

28322830
// Determine if WiFi scan failed, stop WiFi station startup
@@ -3181,7 +3179,7 @@ bool RTK_WIFI::stopStart(WIFI_ACTION_t stopping, WIFI_ACTION_t starting)
31813179

31823180
// Return the enable status
31833181
bool enabled = ((_started & allOnline) == expected);
3184-
if (!enabled)
3182+
if (settings.debugWifiState && !enabled)
31853183
systemPrintf("ERROR: RTK_WIFI::stopStart failed!\r\n");
31863184
if (settings.debugWifiState && _verbose)
31873185
{

0 commit comments

Comments
 (0)