| 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) { |