提交 91d02cc6 编写于 作者: S sticilface 提交者: Me No Dev

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);`
上级 f54b0fcd
......@@ -262,7 +262,7 @@ bool WiFiSTAClass::disconnect(bool wifioff)
WiFi.getMode();
esp_wifi_start();
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) {
WiFi.enableSTA(false);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册