maybe fewer bytes

This commit is contained in:
anecdata 2021-11-11 23:23:52 -06:00
parent bb8e9ef483
commit e4f06f69cd
3 changed files with 6 additions and 6 deletions

View File

@ -683,7 +683,7 @@ msgid "Can't set CCCD on local Characteristic"
msgstr ""
#: ports/espressif/common-hal/wifi/Radio.c
msgid "Can't change MAC address while station is connected"
msgid "Can't set MAC address while connected"
msgstr ""
#: shared-bindings/storage/__init__.c shared-bindings/usb_cdc/__init__.c
@ -1470,7 +1470,7 @@ msgid "Layer must be a Group or TileGrid subclass."
msgstr ""
#: ports/espressif/common-hal/wifi/Radio.c
msgid "MAC address can't be a multicast address"
msgid "Invalid multicast MAC address"
msgstr ""
#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c
@ -4458,7 +4458,7 @@ msgid "wifi is not enabled"
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "wifi ssid can't be more than 32 bytes"
msgid "ssid can't be more than 32 bytes"
msgstr ""
#: shared-bindings/_bleio/Adapter.c

View File

@ -122,10 +122,10 @@ mp_obj_t common_hal_wifi_radio_get_mac_address(wifi_radio_obj_t *self) {
void common_hal_wifi_radio_set_mac_address(wifi_radio_obj_t *self, const uint8_t *mac) {
if (self->sta_mode) {
mp_raise_RuntimeError(translate("Can't change MAC address while station is connected"));
mp_raise_RuntimeError(translate("Can't set MAC address while connected"));
}
if ((mac[0] & 0b1) == 0b1) {
mp_raise_RuntimeError(translate("MAC address can't be a multicast address"));
mp_raise_RuntimeError(translate("Invalid multicast MAC address"));
}
esp_wifi_set_mac(ESP_IF_WIFI_STA, mac);
}

View File

@ -327,7 +327,7 @@ STATIC mp_obj_t wifi_radio_connect(size_t n_args, const mp_obj_t *pos_args, mp_m
ssid.len = 0;
mp_get_buffer_raise(args[ARG_ssid].u_obj, &ssid, MP_BUFFER_READ);
if (ssid.len > 32) {
mp_raise_ValueError(translate("wifi ssid can't be more than 32 bytes"));
mp_raise_ValueError(translate("ssid can't be more than 32 bytes"));
}
mp_buffer_info_t password;