tweak exception messages (re-tested)
This commit is contained in:
parent
85301cb0e5
commit
bb8e9ef483
|
@ -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
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue