more string cleanup

This commit is contained in:
Shawn A
2018-02-14 16:42:10 -06:00
parent 43a035091e
commit 62f5ce6e0c
3 changed files with 16 additions and 15 deletions
+2 -13
View File
@@ -1337,19 +1337,8 @@ boolean WiFiManager::validApPassword(){
}
String WiFiManager::getWLStatusString(uint8_t status){
const char * const WIFI_STA_STATUS[]
{
"WL_IDLE_STATUS",
"WL_NO_SSID_AVAIL",
"WL_SCAN_COMPLETED",
"WL_CONNECTED",
"WL_CONNECT_FAILED",
"WL_CONNECTION_LOST",
"WL_DISCONNECTED"
};
if(status >=0 && status <=6) return WIFI_STA_STATUS[status];
return F("UNKNOWN");
return FPSTR(S_NA);
}
String WiFiManager::encryptionTypeStr(uint8_t authmode) {
@@ -1365,7 +1354,7 @@ String WiFiManager::encryptionTypeStr(uint8_t authmode) {
case ENC_TYPE_AUTO:
return F("WPA_WPA2_PSK");
default:
return F("Unknown");
return FPSTR(S_NA);
}
}
+1 -1
View File
@@ -269,7 +269,7 @@ class WiFiManager
return obj->fromString(s);
}
auto optionalIPFromString(...) -> bool {
DEBUG_WM("NO fromString METHOD ON IPAddress, you need ESP8266 core 2.1.0 or newer for Custom IP configuration to work.");
// DEBUG_WM("NO fromString METHOD ON IPAddress, you need ESP8266 core 2.1.0 or newer for Custom IP configuration to work.");
return false;
}
};
+13 -1
View File
@@ -133,6 +133,7 @@ const char S_enable[] PROGMEM = "Enabled";
const char S_disable[] PROGMEM = "Disabled";
const char S_GET[] PROGMEM = "GET";
const char S_POST[] PROGMEM = "POST";
const char S_NA[] PROGMEM = "Unknown";
const char S_titlewifisaved[] PROGMEM = "Credentials Saved"; // @token titlewifisaved
const char S_titlewifi[] PROGMEM = "Config ESP"; // @token titlewifi
@@ -187,4 +188,15 @@ const char T_R[] PROGMEM = "{R}"; // @token R
// http
const char HTTP_HEAD_CL[] PROGMEM = "Content-Length";
const char HTTP_HEAD_CT[] PROGMEM = "text/html";
const char HTTP_HEAD_CT2[] PROGMEM = "text/plain";
const char HTTP_HEAD_CT2[] PROGMEM = "text/plain";
const char * const WIFI_STA_STATUS[] PROGMEM
{
"WL_IDLE_STATUS",
"WL_NO_SSID_AVAIL",
"WL_SCAN_COMPLETED",
"WL_CONNECTED",
"WL_CONNECT_FAILED",
"WL_CONNECTION_LOST",
"WL_DISCONNECTED"
};