fix wifi reset and monitor deinit routine
This commit is contained in:
parent
b435e7b56a
commit
a62675a81a
@ -102,8 +102,7 @@ void common_hal_wifi_monitor_construct(wifi_monitor_obj_t *self, uint8_t channel
|
||||
|
||||
bool common_hal_wifi_monitor_deinited(void) {
|
||||
bool enabled;
|
||||
esp_wifi_get_promiscuous(&enabled);
|
||||
return !enabled;
|
||||
return (esp_wifi_get_promiscuous(&enabled) == ESP_ERR_WIFI_NOT_INIT) ? true : !enabled;
|
||||
}
|
||||
|
||||
void common_hal_wifi_monitor_deinit(wifi_monitor_obj_t *self) {
|
||||
|
@ -174,6 +174,7 @@ void wifi_reset(void) {
|
||||
radio->netif = NULL;
|
||||
esp_netif_destroy(radio->ap_netif);
|
||||
radio->ap_netif = NULL;
|
||||
wifi_inited = false;
|
||||
}
|
||||
|
||||
void ipaddress_ipaddress_to_esp_idf(mp_obj_t ip_address, ip_addr_t *esp_ip_address) {
|
||||
|
Loading…
Reference in New Issue
Block a user