Change disconnect function (#466)
* Change disconnect function Current implementation does not disconnect the WiFi. Use of `esp_wifi_disconnect()` does. * Update WiFiSTA.cpp put back the clear ssid + password remove the duplicate `esp_wifi_set_config(WIFI_IF_STA, &conf);`
This commit is contained in:
parent
f54b0fcd14
commit
91d02cc6d5
@ -262,7 +262,7 @@ bool WiFiSTAClass::disconnect(bool wifioff)
|
|||||||
WiFi.getMode();
|
WiFi.getMode();
|
||||||
esp_wifi_start();
|
esp_wifi_start();
|
||||||
esp_wifi_set_config(WIFI_IF_STA, &conf);
|
esp_wifi_set_config(WIFI_IF_STA, &conf);
|
||||||
ret = esp_wifi_set_config(WIFI_IF_STA, &conf) == ESP_OK;
|
ret = esp_wifi_disconnect() == ESP_OK;
|
||||||
|
|
||||||
if(wifioff) {
|
if(wifioff) {
|
||||||
WiFi.enableSTA(false);
|
WiFi.enableSTA(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user