simplify network task loop
This commit is contained in:
16
main.cpp
16
main.cpp
@@ -32,21 +32,11 @@ void networkTask(void *pvParameters)
|
||||
while(true)
|
||||
{
|
||||
bool connected = network->update();
|
||||
|
||||
if(connected)
|
||||
if(connected && openerEnabled)
|
||||
{
|
||||
if(openerEnabled)
|
||||
{
|
||||
networkOpener->update();
|
||||
}
|
||||
network->update();
|
||||
webCfgServer->update();
|
||||
}
|
||||
else
|
||||
{
|
||||
network->update();
|
||||
webCfgServer->update();
|
||||
networkOpener->update();
|
||||
}
|
||||
webCfgServer->update();
|
||||
|
||||
delay(200);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user