Fully implemented settings logic, not working
ESP.reset() crashes module settings not getting saved EEPROM saver? EEPROM loader? server args? -> More printouts TODO updated
This commit is contained in:
parent
f13b377ca6
commit
57c42facd5
8
TODO.txt
8
TODO.txt
@ -1,13 +1,13 @@
|
||||
switch dev enviroment to 100% git pc -- done
|
||||
fix current issues -- done
|
||||
fix current issues -- vip -- debug
|
||||
implement brightness slider -- vip -- done
|
||||
remove settings lock option -- done
|
||||
toolbar preparation
|
||||
add toolbar conf in settings
|
||||
additional color picker field
|
||||
change slider height to relative values
|
||||
fully implement EEPROM -- vip -- done
|
||||
implement settings getter/setter -- vip
|
||||
fully implement EEPROM -- vip -- done -- debug
|
||||
implement settings getter/setter -- vip -- done -- debug
|
||||
implement OTA
|
||||
implement OTA lock
|
||||
implement button
|
||||
@ -17,5 +17,3 @@ implement default color on boot
|
||||
|
||||
|
||||
FAILURE SOURCE?? --> non-null String
|
||||
|
||||
+4917693264270
|
@ -63,7 +63,7 @@
|
||||
</head>
|
||||
<body onload="GetCurrent()" class=" __plain_text_READY__">
|
||||
<h1>WLED Settings</h1>
|
||||
<form id="form_s" name="Settings_form" action="set-settings/" method="post">
|
||||
<form id="form_s" name="Settings_form" action="set-settings" method="post">
|
||||
<input type="submit" name="SUBM" value="Save">
|
||||
<input type="button" name="BACK" value="Back" onclick="OpenMain()">
|
||||
<h2>WiFi setup</h2>
|
||||
|
@ -309,9 +309,11 @@ uint8_t getNumberAfterStringPos(char str[], char spos)
|
||||
return op.toInt();
|
||||
}
|
||||
|
||||
void handleSettingsSet(char HTTP_req[])
|
||||
void handleSettingsSet()
|
||||
{
|
||||
if (server.hasArg("CSSID")) clientssid = server.arg("CSSID");
|
||||
|
||||
saveSettingsToEEPROM();
|
||||
}
|
||||
|
||||
boolean handleSet(String req)
|
||||
@ -320,11 +322,6 @@ boolean handleSet(String req)
|
||||
Serial.println(req);
|
||||
req.toCharArray(HTTP_req, 350, 0);
|
||||
if (!StrContains(HTTP_req, "ajax_in")) {
|
||||
if (StrContains(HTTP_req, "set-settings"))
|
||||
{
|
||||
handleSettingsSet(HTTP_req);
|
||||
return true;
|
||||
}
|
||||
if (StrContains(HTTP_req, "get-settings"))
|
||||
{
|
||||
XML_response_settings();
|
||||
@ -555,6 +552,11 @@ void setup() {
|
||||
if(!handleFileRead("/index.htm")) server.send(404, "text/plain", "FileNotFound");
|
||||
});
|
||||
server.on("/reset", HTTP_GET, reset);
|
||||
server.on("/set-settings", HTTP_POST, [](){
|
||||
handleSettingsSet();
|
||||
server.send(200, "text/plain", "Settings saved. Please wait a minute for module to reset...");
|
||||
reset();
|
||||
});
|
||||
if (!ota_lock){
|
||||
//load editor
|
||||
server.on("/edit", HTTP_GET, [](){
|
||||
|
Loading…
Reference in New Issue
Block a user