Skip to content

Commit 747dc77

Browse files
committed
handle scan channel bounds but note they do nothing for RP2040 CYW43
1 parent 21c0c4c commit 747dc77

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

ports/raspberrypi/common-hal/wifi/Radio.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ void common_hal_wifi_radio_set_mac_address_ap(wifi_radio_obj_t *self, const uint
131131
ro_attribute(MP_QSTR_mac_address_ap);
132132
}
133133

134-
mp_obj_t common_hal_wifi_radio_start_scanning_networks(wifi_radio_obj_t *self) {
134+
mp_obj_t common_hal_wifi_radio_start_scanning_networks(wifi_radio_obj_t *self, uint8_t start_channel, uint8_t stop_channel) {
135+
// channel bounds are ignored; not implemented in driver
135136
if (self->current_scan) {
136137
mp_raise_RuntimeError(translate("Already scanning for wifi networks"));
137138
}

shared-bindings/wifi/Radio.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,12 @@ MP_PROPERTY_GETSET(wifi_radio_mac_address_ap_obj,
216216
//| def start_scanning_networks(
217217
//| self, *, start_channel: int = 1, stop_channel: int = 11
218218
//| ) -> Iterable[Network]:
219-
//| """Scans for available wifi networks over the given channel range. Make sure the channels are allowed in your country."""
219+
//| """Scans for available wifi networks over the given channel range. Make sure the channels are allowed in your country.
220+
//|
221+
//| .. note::
222+
//|
223+
//| In the raspberrypi port (RP2040 CYW43), ``start_channel`` and ``stop_channel`` are ignored.
224+
//| """
220225
//| ...
221226
STATIC mp_obj_t wifi_radio_start_scanning_networks(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
222227
enum { ARG_start_channel, ARG_stop_channel };

0 commit comments

Comments
 (0)