File tree Expand file tree Collapse file tree 2 files changed +14
-14
lines changed
reference/micropython/network
tests/quality_tests/feat_networking/check_network Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -18,19 +18,14 @@ class WLAN:
1818 # now use sockets as usual
1919 """
2020
21- PM_NONE : int
22- PM_POWERSAVE : int
23- PM_PERFORMANCE : int
24-
25- """\
26- Allowed values for the ``WLAN.config(pm=...)`` network interface parameter:
27-
28- * ``PM_PERFORMANCE``: enable WiFi power management to balance power
29- savings and WiFi performance
30- * ``PM_POWERSAVE``: enable WiFi power management with additional power
31- savings and reduced WiFi performance
32- * ``PM_NONE``: disable wifi power management
33- """
21+ PM_NONE : int = ...
22+ """Disable WiFi power management (always on, highest performance, highest power consumption)"""
23+ PM_PERFORMANCE : int = ...
24+ """Enable WiFi power management to balance power savings and WiFi performance"""
25+ PM_POWERSAVE : int = ...
26+ """Enable WiFi power management with additional power savings and reduced WiFi performance""" "
27+
28+ // ** Note :** The numeric values of these constants are platform - specific :
3429
3530 def __init__ (self , interface_id : int = ..., / ) -> None :
3631 """
Original file line number Diff line number Diff line change 44# ref : https://github.com/Josverl/micropython-stubber/issues/338
55wlan = network .WLAN (network .STA_IF )
66
7- wlan .config (pm = 0xa11140 ) # set power mode to get WiFi power-saving off (if needed)
7+ wlan .config (pm = 0xa11140 ) # set power mode to get WiFi power-saving off (if needed)
8+
9+ # Better: Use symbolic constants for portability across different MicroPython ports
10+ wlan .config (pm = network .WLAN .PM_NONE ) # Disable power management
11+ wlan .config (pm = network .WLAN .PM_PERFORMANCE ) # Balanced power/performance
12+ wlan .config (pm = network .WLAN .PM_POWERSAVE ) # Maximum power saving
You can’t perform that action at this time.
0 commit comments