handle scan channel bounds but note they do nothing for RP2040 CYW43

This commit is contained in:
Dan Halbert 2022-10-07 16:22:17 -04:00
parent 21c0c4c1a6
commit 747dc7746d
2 changed files with 8 additions and 2 deletions

View File

@ -131,7 +131,8 @@ void common_hal_wifi_radio_set_mac_address_ap(wifi_radio_obj_t *self, const uint
ro_attribute(MP_QSTR_mac_address_ap);
}
mp_obj_t common_hal_wifi_radio_start_scanning_networks(wifi_radio_obj_t *self) {
mp_obj_t common_hal_wifi_radio_start_scanning_networks(wifi_radio_obj_t *self, uint8_t start_channel, uint8_t stop_channel) {
// channel bounds are ignored; not implemented in driver
if (self->current_scan) {
mp_raise_RuntimeError(translate("Already scanning for wifi networks"));
}

View File

@ -216,7 +216,12 @@ MP_PROPERTY_GETSET(wifi_radio_mac_address_ap_obj,
//| def start_scanning_networks(
//| self, *, start_channel: int = 1, stop_channel: int = 11
//| ) -> Iterable[Network]:
//| """Scans for available wifi networks over the given channel range. Make sure the channels are allowed in your country."""
//| """Scans for available wifi networks over the given channel range. Make sure the channels are allowed in your country.
//|
//| .. note::
//|
//| In the raspberrypi port (RP2040 CYW43), ``start_channel`` and ``stop_channel`` are ignored.
//| """
//| ...
STATIC mp_obj_t wifi_radio_start_scanning_networks(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_start_channel, ARG_stop_channel };