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();

View File

@@ -13,6 +13,8 @@
#include "esp_wifi.h"
#include "server_tflite.h"
httpd_handle_t server = NULL;
@@ -152,7 +154,9 @@ esp_err_t hello_main_handler(httpd_req_t *req)
if ((strcmp(req->uri, "/") == 0))
{
filetosend = filetosend + "/html/index.html";
{
filetosend = filetosend + "/html/index.html";
}
}
else
{
@@ -163,6 +167,11 @@ esp_err_t hello_main_handler(httpd_req_t *req)
}
}
if (filetosend == "/sdcard/html/index.html" && isSetupModusActive()) {
printf("System ist im Setupmodus --> index.html --> setup.html");
filetosend = "/sdcard/html/setup.html";
}
printf("Filename: %s\n", filename);
printf("File requested: %s\n", filetosend.c_str());

View File

@@ -1,4 +1,4 @@
const char* GIT_REV="c5059b4";
const char* GIT_REV="9e85b12";
const char* GIT_TAG="";
const char* GIT_BRANCH="rolling";
const char* BUILD_TIME="2020-12-03 20:31";
const char* BUILD_TIME="2020-12-04 22:01";

View File

@@ -1,4 +1,4 @@
const char* GIT_REV="c5059b4";
const char* GIT_REV="9e85b12";
const char* GIT_TAG="";
const char* GIT_BRANCH="rolling";
const char* BUILD_TIME="2020-12-03 20:27";
const char* BUILD_TIME="2020-12-04 22:01";