Skip to content

Commit a0ceed8

Browse files
projectgusdpgeorge
authored andcommitted
aioespnow,webrepl: Use recommended network.WLAN.IF_[AP|STA] constants.
Removes the deprecated network.[AP|STA]_IF form. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <[email protected]>
1 parent d6faaf8 commit a0ceed8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: micropython/aioespnow/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ A small async server example::
5555
import asyncio
5656

5757
# A WLAN interface must be active to send()/recv()
58-
network.WLAN(network.STA_IF).active(True)
58+
network.WLAN(network.WLAN.IF_STA).active(True)
5959

6060
e = aioespnow.AIOESPNow() # Returns AIOESPNow enhanced with async support
6161
e.active(True)

Diff for: micropython/net/webrepl/webrepl.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def setup_conn(port, accept_handler):
102102
listen_s.listen(1)
103103
if accept_handler:
104104
listen_s.setsockopt(socket.SOL_SOCKET, 20, accept_handler)
105-
for i in (network.AP_IF, network.STA_IF):
105+
for i in (network.WLAN.IF_AP, network.WLAN.IF_STA):
106106
iface = network.WLAN(i)
107107
if iface.active():
108108
print("WebREPL server started on http://%s:%d/" % (iface.ifconfig()[0], port))

0 commit comments

Comments
 (0)