Rolling 20201204

This commit is contained in:
jomjol
2020-12-04 22:09:20 +01:00
parent 9e85b1240a
commit 816f93222b
29 changed files with 591 additions and 12 deletions

View File

@@ -66,6 +66,7 @@ std::vector<HTMLInfo*> ClassFlowControll::GetAllAnalog()
void ClassFlowControll::SetInitialParameter(void)
{
AutoStart = false;
SetupModeActive = false;
AutoIntervall = 10;
}
@@ -309,6 +310,16 @@ bool ClassFlowControll::ReadParameter(FILE* pfile, string& aktparamgraph)
xTaskCreate(&task_doTimeSync, "update_time", configMINIMAL_STACK_SIZE * 16, &TimeUpdateIntervall, tskIDLE_PRIORITY, NULL);
}
if ((toUpper(zerlegt[0]) == "SETUPMODE") && (zerlegt.size() > 1))
{
if (toUpper(zerlegt[1]) == "TRUE")
{
SetupModeActive = true;
}
}
}
return true;
}

View File

@@ -21,6 +21,7 @@ protected:
bool AutoStart;
float AutoIntervall;
bool SetupModeActive;
void SetInitialParameter(void);
std::string aktstatus;
int TimeUpdateIntervall;
@@ -29,6 +30,7 @@ protected:
public:
void InitFlow(std::string config);
bool doFlow(string time);
bool getStatusSetupModus(){return SetupModeActive;};
string getReadout(bool _rawvalue, bool _noerror);
string UpdatePrevalue(std::string _newvalue);
string GetPrevalue();

View File

@@ -313,7 +313,6 @@ bool ClassFlowPostProcessing::doFlow(string zwtime)
ReturnRawValue = ShiftDecimal(ReturnRawValue, DecimalShift);
if (!PreValueUse || !PreValueOkay)
{
ReturnValue = ReturnRawValue;
@@ -391,6 +390,9 @@ string ClassFlowPostProcessing::getReadoutParam(bool _rawValue, bool _noerror)
string ClassFlowPostProcessing::RundeOutput(float _in, int _anzNachkomma){
std::stringstream stream;
if (_anzNachkomma < 0) {
_anzNachkomma = 0;
}
stream << std::fixed << std::setprecision(_anzNachkomma) << _in;
return stream.str();
}

View File

@@ -29,6 +29,12 @@ bool flowisrunning = false;
long auto_intervall = 0;
bool auto_isrunning = false;
bool isSetupModusActive() {
return tfliteflow.getStatusSetupModus();
return false;
}
void KillTFliteTasks()
{
printf("Handle: xHandleblink_task_doFlow: %ld\n", (long) xHandleblink_task_doFlow);
@@ -418,6 +424,7 @@ void task_autodoFlow(void *pvParameter)
doInit();
auto_isrunning = tfliteflow.isAutoStart(auto_intervall);
auto_isrunning = auto_isrunning && (!isSetupModusActive());
while (auto_isrunning)
{

View File

@@ -10,4 +10,6 @@ void register_server_tflite_uri(httpd_handle_t server);
void KillTFliteTasks();
void TFliteDoAutoStart();
void TFliteDoAutoStart();
bool isSetupModusActive();