mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2025-05-18 21:55:34 +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.end();
|
||||
// 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)
|
||||
{
|
||||
if (request->url() == "/config" && request->method() == HTTP_PUT) {
|
||||
onPutConfig(request, data, len, index, total);
|
||||
ESP.restart();
|
||||
} });
|
||||
|
||||
delay(1000);
|
||||
|
|
Loading…
Add table
Reference in a new issue