Skip to content

Commit 731fed8

Browse files
committed
ports/esp32/modnetwork.c: Use isconnected for link status
1 parent a3b1660 commit 731fed8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ports/esp32/modnetwork.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,11 +440,11 @@ STATIC mp_obj_t esp_status(mp_obj_t self_in) {
440440

441441
STATIC MP_DEFINE_CONST_FUN_OBJ_1(esp_status_obj, esp_status);
442442

443-
STATIC mp_obj_t lan_status(mp_obj_t self_in) {
443+
STATIC mp_obj_t lan_isconnected(mp_obj_t self_in) {
444444
lan_if_obj_t *self = MP_OBJ_TO_PTR(self_in);
445445
return self->link_func() ? mp_const_true : mp_const_false;
446446
}
447-
STATIC MP_DEFINE_CONST_FUN_OBJ_1(lan_status_obj, lan_status);
447+
STATIC MP_DEFINE_CONST_FUN_OBJ_1(lan_isconnected_obj, lan_isconnected);
448448

449449
STATIC mp_obj_t esp_scan(mp_obj_t self_in) {
450450
// check that STA mode is active
@@ -696,7 +696,8 @@ const mp_obj_type_t wlan_if_type = {
696696

697697
STATIC const mp_map_elem_t lan_if_locals_dict_table[] = {
698698
{ MP_OBJ_NEW_QSTR(MP_QSTR_active), (mp_obj_t)&lan_active_obj },
699-
{ MP_OBJ_NEW_QSTR(MP_QSTR_status), (mp_obj_t)&lan_status_obj },
699+
{ MP_OBJ_NEW_QSTR(MP_QSTR_isconnected), (mp_obj_t)&lan_isconnected_obj },
700+
{ MP_OBJ_NEW_QSTR(MP_QSTR_status), (mp_obj_t)&esp_status_obj },
700701
{ MP_OBJ_NEW_QSTR(MP_QSTR_ifconfig), (mp_obj_t)&esp_ifconfig_obj },
701702
};
702703

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy