Skip to content

Commit

Permalink
aioespnow,webrepl: Use recommended network.WLAN.IF_[AP|STA] constants.
Browse files Browse the repository at this point in the history
Removes the deprecated network.[AP|STA]_IF form.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <[email protected]>
  • Loading branch information
projectgus authored and dpgeorge committed Nov 7, 2024
1 parent d6faaf8 commit a0ceed8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion micropython/aioespnow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ A small async server example::
import asyncio

# A WLAN interface must be active to send()/recv()
network.WLAN(network.STA_IF).active(True)
network.WLAN(network.WLAN.IF_STA).active(True)

e = aioespnow.AIOESPNow() # Returns AIOESPNow enhanced with async support
e.active(True)
Expand Down
2 changes: 1 addition & 1 deletion micropython/net/webrepl/webrepl.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def setup_conn(port, accept_handler):
listen_s.listen(1)
if accept_handler:
listen_s.setsockopt(socket.SOL_SOCKET, 20, accept_handler)
for i in (network.AP_IF, network.STA_IF):
for i in (network.WLAN.IF_AP, network.WLAN.IF_STA):
iface = network.WLAN(i)
if iface.active():
print("WebREPL server started on http://%s:%d/" % (iface.ifconfig()[0], port))
Expand Down

0 comments on commit a0ceed8

Please sign in to comment.