update webserver html,js,css

This commit is contained in:
2021-07-05 18:15:57 +02:00
parent f62a18fe66
commit 2754bd5247
5 changed files with 117 additions and 88 deletions
+14 -1
View File
@@ -58,11 +58,24 @@ void HTTPServer::logt(const char *format, ...) {
void HTTPServer::start_apps() {
// application handler
this->on("/app=terminal", HTTP_POST, [this]() {
this->on("/update", HTTP_POST, [this]() {
// Serial.printf("got /update with args()=%d\n", args());
for(int i=0; i<args(); i++) {
Serial.printf("%s=%s\n", argName(i).c_str(), arg(i).c_str());
}
send(200, "text/plain", "accepted");
});
this->on("/terminal", HTTP_POST, [this]() {
// Serial.printf("got /terminal\n");
if(tbuf_head) {
send(200, "text/plain", tbuf);
tbuf_head = 0;
}
else {
send(202, "text/plain", "");
}
});
}
+1 -1
View File
@@ -17,7 +17,7 @@ class Treppe {
private:
const uint8_t stufen;
uint16_t time_per_stair = 300; // dimmtime per stair [ms]
uint16_t idle_brightness = 400;
uint16_t idle_brightness = 100;
uint16_t idle_bright_internal = 0;
uint16_t active_brightness = 700;