webserver: separate setup from start

This commit is contained in:
Nicu Hodos 2025-10-08 22:14:17 +02:00
parent 2804528a92
commit afc252062e

View File

@ -73,13 +73,14 @@ void setup() {
[] {turnLed();} [] {turnLed();}
); );
Devices::setup(); Devices::setup();
WebServer::setup();
Wifi::setup(ts, Wifi::setup(ts,
[] { [] {
Ota::tLoop.enable(); Ota::tLoop.enable();
Mqtt::tReConnect.enable(); Mqtt::tReConnect.enable();
Ntp::tUpdateTime.enable(); Ntp::tUpdateTime.enable();
WebServer::setup(); WebServer::start();
}, },
[] { [] {
Ota::tLoop.disable(); Ota::tLoop.disable();