simplify main for vedirect
This commit is contained in:
parent
f89ccdd2ee
commit
17e564a094
@ -16,6 +16,9 @@ void MqttHandleVedirectHassClass::init()
|
|||||||
|
|
||||||
void MqttHandleVedirectHassClass::loop()
|
void MqttHandleVedirectHassClass::loop()
|
||||||
{
|
{
|
||||||
|
if (!Configuration.get().Vedirect_Enabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (_updateForced) {
|
if (_updateForced) {
|
||||||
publishConfig();
|
publishConfig();
|
||||||
_updateForced = false;
|
_updateForced = false;
|
||||||
|
|||||||
17
src/main.cpp
17
src/main.cpp
@ -182,24 +182,21 @@ void loop()
|
|||||||
yield();
|
yield();
|
||||||
Hoymiles.loop();
|
Hoymiles.loop();
|
||||||
yield();
|
yield();
|
||||||
|
// Vedirect_Enabled is unknown to lib. Therefor check has to be done here
|
||||||
if (Configuration.get().Vedirect_Enabled) {
|
if (Configuration.get().Vedirect_Enabled) {
|
||||||
VeDirect.loop();
|
VeDirect.loop();
|
||||||
yield();
|
yield();
|
||||||
}
|
}
|
||||||
MqttHandleDtu.loop();
|
MqttHandleDtu.loop();
|
||||||
yield();
|
yield();
|
||||||
MqttHandleInverter.loop();
|
MqttHandleInverter.loop();
|
||||||
yield();
|
yield();
|
||||||
if (Configuration.get().Vedirect_Enabled) {
|
MqttHandleVedirect.loop();
|
||||||
MqttHandleVedirect.loop();
|
yield();
|
||||||
yield();
|
|
||||||
}
|
|
||||||
MqttHandleHass.loop();
|
MqttHandleHass.loop();
|
||||||
yield();
|
yield();
|
||||||
if (Configuration.get().Vedirect_Enabled) {
|
MqttHandleVedirectHass.loop();
|
||||||
MqttHandleVedirectHass.loop();
|
yield();
|
||||||
yield();
|
|
||||||
}
|
|
||||||
WebApi.loop();
|
WebApi.loop();
|
||||||
yield();
|
yield();
|
||||||
Display.loop();
|
Display.loop();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user