Skip to content

Commit e1c025d

Browse files
committed
Fix documentation of wifi.Monitor
Its methods & properties were incorrectly documented as being directly in 'wifi'
1 parent 6457827 commit e1c025d

File tree

1 file changed

+22
-26
lines changed

1 file changed

+22
-26
lines changed

shared-bindings/wifi/Monitor.c

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,14 @@
3636
//| """For monitoring WiFi packets."""
3737
//|
3838

39-
//| def __init__(self, channel: Optional[int] = 1, queue: Optional[int] = 128) -> None:
40-
//| """Initialize `wifi.Monitor` singleton.
39+
//| def __init__(self, channel: Optional[int] = 1, queue: Optional[int] = 128) -> None:
40+
//| """Initialize `wifi.Monitor` singleton.
4141
//|
42-
//| :param int channel: The WiFi channel to scan.
43-
//| :param int queue: The queue size for buffering the packet.
44-
//|
45-
//| """
46-
//| ...
42+
//| :param int channel: The WiFi channel to scan.
43+
//| :param int queue: The queue size for buffering the packet.
4744
//|
45+
//| """
46+
//| ...
4847
STATIC mp_obj_t wifi_monitor_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
4948
enum { ARG_channel, ARG_queue };
5049
static const mp_arg_t allowed_args[] = {
@@ -69,8 +68,8 @@ STATIC mp_obj_t wifi_monitor_make_new(const mp_obj_type_t *type, size_t n_args,
6968
return MP_OBJ_FROM_PTR(self);
7069
}
7170

72-
//| channel: int
73-
//| """The WiFi channel to scan."""
71+
//| channel: int
72+
//| """The WiFi channel to scan."""
7473
STATIC mp_obj_t wifi_monitor_obj_get_channel(mp_obj_t self_in) {
7574
return common_hal_wifi_monitor_get_channel(self_in);
7675
}
@@ -90,8 +89,8 @@ MP_PROPERTY_GETSET(wifi_monitor_channel_obj,
9089
(mp_obj_t)&wifi_monitor_get_channel_obj,
9190
(mp_obj_t)&wifi_monitor_set_channel_obj);
9291

93-
//| queue: int
94-
//| """The queue size for buffering the packet."""
92+
//| queue: int
93+
//| """The queue size for buffering the packet."""
9594
STATIC mp_obj_t wifi_monitor_obj_get_queue(mp_obj_t self_in) {
9695
return common_hal_wifi_monitor_get_queue(self_in);
9796
}
@@ -100,29 +99,26 @@ MP_DEFINE_CONST_FUN_OBJ_1(wifi_monitor_get_queue_obj, wifi_monitor_obj_get_queue
10099
MP_PROPERTY_GETTER(wifi_monitor_queue_obj,
101100
(mp_obj_t)&wifi_monitor_get_queue_obj);
102101

103-
//| def deinit(self) -> None:
104-
//| """De-initialize `wifi.Monitor` singleton."""
105-
//| ...
106-
//|
102+
//| def deinit(self) -> None:
103+
//| """De-initialize `wifi.Monitor` singleton."""
104+
//| ...
107105
STATIC mp_obj_t wifi_monitor_obj_deinit(mp_obj_t self_in) {
108106
common_hal_wifi_monitor_deinit(self_in);
109107
return mp_const_none;
110108
}
111109
STATIC MP_DEFINE_CONST_FUN_OBJ_1(wifi_monitor_deinit_obj, wifi_monitor_obj_deinit);
112110

113-
//| def lost(self) -> int:
114-
//| """Returns the packet loss count. The counter resets after each poll."""
115-
//| ...
116-
//|
111+
//| def lost(self) -> int:
112+
//| """Returns the packet loss count. The counter resets after each poll."""
113+
//| ...
117114
STATIC mp_obj_t wifi_monitor_obj_get_lost(mp_obj_t self_in) {
118115
return common_hal_wifi_monitor_get_lost(self_in);
119116
}
120117
MP_DEFINE_CONST_FUN_OBJ_1(wifi_monitor_lost_obj, wifi_monitor_obj_get_lost);
121118

122-
//| def queued(self) -> int:
123-
//| """Returns the packet queued count."""
124-
//| ...
125-
//|
119+
//| def queued(self) -> int:
120+
//| """Returns the packet queued count."""
121+
//| ...
126122
STATIC mp_obj_t wifi_monitor_obj_get_queued(mp_obj_t self_in) {
127123
if (common_hal_wifi_monitor_deinited()) {
128124
return mp_obj_new_int_from_uint(0);
@@ -131,9 +127,9 @@ STATIC mp_obj_t wifi_monitor_obj_get_queued(mp_obj_t self_in) {
131127
}
132128
MP_DEFINE_CONST_FUN_OBJ_1(wifi_monitor_queued_obj, wifi_monitor_obj_get_queued);
133129

134-
//| def packet(self) -> dict:
135-
//| """Returns the monitor packet."""
136-
//| ...
130+
//| def packet(self) -> dict:
131+
//| """Returns the monitor packet."""
132+
//| ...
137133
//|
138134
STATIC mp_obj_t wifi_monitor_obj_get_packet(mp_obj_t self_in) {
139135
if (common_hal_wifi_monitor_deinited()) {

0 commit comments

Comments
 (0)