Skip to content

Commit e61580b

Browse files
committed
Update docstubs stubs for preview
1 parent 144670a commit e61580b

File tree

3 files changed

+92
-5
lines changed

3 files changed

+92
-5
lines changed

stubs/micropython-v1_27_0_preview-docstubs/espnow/__init__.pyi

Lines changed: 70 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,74 @@ from _espnow import ESPNowBase # type: ignore
1616
from _mpy_shed import mp_available
1717

1818
MAX_DATA_LEN: Incomplete = 250
19+
"""\
20+
The following constants correspond to different transmit data rates on ESP32
21+
only. Lower data rates are generally more reliable over long distances:
22+
"""
1923
KEY_LEN: Incomplete = 16
24+
"""\
25+
The following constants correspond to different transmit data rates on ESP32
26+
only. Lower data rates are generally more reliable over long distances:
27+
"""
2028
ADDR_LEN: Incomplete = 6
29+
"""\
30+
The following constants correspond to different transmit data rates on ESP32
31+
only. Lower data rates are generally more reliable over long distances:
32+
"""
2133
MAX_TOTAL_PEER_NUM: Incomplete = 20
34+
"""\
35+
The following constants correspond to different transmit data rates on ESP32
36+
only. Lower data rates are generally more reliable over long distances:
37+
"""
2238
MAX_ENCRYPT_PEER_NUM: Incomplete = 6
39+
"""\
40+
The following constants correspond to different transmit data rates on ESP32
41+
only. Lower data rates are generally more reliable over long distances:
42+
"""
43+
RATE_LORA_250K: Incomplete
44+
"""See `espnow-long-range`."""
45+
RATE_LORA_500K: Incomplete
46+
"""See `espnow-long-range`."""
47+
RATE_1M: Incomplete
48+
"""\
49+
Unless using the two proprietary long range data rates, only the sender must
50+
configure the data rate.
51+
"""
52+
RATE_2M: Incomplete
53+
"""\
54+
Unless using the two proprietary long range data rates, only the sender must
55+
configure the data rate.
56+
"""
57+
RATE_5M: Incomplete
58+
"""\
59+
Unless using the two proprietary long range data rates, only the sender must
60+
configure the data rate.
61+
"""
62+
RATE_6M: Incomplete
63+
"""\
64+
Unless using the two proprietary long range data rates, only the sender must
65+
configure the data rate.
66+
"""
67+
RATE_11M: Incomplete
68+
"""\
69+
Unless using the two proprietary long range data rates, only the sender must
70+
configure the data rate.
71+
"""
72+
RATE_12M: Incomplete
73+
"""\
74+
Unless using the two proprietary long range data rates, only the sender must
75+
configure the data rate.
76+
"""
77+
RATE_24M: Incomplete
78+
"""\
79+
Unless using the two proprietary long range data rates, only the sender must
80+
configure the data rate.
81+
"""
82+
RATE_54M: Incomplete
83+
"""\
84+
Unless using the two proprietary long range data rates, only the sender must
85+
configure the data rate.
86+
"""
2387
_MACAddress: TypeAlias = bytes
2488
_PeerInfo: TypeAlias = Tuple[_MACAddress, bytes, int, int, bool]
2589
class ESPNow(ESPNowBase, Iterator):
@@ -124,13 +188,15 @@ class ESPNow(ESPNowBase, Iterator):
124188
wait forever. The timeout can also be provided as arg to
125189
`recv()`/`irecv()`/`recvinto()`.
126190
127-
*rate*: (ESP32 only) Set the transmission speed for
128-
ESPNow packets. Must be set to a number from the allowed numeric values
129-
in `enum wifi_phy_rate_t
130-
<https://docs.espressif.com/projects/esp-idf/en/v5.2.3/esp32/
191+
*rate*: (ESP32 only) Set the transmission data rate for ESPNow packets.
192+
The default setting is `espnow.RATE_1M`. It's recommended to use one of
193+
the other ``espnow.RATE_nnn`` constants to set this, but it's also
194+
possible to pass an integer corresponding to the `enum wifi_phy_rate_t
195+
<https://docs.espressif.com/projects/esp-idf/en/v5.5.1/esp32/
131196
api-reference/network/esp_wifi.html#_CPPv415wifi_phy_rate_t>`_. This
132197
parameter is actually *write-only* due to ESP-IDF not providing any
133198
means for querying the radio interface's rate parameter.
199+
See also `espnow-long-range`. This API currently doesn't work on ESP32-C6.
134200
135201
Returns:
136202

stubs/micropython-v1_27_0_preview-docstubs/modules.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"firmware": "micropython-v1_27_0_preview",
99
"nodename": "micropython",
1010
"version": "v1.27.0-preview",
11-
"release": "v1.27.0-preview-445-g207562dfa",
11+
"release": "v1.27.0-preview-449-g938e2c0f2",
1212
"sysname": "micropython"
1313
},
1414
"stubber": {

stubs/micropython-v1_27_0_preview-docstubs/network/WLAN.pyi

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,26 @@ class WLAN:
2727
savings and reduced WiFi performance
2828
* ``PM_NONE``: disable wifi power management
2929
"""
30+
PROTOCOL_DEFAULTS: Incomplete
31+
"""\
32+
A bitmap representing all of the default 802.11 Wi-Fi modes supported by
33+
the chip. Consult `ESP-IDF Wi-Fi Protocols`_ documentation for details.
34+
"""
35+
PROTOCOL_LR: Incomplete
36+
"""\
37+
This value corresponds to the `Espressif proprietary "long-range" mode`_,
38+
which is not compatible with standard Wi-Fi devices. By setting this
39+
protocol it's possible for an ESP32 STA in long-range mode to connect to
40+
an ESP32 AP in long-range mode, or to use `ESP-NOW long range modes
41+
<espnow-long-range>`.
42+
43+
This mode can be bitwise ORed with some standard 802.11 protocol bits
44+
(including `WLAN.PROTOCOL_DEFAULTS`) in order to support a mix of standard
45+
Wi-Fi modes as well as LR mode, consult the `Espressif long-range
46+
documentation`_ for more details.
47+
48+
Long range mode is not supported on ESP32-C2.
49+
"""
3050
def __init__(self, interface_id) -> None: ...
3151
def active(self, is_active: Optional[Any] = None) -> None:
3252
"""
@@ -153,6 +173,7 @@ class WLAN:
153173
reconnects Number of reconnect attempts to make (integer, 0=none, -1=unlimited)
154174
txpower Maximum transmit power in dBm (integer or float)
155175
pm WiFi Power Management setting (see below for allowed values)
176+
protocol (ESP32 Only.) WiFi Low level 802.11 protocol. See `WLAN.PROTOCOL_DEFAULTS`.
156177
============= ===========
157178
"""
158179
...

0 commit comments

Comments
 (0)