|
@@ -24,11 +24,22 @@ TaskHandle_t xHandleblink_task_doFlow = NULL;
|
|
|
TaskHandle_t xHandletask_autodoFlow = NULL;
|
|
TaskHandle_t xHandletask_autodoFlow = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
bool flowisrunning = false;
|
|
bool flowisrunning = false;
|
|
|
|
|
|
|
|
long auto_intervall = 0;
|
|
long auto_intervall = 0;
|
|
|
bool auto_isrunning = false;
|
|
bool auto_isrunning = false;
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+int countRounds = 0;
|
|
|
|
|
+
|
|
|
|
|
+int getCountFlowRounds() {
|
|
|
|
|
+ return countRounds;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
esp_err_t GetJPG(std::string _filename, httpd_req_t *req)
|
|
esp_err_t GetJPG(std::string _filename, httpd_req_t *req)
|
|
|
{
|
|
{
|
|
|
return tfliteflow.GetJPGStream(_filename, req);
|
|
return tfliteflow.GetJPGStream(_filename, req);
|
|
@@ -101,6 +112,8 @@ void blink_task_doFlow(void *pvParameter)
|
|
|
|
|
|
|
|
esp_err_t handler_init(httpd_req_t *req)
|
|
esp_err_t handler_init(httpd_req_t *req)
|
|
|
{
|
|
{
|
|
|
|
|
+ if (debug_detail_heap) LogFile.WriteHeapInfo("handler_init - Start");
|
|
|
|
|
+
|
|
|
LogFile.WriteToFile("handler_init");
|
|
LogFile.WriteToFile("handler_init");
|
|
|
printf("handler_doinit uri:\n"); printf(req->uri); printf("\n");
|
|
printf("handler_doinit uri:\n"); printf(req->uri); printf("\n");
|
|
|
|
|
|
|
@@ -114,11 +127,15 @@ esp_err_t handler_init(httpd_req_t *req)
|
|
|
/* Respond with an empty chunk to signal HTTP response completion */
|
|
/* Respond with an empty chunk to signal HTTP response completion */
|
|
|
httpd_resp_send_chunk(req, NULL, 0);
|
|
httpd_resp_send_chunk(req, NULL, 0);
|
|
|
|
|
|
|
|
|
|
+ if (debug_detail_heap) LogFile.WriteHeapInfo("handler_init - Done");
|
|
|
|
|
+
|
|
|
return ESP_OK;
|
|
return ESP_OK;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
esp_err_t handler_doflow(httpd_req_t *req)
|
|
esp_err_t handler_doflow(httpd_req_t *req)
|
|
|
{
|
|
{
|
|
|
|
|
+ if (debug_detail_heap) LogFile.WriteHeapInfo("handler_doflow - Start");
|
|
|
|
|
+
|
|
|
LogFile.WriteToFile("handler_doflow");
|
|
LogFile.WriteToFile("handler_doflow");
|
|
|
char* resp_str;
|
|
char* resp_str;
|
|
|
|
|
|
|
@@ -137,7 +154,9 @@ esp_err_t handler_doflow(httpd_req_t *req)
|
|
|
resp_str = "doFlow gestartet - dauert ca. 60 Sekunden";
|
|
resp_str = "doFlow gestartet - dauert ca. 60 Sekunden";
|
|
|
httpd_resp_send(req, resp_str, strlen(resp_str));
|
|
httpd_resp_send(req, resp_str, strlen(resp_str));
|
|
|
/* Respond with an empty chunk to signal HTTP response completion */
|
|
/* Respond with an empty chunk to signal HTTP response completion */
|
|
|
- httpd_resp_send_chunk(req, NULL, 0);
|
|
|
|
|
|
|
+ httpd_resp_send_chunk(req, NULL, 0);
|
|
|
|
|
+ if (debug_detail_heap) LogFile.WriteHeapInfo("handler_doflow - Done");
|
|
|
|
|
+
|
|
|
return ESP_OK;
|
|
return ESP_OK;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -146,6 +165,8 @@ esp_err_t handler_doflow(httpd_req_t *req)
|
|
|
|
|
|
|
|
esp_err_t handler_wasserzaehler(httpd_req_t *req)
|
|
esp_err_t handler_wasserzaehler(httpd_req_t *req)
|
|
|
{
|
|
{
|
|
|
|
|
+ if (debug_detail_heap) LogFile.WriteHeapInfo("handler_wasserzaehler - Start");
|
|
|
|
|
+
|
|
|
LogFile.WriteToFile("handler_wasserzaehler");
|
|
LogFile.WriteToFile("handler_wasserzaehler");
|
|
|
bool _rawValue = false;
|
|
bool _rawValue = false;
|
|
|
bool _noerror = false;
|
|
bool _noerror = false;
|
|
@@ -215,7 +236,7 @@ esp_err_t handler_wasserzaehler(httpd_req_t *req)
|
|
|
httpd_resp_sendstr_chunk(req, txt.c_str());
|
|
httpd_resp_sendstr_chunk(req, txt.c_str());
|
|
|
delete htmlinfo[i];
|
|
delete htmlinfo[i];
|
|
|
}
|
|
}
|
|
|
- htmlinfo.clear();
|
|
|
|
|
|
|
+ htmlinfo.clear();
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -227,12 +248,15 @@ esp_err_t handler_wasserzaehler(httpd_req_t *req)
|
|
|
/* Respond with an empty chunk to signal HTTP response completion */
|
|
/* Respond with an empty chunk to signal HTTP response completion */
|
|
|
httpd_resp_sendstr_chunk(req, NULL);
|
|
httpd_resp_sendstr_chunk(req, NULL);
|
|
|
|
|
|
|
|
|
|
+ if (debug_detail_heap) LogFile.WriteHeapInfo("handler_wasserzaehler - Done");
|
|
|
|
|
+
|
|
|
return ESP_OK;
|
|
return ESP_OK;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
esp_err_t handler_editflow(httpd_req_t *req)
|
|
esp_err_t handler_editflow(httpd_req_t *req)
|
|
|
{
|
|
{
|
|
|
|
|
+ if (debug_detail_heap) LogFile.WriteHeapInfo("handler_editflow - Start");
|
|
|
LogFile.WriteToFile("handler_editflow");
|
|
LogFile.WriteToFile("handler_editflow");
|
|
|
|
|
|
|
|
printf("handler_editflow uri: "); printf(req->uri); printf("\n");
|
|
printf("handler_editflow uri: "); printf(req->uri); printf("\n");
|
|
@@ -334,6 +358,7 @@ esp_err_t handler_editflow(httpd_req_t *req)
|
|
|
|
|
|
|
|
zw = "CutImage Done";
|
|
zw = "CutImage Done";
|
|
|
httpd_resp_sendstr_chunk(req, zw.c_str());
|
|
httpd_resp_sendstr_chunk(req, zw.c_str());
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (_task.compare("test_take") == 0)
|
|
if (_task.compare("test_take") == 0)
|
|
@@ -388,6 +413,7 @@ esp_err_t handler_editflow(httpd_req_t *req)
|
|
|
|
|
|
|
|
/* Respond with an empty chunk to signal HTTP response completion */
|
|
/* Respond with an empty chunk to signal HTTP response completion */
|
|
|
httpd_resp_sendstr_chunk(req, NULL);
|
|
httpd_resp_sendstr_chunk(req, NULL);
|
|
|
|
|
+ if (debug_detail_heap) LogFile.WriteHeapInfo("handler_editflow - Done");
|
|
|
|
|
|
|
|
return ESP_OK;
|
|
return ESP_OK;
|
|
|
};
|
|
};
|
|
@@ -395,6 +421,8 @@ esp_err_t handler_editflow(httpd_req_t *req)
|
|
|
|
|
|
|
|
esp_err_t handler_prevalue(httpd_req_t *req)
|
|
esp_err_t handler_prevalue(httpd_req_t *req)
|
|
|
{
|
|
{
|
|
|
|
|
+ if (debug_detail_heap) LogFile.WriteHeapInfo("handler_prevalue - Start");
|
|
|
|
|
+
|
|
|
LogFile.WriteToFile("handler_prevalue");
|
|
LogFile.WriteToFile("handler_prevalue");
|
|
|
const char* resp_str;
|
|
const char* resp_str;
|
|
|
string zw;
|
|
string zw;
|
|
@@ -424,6 +452,8 @@ esp_err_t handler_prevalue(httpd_req_t *req)
|
|
|
/* Respond with an empty chunk to signal HTTP response completion */
|
|
/* Respond with an empty chunk to signal HTTP response completion */
|
|
|
httpd_resp_send_chunk(req, NULL, 0);
|
|
httpd_resp_send_chunk(req, NULL, 0);
|
|
|
|
|
|
|
|
|
|
+ if (debug_detail_heap) LogFile.WriteHeapInfo("handler_prevalue - Start");
|
|
|
|
|
+
|
|
|
return ESP_OK;
|
|
return ESP_OK;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -444,7 +474,8 @@ void task_autodoFlow(void *pvParameter)
|
|
|
|
|
|
|
|
while (auto_isrunning)
|
|
while (auto_isrunning)
|
|
|
{
|
|
{
|
|
|
- LogFile.WriteToFile("task_autodoFlow - next round");
|
|
|
|
|
|
|
+ std::string _zw = "task_autodoFlow - next round - Round #" + std::to_string(++countRounds);
|
|
|
|
|
+ LogFile.WriteToFile(_zw);
|
|
|
printf("Autoflow: start\n");
|
|
printf("Autoflow: start\n");
|
|
|
fr_start = esp_timer_get_time();
|
|
fr_start = esp_timer_get_time();
|
|
|
|
|
|