aboutsummaryrefslogtreecommitdiff
path: root/IOT-clapSensor.ino
diff options
context:
space:
mode:
authorJakob Stendahl <jakob.stendahl@outlook.com>2017-10-23 15:22:54 +0200
committerJakob Stendahl <jakob.stendahl@outlook.com>2017-10-23 15:22:54 +0200
commit568c82ac54a308fa92e805572ca998fc9d7fb902 (patch)
tree69232a6ae23c49da04f3a66ca4685581db4c1171 /IOT-clapSensor.ino
parent376ab64059e9e676e121310ba094c7a8d732397a (diff)
downloadLuxcena-cs-568c82ac54a308fa92e805572ca998fc9d7fb902.tar.gz
Luxcena-cs-568c82ac54a308fa92e805572ca998fc9d7fb902.zip
Added dynamic success message when saving settings
Diffstat (limited to 'IOT-clapSensor.ino')
-rw-r--r--IOT-clapSensor.ino5
1 files changed, 3 insertions, 2 deletions
diff --git a/IOT-clapSensor.ino b/IOT-clapSensor.ino
index a6f236e..e6f0048 100644
--- a/IOT-clapSensor.ino
+++ b/IOT-clapSensor.ino
@@ -204,7 +204,7 @@ void handleJson() {
}
void handleSettings() {
-
+ String successMsg = "";
String type, _deviceName, _deviceLocation, _ssid, _password;
for (int i = 0; i < server.args(); i++) {
String argKey = server.argName(i);
@@ -232,12 +232,13 @@ void handleSettings() {
MemoryAccess.writeAscii("Password", _password);
}
MemoryAccess.commit();
+ successMsg = "Settings updated!";
while (1);
}
String htmlResponse = SETTINGS_page;
htmlResponse.replace("{{NAME}}", deviceName);
- htmlResponse.replace("{{SUCCESSMSG}}", "");
+ htmlResponse.replace("{{SUCCESSMSG}}", successMsg);
htmlResponse.replace("{{DEVICENAME}}", deviceName);
htmlResponse.replace("{{DEVICELOCATION}}", deviceLocation);
server.send( 200, "text/html", htmlResponse );