changes
This commit is contained in:
@ -12,8 +12,10 @@ tConfigBlock configBlock;
|
||||
const uint32_t MAGIC = 0xC0DE0001;
|
||||
extern ESP8266WebServer webServer;
|
||||
|
||||
|
||||
void configServeIndex() {
|
||||
webServer.send(200, "text/html", ""
|
||||
webServer.send(200, "text/html",
|
||||
""
|
||||
"<!doctype html"
|
||||
"<html lang=\"en\">"
|
||||
" <head>"
|
||||
@ -29,7 +31,8 @@ void configServeIndex() {
|
||||
" <td>"
|
||||
" <label for\"$configItem.key\">$configItem.label</label>"
|
||||
" </td><td>"
|
||||
" <input type=\"text\" name=\"$configItem.key\" id=\"$configItem.key\"/>"
|
||||
" <input type=\"text\" name=\"$configItem.key\" id=\"$configItem.key\""
|
||||
" />"
|
||||
" </td>"
|
||||
" </tr>"
|
||||
#end if
|
||||
@ -43,7 +46,9 @@ void configServeIndex() {
|
||||
" </form>"
|
||||
" </body>"
|
||||
"</html>"
|
||||
"");
|
||||
);
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
Serial.println("indexHtml request served");
|
||||
#endif
|
||||
@ -62,4 +67,17 @@ void configServeGetConfiguration() {
|
||||
|
||||
webServer.send(200, "text/html", "configuration saved");
|
||||
}
|
||||
|
||||
|
||||
void showConfiguration() {
|
||||
Serial.println("Configuration is");
|
||||
|
||||
#for $configItem in $configItems
|
||||
#if $configItem.label != "_"
|
||||
Serial.print("$configItem.key = ");
|
||||
Serial.println(configBlock.$configItem.key);
|
||||
|
||||
#end if
|
||||
#end for
|
||||
|
||||
Serial.println("---");
|
||||
}
|
Reference in New Issue
Block a user