mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-14 15:11:32 +10:00
In https://github.com/esp8266/Arduino/pull/4889 the core was modified to
disable WPS by default. Its only enabled if NO_EXTRA_4K_HEAP is defined. To enable you must re-run the board manager with --noextra4kheap. This addes #ifdef NO_EXTRA_4K_HEAP arround WPS usage so it won't generate compiler errors.
This commit is contained in:
+4
-1
@@ -654,6 +654,7 @@ uint8_t WiFiManager::connectWifi(String ssid, String pass) {
|
||||
|
||||
DEBUG_WM(DEBUG_VERBOSE,F("Connection result:"),getWLStatusString(connRes));
|
||||
|
||||
#ifdef NO_EXTRA_4K_HEAP
|
||||
// do WPS, if WPS options enabled and not connected and no password was supplied
|
||||
// @todo this seems like wrong place for this, is it a fallback or option?
|
||||
if (_tryWPS && connRes != WL_CONNECTED && pass == "") {
|
||||
@@ -661,6 +662,7 @@ uint8_t WiFiManager::connectWifi(String ssid, String pass) {
|
||||
// should be connected at the end of WPS
|
||||
connRes = waitForConnectResult();
|
||||
}
|
||||
#endif
|
||||
|
||||
if(connRes != WL_SCAN_COMPLETED){
|
||||
updateConxResult(connRes);
|
||||
@@ -782,6 +784,7 @@ uint8_t WiFiManager::waitForConnectResult(uint16_t timeout) {
|
||||
return status;
|
||||
}
|
||||
|
||||
#ifdef NO_EXTRA_4K_HEAP
|
||||
void WiFiManager::startWPS() {
|
||||
DEBUG_WM(F("START WPS"));
|
||||
#ifdef ESP8266
|
||||
@@ -791,7 +794,7 @@ void WiFiManager::startWPS() {
|
||||
#endif
|
||||
DEBUG_WM(F("END WPS"));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
String WiFiManager::getHTTPHead(String title){
|
||||
String page;
|
||||
|
||||
Reference in New Issue
Block a user