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.
This commit is contained in:
parent
03c61916bc
commit
52c2580a40
@ -469,11 +469,7 @@ int nina_disconnect(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int nina_isconnected(void) {
|
int nina_isconnected(void) {
|
||||||
int status = nina_connection_status();
|
return nina_connection_status() == NINA_STATUS_CONNECTED;
|
||||||
if (status == -1) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return status == NINA_STATUS_CONNECTED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int nina_connected_sta(uint32_t *sta_ip) {
|
int nina_connected_sta(uint32_t *sta_ip) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user