MQTT improvements (#1487)

* removed no longer used code

* updated logs

* increased heap memory. this most likely was the reason that the MQTT init failed, see https://github.com/jomjol/AI-on-the-edge-device/issues/1455#issuecomment-1336450501

Co-authored-by: CaCO3 <caco@ruinelli.ch>
This commit is contained in:
CaCO3
2022-12-05 06:55:08 +01:00
committed by GitHub
parent 4b52e61755
commit e87b91f6eb
5 changed files with 26 additions and 22 deletions

View File

@@ -306,21 +306,23 @@ bool ClassFlowMQTT::doFlow(string zwtime)
MQTTPublish(namenumber + "json", json, SetRetainFlag);
}
}
else
{
for (int i = 0; i < ListFlowControll->size(); ++i)
{
zw = (*ListFlowControll)[i]->getReadout();
if (zw.length() > 0)
{
if (result.length() == 0)
result = zw;
else
result = result + "\t" + zw;
}
}
MQTTPublish(topic, result, SetRetainFlag);
}
/* Disabled because this is no longer a use case */
// else
// {
// for (int i = 0; i < ListFlowControll->size(); ++i)
// {
// zw = (*ListFlowControll)[i]->getReadout();
// if (zw.length() > 0)
// {
// if (result.length() == 0)
// result = zw;
// else
// result = result + "\t" + zw;
// }
// }
// MQTTPublish(topic, result, SetRetainFlag);
// }
OldValue = result;