completely remove device connected check fix network task loop

This commit is contained in:
technyon
2023-01-26 21:18:49 +01:00
parent 05ef2fa5be
commit 2b20c619a2
4 changed files with 17 additions and 26 deletions

View File

@@ -31,24 +31,20 @@ void networkTask(void *pvParameters)
{
while(true)
{
bool r = network->update();
bool connected = network->update();
switch(r)
if(connected)
{
// Network Device and MQTT is connected. Process all updates.
case 0:
case 1:
if(openerEnabled)
{
networkOpener->update();
}
network->update();
webCfgServer->update();
break;
// Neither Network Devicc or MQTT is connected. Call network to allow for a reconnect.
default:
network->update();
break;
if(openerEnabled)
{
networkOpener->update();
}
network->update();
webCfgServer->update();
}
else
{
network->update();
}
delay(200);