Skip to content

Commit ef9a9e7

Browse files
committed
WiFi: Move wifiNetworkCount
1 parent 397c99c commit ef9a9e7

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

Firmware/RTK_Everywhere/WiFi.ino

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,20 @@ static bool wifiStationRunning;
441441
static int wifiFailedConnectionAttempts = 0; // Count the number of connection attempts between restarts
442442
static WiFiMulti *wifiMulti;
443443

444+
//*********************************************************************
445+
// Counts the number of entered SSIDs
446+
int wifiNetworkCount()
447+
{
448+
// Count SSIDs
449+
int networkCount = 0;
450+
for (int x = 0; x < MAX_WIFI_NETWORKS; x++)
451+
{
452+
if (strlen(settings.wifiNetworks[x].ssid) > 0)
453+
networkCount++;
454+
}
455+
return networkCount;
456+
}
457+
444458
//*********************************************************************
445459
// Callback for all WiFi RX Packets
446460
// Get RSSI of all incoming management packets: https://esp32.com/viewtopic.php?t=13889
@@ -3007,21 +3021,6 @@ bool wifiIsRunning()
30073021
return false;
30083022
}
30093023

3010-
//----------------------------------------
3011-
// Counts the number of entered SSIDs
3012-
//----------------------------------------
3013-
int wifiNetworkCount()
3014-
{
3015-
// Count SSIDs
3016-
int networkCount = 0;
3017-
for (int x = 0; x < MAX_WIFI_NETWORKS; x++)
3018-
{
3019-
if (strlen(settings.wifiNetworks[x].ssid) > 0)
3020-
networkCount++;
3021-
}
3022-
return networkCount;
3023-
}
3024-
30253024
//----------------------------------------
30263025
// Given a status, return the associated state or error
30273026
//----------------------------------------

0 commit comments

Comments
 (0)