tweak exception messages (re-tested)

This commit is contained in:
anecdata 2021-11-11 21:54:41 -06:00
parent 85301cb0e5
commit bb8e9ef483
3 changed files with 4 additions and 4 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 started"
msgid "Can't change MAC address while station is connected"
msgstr ""
#: shared-bindings/storage/__init__.c shared-bindings/usb_cdc/__init__.c
@ -4458,7 +4458,7 @@ msgid "wifi is not enabled"
msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "wifi ssid must be between 1 and 32 characters"
msgid "wifi ssid can't be more than 32 bytes"
msgstr ""
#: shared-bindings/_bleio/Adapter.c

View File

@ -122,7 +122,7 @@ 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 started"));
mp_raise_RuntimeError(translate("Can't change MAC address while station is connected"));
}
if ((mac[0] & 0b1) == 0b1) {
mp_raise_RuntimeError(translate("MAC address can't be a multicast address"));

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 must be between 1 and 32 characters"));
mp_raise_ValueError(translate("wifi ssid can't be more than 32 bytes"));
}
mp_buffer_info_t password;