mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 12:36:52 +03:00
Improve MQTT (#1232)
added shared variable for autointerval to use it as MQTT LWT timeout
This commit is contained in:
@@ -29,6 +29,8 @@ extern "C" {
|
||||
|
||||
static const char* TAG = "flow_controll";
|
||||
|
||||
float AutoIntervalShared = 10;
|
||||
|
||||
|
||||
std::string ClassFlowControll::doSingleStep(std::string _stepname, std::string _host){
|
||||
std::string _classname = "";
|
||||
@@ -155,11 +157,6 @@ bool ClassFlowControll::isAutoStart(long &_intervall)
|
||||
return AutoStart;
|
||||
}
|
||||
|
||||
int ClassFlowControll::getAutoInterval()
|
||||
{
|
||||
return AutoIntervall * 60; // AutoIntervall: Minuten -> seconds
|
||||
}
|
||||
|
||||
ClassFlow* ClassFlowControll::CreateClassFlow(std::string _type)
|
||||
{
|
||||
ClassFlow* cfc = NULL;
|
||||
@@ -515,6 +512,8 @@ bool ClassFlowControll::ReadParameter(FILE* pfile, string& aktparamgraph)
|
||||
LogFile.setLogLevel((esp_log_level_t)(stoi(zerlegt[1]))); // Gets mapped to esp_log_level_t
|
||||
}
|
||||
}
|
||||
|
||||
AutoIntervalShared = AutoIntervall;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user