1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

proposal for issue #1845 wifi_wps_status_cb get an undefined status 4 and missed wifi_wps_disable (#2312)

This commit is contained in:
Jean-Baptiste 2016-08-01 05:46:29 +02:00 committed by Ivan Grokhotkov
parent c52088c774
commit db5e20f237
2 changed files with 7 additions and 1 deletions

View File

@ -590,6 +590,12 @@ void wifi_wps_status_cb(wps_cb_status status) {
case WPS_CB_ST_WEP: case WPS_CB_ST_WEP:
DEBUGV("wps WEP\n"); DEBUGV("wps WEP\n");
break; break;
case WPS_CB_ST_UNK:
DEBUGV("wps UNKNOWN\n");
if(!wifi_wps_disable()) {
DEBUGV("wps disable failed\n");
}
break;
} }
// TODO user function to get status // TODO user function to get status
@ -670,4 +676,3 @@ void ESP8266WiFiSTAClass::_smartConfigCallback(uint32_t st, void* result) {
WiFi.stopSmartConfig(); WiFi.stopSmartConfig();
} }
} }

View File

@ -481,6 +481,7 @@ enum wps_cb_status {
WPS_CB_ST_FAILED, WPS_CB_ST_FAILED,
WPS_CB_ST_TIMEOUT, WPS_CB_ST_TIMEOUT,
WPS_CB_ST_WEP, WPS_CB_ST_WEP,
WPS_CB_ST_UNK,
}; };
bool wifi_wps_enable(WPS_TYPE_t wps_type); bool wifi_wps_enable(WPS_TYPE_t wps_type);