Skip to content

Commit d75c9e4

Browse files
committed
Fixed bug in WiFiSettingsService
1 parent 4c529d9 commit d75c9e4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ All notable changes to this project will be documented in this file.
4242
- Wrong return type battery service
4343
- Wrong return types in various getService functions.
4444
- Add file.close in fileHandler handleRequest [#73](https://github.com/theelims/ESP32-sveltekit/pull/73)
45+
- Fixed bug in WiFiSettingsService preventing discovery of networks other than the first
4546

4647
## [0.5.0] - 2024-05-06
4748

lib/framework/WiFiSettingsService.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ void WiFiSettingsService::connectToWiFi()
164164

165165
for (auto &network : _state.wifiSettings)
166166
{
167-
if (ssid_scan == network.ssid)
167+
if (ssid_scan.equals(network.ssid))
168168
{ // SSID match
169169
if (rssi_scan > bestNetworkDb)
170170
{ // best network
@@ -181,8 +181,8 @@ void WiFiSettingsService::connectToWiFi()
181181
network.channel = chan_scan;
182182
memcpy(network.bssid, BSSID_scan, 6);
183183
}
184+
break;
184185
}
185-
break;
186186
}
187187
}
188188

0 commit comments

Comments
 (0)