Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 <angus@redyak.com.au>
1 parent d6faaf8 commit a0ceed8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎micropython/aioespnow/README.md‎

Lines changed: 1 addition & 1 deletion
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)

‎micropython/net/webrepl/webrepl.py‎

Lines changed: 1 addition & 1 deletion
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)

AltStyle によって変換されたページ (->オリジナル) /