mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2025-05-21 13:41:19 +00:00
reset esp when config changes
This commit is contained in:
parent
c09dc17967
commit
4a67b9cc1c
1 changed files with 4 additions and 1 deletions
|
@ -90,12 +90,15 @@ void setup()
|
||||||
config.clear();
|
config.clear();
|
||||||
config.end();
|
config.end();
|
||||||
// respond with default config
|
// respond with default config
|
||||||
onGetConfig(config, request); });
|
onGetConfig(config, request);
|
||||||
|
|
||||||
|
ESP.restart(); });
|
||||||
|
|
||||||
server.onRequestBody([](AsyncWebServerRequest *request, uint8_t *data, size_t len, size_t index, size_t total)
|
server.onRequestBody([](AsyncWebServerRequest *request, uint8_t *data, size_t len, size_t index, size_t total)
|
||||||
{
|
{
|
||||||
if (request->url() == "/config" && request->method() == HTTP_PUT) {
|
if (request->url() == "/config" && request->method() == HTTP_PUT) {
|
||||||
onPutConfig(request, data, len, index, total);
|
onPutConfig(request, data, len, index, total);
|
||||||
|
ESP.restart();
|
||||||
} });
|
} });
|
||||||
|
|
||||||
delay(1000);
|
delay(1000);
|
||||||
|
|
Loading…
Add table
Reference in a new issue