Toggle Wi-Fi enable to clear known network cache

sammachin-gprs
Erin Shepherd 2018-09-01 17:13:04 +01:00
parent d46d66211c
commit acb5270f16
1 changed files with 3 additions and 0 deletions

View File

@ -25,6 +25,9 @@ while not Buttons.is_pressed(Buttons.BTN_Menu):
ugfx.clear()
wifi.nic().active(False)
wifi.nic().active(True)
# networks = [{ "ssid": ap[0], "mac": ap[1], "channel": ap[2], "signal": ap[3] } for ap in wifi.nic().scan()]
networks = sorted([net for net in wifi.nic().scan() if net[0] == "emfcamp-legacy18"], key=lambda n: n[3], reverse=True)