Browse Source

drivers/ninaw10: Fix isconnected to return False when inactive.

If isconnected is called before active, it returns -1, which causes
mp_obj_new_bool return True, indicating the module is connected.
pull/8563/head
iabdalkader 3 years ago
committed by Damien George
parent
commit
52c2580a40
  1. 6
      drivers/ninaw10/nina_wifi_drv.c

6
drivers/ninaw10/nina_wifi_drv.c

@ -469,11 +469,7 @@ int nina_disconnect(void) {
}
int nina_isconnected(void) {
int status = nina_connection_status();
if (status == -1) {
return -1;
}
return status == NINA_STATUS_CONNECTED;
return nina_connection_status() == NINA_STATUS_CONNECTED;
}
int nina_connected_sta(uint32_t *sta_ip) {

Loading…
Cancel
Save