more strings progmem

This commit is contained in:
Shawn A
2018-02-15 12:23:20 -06:00
parent d8d26b26c2
commit 41b4717148
2 changed files with 24 additions and 22 deletions
+4 -4
View File
@@ -743,7 +743,7 @@ String WiFiManager::getScanItemOut(){
}
}
page += "<br/>";
page += FPSTR(HTTP_BR);
}
return page;
@@ -774,7 +774,7 @@ String WiFiManager::getStaticOut(){
// WiFi.gatewayIP().toString();
page += getIpForm(FPSTR(S_sn),FPSTR(S_subnet),(_sta_static_sn ? _sta_static_sn.toString() : "")); // @token subnet
// WiFi.subnetMask().toString();
page += F("<br/>"); // @todo remove these, use css
page += FPSTR(HTTP_BR); // @todo remove these, use css
}
return page;
}
@@ -823,7 +823,7 @@ String WiFiManager::getParamOut(){
// if no ID use customhtml for item, else generate from param string
if (_params[i]->getID() != NULL) {
if(tok_I)pitem.replace(FPSTR(T_i), (String)F("param_")+(String)i);
if(tok_I)pitem.replace(FPSTR(T_i), (String)FPSTR(S_parampre)+(String)i);
if(tok_i)pitem.replace(FPSTR(T_i), _params[i]->getID());
if(tok_n)pitem.replace(FPSTR(T_n), _params[i]->getID());
if(tok_p)pitem.replace(FPSTR(T_p), FPSTR(T_t));
@@ -880,7 +880,7 @@ void WiFiManager::handleWifiSave() {
}
//read parameter from server
String value;
if(server->arg("param_"+(String)i) != NULL) value = server->arg("param_"+(String)i).c_str();
if(server->arg((String)FPSTR(S_parampre)+(String)i) != NULL) value = server->arg((String)FPSTR(S_parampre)+(String)i).c_str();
else value = server->arg(_params[i]->getID()).c_str();
//store it in array
+20 -18
View File
@@ -45,6 +45,7 @@ const char HTTP_ERASEBTN[] PROGMEM = "<br/><form action='/erase' method=
const char HTTP_STATUS_ON[] PROGMEM = "<div class='msg P'><strong>Connected</strong> to {v}<br/><em><small>with IP {i}</small></em></div>";
const char HTTP_STATUS_OFF[] PROGMEM = "<div class='msg'><strong>Not Connected</strong> to {v}</div>";
const char HTTP_STATUS_NONE[] PROGMEM = "<div class='msg'>No AP set</div>";
const char HTTP_BR[] PROGMEM = "<br/>";
const char HTTP_STYLE[] PROGMEM = "<style>"
".c,body{text-align:center;font-family:verdana}div,input{padding:5px;font-size:1em}input{width:95%;margin:5px 0}button{cursor:pointer;border:0;border-radius:.3rem;background-color:#1fa3ec;color:#fff;line-height:2.4rem;font-size:1.2rem;width:100%}"
@@ -154,24 +155,25 @@ 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
const char S_titleinfo[] PROGMEM = "Info"; // @token titleinfo
const char S_titleexit[] PROGMEM = "Exit"; // @token titleexit
const char S_titlereset[] PROGMEM = "Reset"; //@token titlereset
const char S_titleerase[] PROGMEM = "Erase"; // @token titleerase
const char S_options[] PROGMEM = "options"; // @token options
const char S_nonetworks[] PROGMEM = "No networks found. Refresh to scan again."; // @token nonetworks
const char S_staticip[] PROGMEM = "Static IP"; // @token staticip
const char S_staticgw[] PROGMEM = "Static Gateway"; // @token staticgw
const char S_subnet[] PROGMEM = "Subnet"; // @token subnet
const char S_exiting[] PROGMEM = "Exiting"; // @token exiting
const char S_resetting[] PROGMEM = "Module will reset in a few seconds."; //@token resetting
const char S_error[] PROGMEM = "An Error Occured"; // @token erroroccur
const char S_notfound[] PROGMEM = "File Not Found\n\n"; // @token notfound
const char S_uri[] PROGMEM = "URI: "; // @token uri
const char S_method[] PROGMEM = "\nMethod: "; // @token method
const char S_args[] PROGMEM = "\nArguments: "; // @token args
const char S_titlewifisaved[] PROGMEM = "Credentials Saved";
const char S_titlewifi[] PROGMEM = "Config ESP";
const char S_titleinfo[] PROGMEM = "Info";
const char S_titleexit[] PROGMEM = "Exit";
const char S_titlereset[] PROGMEM = "Reset";
const char S_titleerase[] PROGMEM = "Erase";
const char S_options[] PROGMEM = "options";
const char S_nonetworks[] PROGMEM = "No networks found. Refresh to scan again.";
const char S_staticip[] PROGMEM = "Static IP";
const char S_staticgw[] PROGMEM = "Static Gateway";
const char S_subnet[] PROGMEM = "Subnet";
const char S_exiting[] PROGMEM = "Exiting";
const char S_resetting[] PROGMEM = "Module will reset in a few seconds.";
const char S_error[] PROGMEM = "An Error Occured";
const char S_notfound[] PROGMEM = "File Not Found\n\n";
const char S_uri[] PROGMEM = "URI: ";
const char S_method[] PROGMEM = "\nMethod: ";
const char S_args[] PROGMEM = "\nArguments: ";
const char S_parampre[] PROGMEM = "param_";
// debug strings
const char D_HR[] PROGMEM = "--------------------";