Improve MQTT (#1232)

added shared variable for autointerval to use it as MQTT LWT timeout
This commit is contained in:
CaCO3
2022-10-30 20:08:14 +01:00
committed by GitHub
parent de46cd899e
commit ff726485ba
3 changed files with 10 additions and 18 deletions

View File

@@ -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;
}