MCPcopy Create free account
hub / github.com/SmingHub/Sming / networkScanCompleted

Function networkScanCompleted

samples/HttpServer_ConfigNetwork/app/application.cpp:219–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217void scanNetworks();
218
219void networkScanCompleted(bool succeeded, BssList& list)
220{
221 if(succeeded) {
222 networks.clear();
223 for(auto& nw : list) {
224 if(nw.hidden || nw.ssid.length() == 0) {
225 continue;
226 }
227 int i = networks.indexOf(nw.ssid);
228 if(i < 0 || nw.rssi > networks.valueAt(i).rssi) {
229 networks[nw.ssid] = nw;
230 }
231 }
232
233 // networks.sort([](const auto& a, const auto& b) { return b.value().rssi < a.value().rssi; });
234 }
235
236 scanTimer.initializeMs<30000>(scanNetworks);
237 scanTimer.startOnce();
238}
239
240void scanNetworks()
241{

Callers

nothing calls this directly

Calls 5

valueAtMethod · 0.80
startOnceMethod · 0.80
clearMethod · 0.45
lengthMethod · 0.45
indexOfMethod · 0.45

Tested by

no test coverage detected