From cee18a7ce36ca6793f3e9fe91b0cb231e5901702 Mon Sep 17 00:00:00 2001 From: Derek123456 Date: Tue, 22 Aug 2017 10:30:53 +0800 Subject: [PATCH 1/2] Update WiFiManager.h Changed to --- WiFiManager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WiFiManager.h b/WiFiManager.h index fa479d2..5b37e44 100644 --- a/WiFiManager.h +++ b/WiFiManager.h @@ -29,7 +29,7 @@ const char HTTP_HEAD_END[] PROGMEM = "
{v} {r}%
"; const char HTTP_FORM_START[] PROGMEM = "


"; -const char HTTP_FORM_PARAM[] PROGMEM = "
"; +const char HTTP_FORM_PARAM[] PROGMEM = "
"; const char HTTP_FORM_END[] PROGMEM = "
"; const char HTTP_SCAN_LINK[] PROGMEM = "
Scan
"; const char HTTP_SAVED[] PROGMEM = "
Credentials Saved
Trying to connect ESP to network.
If it fails reconnect to AP to try again
"; From 68e32a10c01406b398ecb956ca514f43e2ab6ec2 Mon Sep 17 00:00:00 2001 From: Derek123456 Date: Tue, 22 Aug 2017 10:32:52 +0800 Subject: [PATCH 2/2] Update WiFiManager.cpp https://github.com/tzapu/WiFiManager/issues/392 Increased size of parLength to 5 so the custom parameter length variable can be up to 9999 long. --- WiFiManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WiFiManager.cpp b/WiFiManager.cpp index 57ce031..97c9eea 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -485,7 +485,7 @@ void WiFiManager::handleWifi(boolean scan) { } page += FPSTR(HTTP_FORM_START); - char parLength[2]; + char parLength[5]; // add the extra parameters to the form for (int i = 0; i < _paramsCount; i++) { if (_params[i] == NULL) { @@ -497,7 +497,7 @@ void WiFiManager::handleWifi(boolean scan) { pitem.replace("{i}", _params[i]->getID()); pitem.replace("{n}", _params[i]->getID()); pitem.replace("{p}", _params[i]->getPlaceholder()); - snprintf(parLength, 2, "%d", _params[i]->getValueLength()); + snprintf(parLength, 5, "%d", _params[i]->getValueLength()); pitem.replace("{l}", parLength); pitem.replace("{v}", _params[i]->getValue()); pitem.replace("{c}", _params[i]->getCustomHTML());