Version 1.42
Fixed bug with ESP-NOW devices not getting restart or update command. Minor main code refactoring.
This commit is contained in:
parent
e4572cc31a
commit
cf32071ee0
@ -193,12 +193,12 @@ void setup()
|
||||
|
||||
void loop()
|
||||
{
|
||||
if (mqttAvailabilityCheckTimerSemaphore)
|
||||
checkMqttAvailability();
|
||||
if (keepAliveMessageTimerSemaphore)
|
||||
sendKeepAliveMessage();
|
||||
if (attributesMessageTimerSemaphore)
|
||||
sendAttributesMessage();
|
||||
if (mqttAvailabilityCheckTimerSemaphore)
|
||||
checkMqttAvailability();
|
||||
if (workMode == ESP_NOW_WIFI)
|
||||
mqttWifiClient.loop();
|
||||
if (workMode == ESP_NOW_LAN)
|
||||
@ -679,6 +679,8 @@ void checkMqttAvailability()
|
||||
mqttWifiClient.subscribe((topicPrefix + "/espnow_led/#").c_str());
|
||||
|
||||
sendConfigMessage();
|
||||
sendAttributesMessage();
|
||||
sendKeepAliveMessage();
|
||||
}
|
||||
}
|
||||
|
||||
@ -696,6 +698,8 @@ void checkMqttAvailability()
|
||||
mqttEthClient.subscribe((topicPrefix + "/espnow_led/#").c_str());
|
||||
|
||||
sendConfigMessage();
|
||||
sendAttributesMessage();
|
||||
sendKeepAliveMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user