MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / doWiFiScan

Method doWiFiScan

contributed/modClock/main.js:251–266  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

249 set currentStyle(v) { this._style = v; this.display.style = v; return v; }
250
251 doWiFiScan() {
252 this.scanner = new Scanner({
253 scanOptions: {
254 active: this.AP ? true : false, // passive scans fail in AP+STA mode (why?)
255 },
256 onFound: (ap) => {
257 if (ap.ssid)
258 accessPointList.push(ap);
259 },
260 onLost: (ssid) => {
261 const i = accessPointList.findIndex(x => x.ssid === ssid);
262 if (i >= 0)
263 accessPointList.splice(i, 1);
264 },
265 });
266 }
267
268 connect(ssid, password) {
269 if (this.connecting > 0) {

Callers 2

connectedMethod · 0.95
configAPMethod · 0.95

Calls 2

findIndexMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected