API simplificatoin ph1 (@send param remove

This commit is contained in:
2020-05-21 15:36:35 +03:00
parent cebb6fc486
commit 0687949bb7
17 changed files with 141 additions and 77 deletions

View File

@@ -189,7 +189,7 @@ while (configLocked)
#ifdef _dmxin
DMXCheck();
#endif
if (lanStatus != RETAINING_COLLECTING) pollingLoop();
if (isNotRetainingStatus()) pollingLoop();
thermoLoop();
inputLoop();
}
@@ -215,6 +215,10 @@ debugSerial<<F("Deleting conf. RAM was:")<<freeRam();
debugSerial<<F(" is ")<<freeRam()<<endl;
}
bool isNotRetainingStatus() {
return (lanStatus != RETAINING_COLLECTING);
}
void mqttCallback(char *topic, byte *payload, unsigned int length) {
debugSerial<<F("\n[")<<topic<<F("] ");
if (!payload) return;
@@ -290,7 +294,7 @@ else
/*
if (item.itemType == CH_GROUP && (lanStatus == RETAINING_COLLECTING))
return; //Do not restore group channels - they consist not relevant data */
item.Ctrl((char *)payload, !(lanStatus == RETAINING_COLLECTING),subItem);
item.Ctrl((char *)payload,subItem);
} //valid item
}
@@ -1743,7 +1747,7 @@ void loop_main() {
if (items) {
// #ifndef MODBUS_DISABLE
if (lanStatus != RETAINING_COLLECTING) pollingLoop();
if (isNotRetainingStatus()) pollingLoop();
// #endif
//#ifdef _owire
thermoLoop();