Merge branch 'patch-1'
This commit is contained in:
commit
8bd3c176fe
1 changed files with 22 additions and 0 deletions
|
@ -445,6 +445,28 @@ void setup() {
|
|||
DBG_OUTPUT_PORT.print("/get_brightness: ");
|
||||
DBG_OUTPUT_PORT.println(str_brightness);
|
||||
});
|
||||
|
||||
server.on("/set_delay", []() {
|
||||
if (server.arg("d").toInt() >= 0) {
|
||||
ws2812fx_speed = server.arg("d").toInt();
|
||||
}
|
||||
if (ws2812fx_speed > 255) {
|
||||
ws2812fx_speed = 255;
|
||||
}
|
||||
if (ws2812fx_speed < 0) {
|
||||
ws2812fx_speed = 0;
|
||||
}
|
||||
strip.setSpeed(ws2812fx_speed);
|
||||
|
||||
getStatusJSON();
|
||||
});
|
||||
|
||||
server.on("/get_delay", []() {
|
||||
String str_delay = String(ws2812fx_speed);
|
||||
server.send(200, "text/plain", str_delay );
|
||||
DBG_OUTPUT_PORT.print("/get_delay: ");
|
||||
DBG_OUTPUT_PORT.println(str_delay);
|
||||
});
|
||||
|
||||
server.on("/get_switch", []() {
|
||||
server.send(200, "text/plain", (mode == OFF) ? "0" : "1" );
|
||||
|
|
Loading…
Reference in a new issue