mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 20:46:52 +03:00
Show alternative images for states "Initialization" and "Take Image" (#1858)
* Show image for flow not started + take image
* Update
* Adding new images
* .
* Avoid multiple Access-Control-Allow-Origin * (#1859)
* Avoid multiple Access-Control-Allow-Origin *
* Adapt loglevel to debug
* Update build.yaml
* .
* New state "initialization (delayed)", renaming
* Overview: Renamed "Status" + switched position
* Improve data logging on errors (#1839)
* use error level for log if "Rate to High" or "Negative Rate"
* remove redundant data logging
* .
* .
* update time also in case of an error
* move calculation of difference to the top as discussed in PR 1839
Co-authored-by: CaCO3 <caco@ruinelli.ch>
* Heap tracing (#1861)
* Update sdkconfig.esp32cam-dev-task-analysis.defaults
* Update defines.h
* Update platformio.ini
* Update main.cpp
* Update defines.h
* Update ClassFlowCNNGeneral.cpp
* Update platformio.ini
* disable HIMEM (external > 4mb ram) not used (#1864)
#force disable HIMEM as not used in default config, can be enabled with [env:esp32cam-dev-himem]
#free 256kb of internal memory :
#I (2112) esp_himem: Initialized. Using last 8 32KB address blocks for bank switching on 4352 KB of physical memory.
CONFIG_SPIRAM_BANKSWITCH_ENABLE=n
#CONFIG_SPIRAM_BANKSWITCH_RESERVE is not set
* Update ota_page.html (#1866)
Fixed the firework to match the actual button text.
Fixed other random typos.
* add AlignmentAlgo=off option (#1867)
* Replace outdated wiki links, wording (#1871)
* Revert "add AlignmentAlgo=off option (#1867)" (#1876)
This reverts commit 3de4cc7c56.
* fixed typo (#1881)
Co-authored-by: CaCO3 <caco@ruinelli.ch>
* Show WIFI signal text labels / Log RSSI value to logfile (#1877)
* Overview: WIFI RSSI strength text labels
* Log RSSI value (debug level)
* Typo
* Update config.ini (#1880)
* Update Changelog.md for release (#1892)
Co-authored-by: github-actions <github-actions@github.com>
* Update Changelog.md
* Remove newline in version (#1891)
* remove newline in version
* .
* .
Co-authored-by: CaCO3 <caco@ruinelli.ch>
Co-authored-by: CaCO3 <caco@ruinelli.ch>
Co-authored-by: CaCO3 <caco3@ruinelli.ch>
Co-authored-by: Nicolas Liaudat <nliaudat@users.noreply.github.com>
Co-authored-by: AngryApostrophe <89547888+AngryApostrophe@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -242,10 +242,6 @@ esp_err_t CCamera::CaptureToBasisImage(CImageBasis *_Image, int delay)
|
|||||||
|
|
||||||
_Image->EmptyImage(); //Delete previous stored raw image -> black image
|
_Image->EmptyImage(); //Delete previous stored raw image -> black image
|
||||||
|
|
||||||
#ifdef ALGROI_LOAD_FROM_MEM_AS_JPG__SHOW_TAKE_IMAGE_PROCESS
|
|
||||||
tfliteflow.SetNewAlgROI(false);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
LEDOnOff(true);
|
LEDOnOff(true);
|
||||||
|
|
||||||
if (delay > 0)
|
if (delay > 0)
|
||||||
@@ -321,10 +317,6 @@ esp_err_t CCamera::CaptureToBasisImage(CImageBasis *_Image, int delay)
|
|||||||
p_target[2] = p_source[2];
|
p_target[2] = p_source[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_DETAIL_ON
|
|
||||||
LogFile.WriteHeapInfo("CCamera::CaptureToBasisImage - After Copy To Target");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
delete _zwImage;
|
delete _zwImage;
|
||||||
|
|
||||||
#ifdef DEBUG_DETAIL_ON
|
#ifdef DEBUG_DETAIL_ON
|
||||||
|
|||||||
@@ -173,14 +173,12 @@ bool ClassFlowAlignment::doFlow(string time)
|
|||||||
{
|
{
|
||||||
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Can't allocate AlgROI");
|
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Can't allocate AlgROI");
|
||||||
LogFile.WriteHeapInfo("ClassFlowAlignment-doFlow");
|
LogFile.WriteHeapInfo("ClassFlowAlignment-doFlow");
|
||||||
tfliteflow.SetNewAlgROI(false); // continue flow only with alg.jpg (no ROIs available)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AlgROI)
|
if (AlgROI)
|
||||||
{
|
{
|
||||||
ImageBasis->writeToMemoryAsJPG((ImageData*)AlgROI, 90);
|
ImageBasis->writeToMemoryAsJPG((ImageData*)AlgROI, 90);
|
||||||
tfliteflow.SetNewAlgROI(true);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -154,12 +154,6 @@ void ClassFlowControll::AnalogDrawROI(CImageBasis *_zw)
|
|||||||
if (flowanalog)
|
if (flowanalog)
|
||||||
flowanalog->DrawROI(_zw);
|
flowanalog->DrawROI(_zw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ClassFlowControll::SetNewAlgROI(bool _value)
|
|
||||||
{
|
|
||||||
bNewAlgROI = _value;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -195,7 +189,7 @@ void ClassFlowControll::SetInitialParameter(void)
|
|||||||
flowpostprocessing = NULL;
|
flowpostprocessing = NULL;
|
||||||
disabled = false;
|
disabled = false;
|
||||||
aktRunNr = 0;
|
aktRunNr = 0;
|
||||||
aktstatus = "Booting ...";
|
aktstatus = "Flow task not yet created";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -270,8 +264,12 @@ ClassFlow* ClassFlowControll::CreateClassFlow(std::string _type)
|
|||||||
|
|
||||||
void ClassFlowControll::InitFlow(std::string config)
|
void ClassFlowControll::InitFlow(std::string config)
|
||||||
{
|
{
|
||||||
string line;
|
aktstatus = "Initialization";
|
||||||
|
//#ifdef ENABLE_MQTT
|
||||||
|
//MQTTPublish(mqttServer_getMainTopic() + "/" + "status", "Initialization", false); // Right now, not possible -> MQTT Service is going to be started later
|
||||||
|
//#endif //ENABLE_MQTT
|
||||||
|
|
||||||
|
string line;
|
||||||
flowpostprocessing = NULL;
|
flowpostprocessing = NULL;
|
||||||
|
|
||||||
ClassFlow* cfc;
|
ClassFlow* cfc;
|
||||||
@@ -318,6 +316,12 @@ std::string* ClassFlowControll::getActStatus()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ClassFlowControll::setActStatus(std::string _aktstatus)
|
||||||
|
{
|
||||||
|
aktstatus = _aktstatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void ClassFlowControll::doFlowMakeImageOnly(string time)
|
void ClassFlowControll::doFlowMakeImageOnly(string time)
|
||||||
{
|
{
|
||||||
std::string zw_time;
|
std::string zw_time;
|
||||||
@@ -672,12 +676,6 @@ esp_err_t ClassFlowControll::GetJPGStream(std::string _fn, httpd_req_t *req)
|
|||||||
esp_err_t result = ESP_FAIL;
|
esp_err_t result = ESP_FAIL;
|
||||||
bool _sendDelete = false;
|
bool _sendDelete = false;
|
||||||
|
|
||||||
if (flowalignment == NULL)
|
|
||||||
{
|
|
||||||
ESP_LOGD(TAG, "ClassFloDControll::GetJPGStream: FloDalignment is not (yet) initialized. Interrupt serving!");
|
|
||||||
return ESP_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_fn == "alg.jpg") {
|
if (_fn == "alg.jpg") {
|
||||||
if (flowalignment && flowalignment->ImageBasis->ImageOkay()) {
|
if (flowalignment && flowalignment->ImageBasis->ImageOkay()) {
|
||||||
_send = flowalignment->ImageBasis;
|
_send = flowalignment->ImageBasis;
|
||||||
@@ -689,26 +687,119 @@ esp_err_t ClassFlowControll::GetJPGStream(std::string _fn, httpd_req_t *req)
|
|||||||
}
|
}
|
||||||
else if (_fn == "alg_roi.jpg") {
|
else if (_fn == "alg_roi.jpg") {
|
||||||
#ifdef ALGROI_LOAD_FROM_MEM_AS_JPG // no CImageBasis needed to create alg_roi.jpg (ca. 790kB less RAM)
|
#ifdef ALGROI_LOAD_FROM_MEM_AS_JPG // no CImageBasis needed to create alg_roi.jpg (ca. 790kB less RAM)
|
||||||
if (bNewAlgROI) {
|
if (aktstatus.find("Initialization (delayed)") != -1) {
|
||||||
|
FILE* file = fopen("/sdcard/html/Flowstate_initialization_delayed.jpg", "rb");
|
||||||
|
|
||||||
|
if (!file) {
|
||||||
|
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "File /sdcard/html/Flowstate_initialization_delayed.jpg not found");
|
||||||
|
return ESP_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
fseek(file, 0, SEEK_END);
|
||||||
|
long fileSize = ftell(file); /* how long is the file ? */
|
||||||
|
fseek(file, 0, SEEK_SET); /* reset */
|
||||||
|
|
||||||
|
unsigned char* fileBuffer = (unsigned char*) malloc(fileSize);
|
||||||
|
|
||||||
|
if (!fileBuffer) {
|
||||||
|
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "ClassFlowControll::GetJPGStream: Not enough memory to create fileBuffer: " + std::to_string(fileSize));
|
||||||
|
fclose(file);
|
||||||
|
return ESP_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
fread(fileBuffer, fileSize, 1, file);
|
||||||
|
fclose(file);
|
||||||
|
|
||||||
|
httpd_resp_set_type(req, "image/jpeg");
|
||||||
|
result = httpd_resp_send(req, (const char *)fileBuffer, fileSize);
|
||||||
|
delete fileBuffer;
|
||||||
|
}
|
||||||
|
else if (aktstatus.find("Initialization") != -1) {
|
||||||
|
FILE* file = fopen("/sdcard/html/Flowstate_initialization.jpg", "rb");
|
||||||
|
|
||||||
|
if (!file) {
|
||||||
|
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "File /sdcard/html/Flowstate_initialization.jpg not found");
|
||||||
|
return ESP_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
fseek(file, 0, SEEK_END);
|
||||||
|
long fileSize = ftell(file); /* how long is the file ? */
|
||||||
|
fseek(file, 0, SEEK_SET); /* reset */
|
||||||
|
|
||||||
|
unsigned char* fileBuffer = (unsigned char*) malloc(fileSize);
|
||||||
|
|
||||||
|
if (!fileBuffer) {
|
||||||
|
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "ClassFlowControll::GetJPGStream: Not enough memory to create fileBuffer: " + std::to_string(fileSize));
|
||||||
|
fclose(file);
|
||||||
|
return ESP_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
fread(fileBuffer, fileSize, 1, file);
|
||||||
|
fclose(file);
|
||||||
|
|
||||||
|
httpd_resp_set_type(req, "image/jpeg");
|
||||||
|
result = httpd_resp_send(req, (const char *)fileBuffer, fileSize);
|
||||||
|
delete fileBuffer;
|
||||||
|
}
|
||||||
|
else if (aktstatus.find("Take Image") != -1) {
|
||||||
|
if (flowalignment && flowalignment->AlgROI) {
|
||||||
|
FILE* file = fopen("/sdcard/html/Flowstate_take_image.jpg", "rb");
|
||||||
|
|
||||||
|
if (!file) {
|
||||||
|
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "File /sdcard/html/Flowstate_take_image.jpg not found");
|
||||||
|
return ESP_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
fseek(file, 0, SEEK_END);
|
||||||
|
flowalignment->AlgROI->size = ftell(file); /* how long is the file ? */
|
||||||
|
fseek(file, 0, SEEK_SET); /* reset */
|
||||||
|
|
||||||
|
if (flowalignment->AlgROI->size > MAX_JPG_SIZE) {
|
||||||
|
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "File /sdcard/html/Flowstate_take_image.jpg too large: " + std::to_string(flowalignment->AlgROI->size));
|
||||||
|
fclose(file);
|
||||||
|
return ESP_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
fread(flowalignment->AlgROI->data, flowalignment->AlgROI->size, 1, file);
|
||||||
|
fclose(file);
|
||||||
|
|
||||||
|
httpd_resp_set_type(req, "image/jpeg");
|
||||||
|
result = httpd_resp_send(req, (const char *)flowalignment->AlgROI->data, flowalignment->AlgROI->size);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "ClassFlowControll::GetJPGStream: alg_roi.jpg cannot be served -> alg.jpg is going to be served!");
|
||||||
|
if (flowalignment && flowalignment->ImageBasis->ImageOkay()) {
|
||||||
|
_send = flowalignment->ImageBasis;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
httpd_resp_send(req, NULL, 0);
|
||||||
|
return ESP_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
if (flowalignment && flowalignment->AlgROI) {
|
if (flowalignment && flowalignment->AlgROI) {
|
||||||
httpd_resp_set_type(req, "image/jpeg");
|
httpd_resp_set_type(req, "image/jpeg");
|
||||||
result = httpd_resp_send(req, (const char *)flowalignment->AlgROI->data, flowalignment->AlgROI->size);
|
result = httpd_resp_send(req, (const char *)flowalignment->AlgROI->data, flowalignment->AlgROI->size);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "ClassFlowControll::GetJPGStream: alg_roi.jpg cannot be served");
|
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "ClassFlowControll::GetJPGStream: alg_roi.jpg cannot be served -> alg.jpg is going to be served!");
|
||||||
return ESP_FAIL;
|
if (flowalignment && flowalignment->ImageBasis->ImageOkay()) {
|
||||||
}
|
_send = flowalignment->ImageBasis;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (flowalignment && flowalignment->ImageBasis->ImageOkay()) {
|
httpd_resp_send(req, NULL, 0);
|
||||||
_send = flowalignment->ImageBasis;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
httpd_resp_send(req, NULL, 0);
|
|
||||||
return ESP_OK;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
if (!flowalignment) {
|
||||||
|
ESP_LOGD(TAG, "ClassFloDControll::GetJPGStream: FlowAlignment is not (yet) initialized. Interrupt serving!");
|
||||||
|
httpd_resp_send(req, NULL, 0);
|
||||||
|
return ESP_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
_send = new CImageBasis(flowalignment->ImageBasis);
|
_send = new CImageBasis(flowalignment->ImageBasis);
|
||||||
|
|
||||||
if (_send->ImageOkay()) {
|
if (_send->ImageOkay()) {
|
||||||
|
|||||||
@@ -38,9 +38,6 @@ protected:
|
|||||||
void SetInitialParameter(void);
|
void SetInitialParameter(void);
|
||||||
std::string aktstatus;
|
std::string aktstatus;
|
||||||
int aktRunNr;
|
int aktRunNr;
|
||||||
#ifdef ALGROI_LOAD_FROM_MEM_AS_JPG
|
|
||||||
bool bNewAlgROI = false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void InitFlow(std::string config);
|
void InitFlow(std::string config);
|
||||||
@@ -54,9 +51,6 @@ public:
|
|||||||
bool ReadParameter(FILE* pfile, string& aktparamgraph);
|
bool ReadParameter(FILE* pfile, string& aktparamgraph);
|
||||||
string getJSON();
|
string getJSON();
|
||||||
string getNumbersName();
|
string getNumbersName();
|
||||||
#ifdef ALGROI_LOAD_FROM_MEM_AS_JPG
|
|
||||||
void SetNewAlgROI(bool _value);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
string TranslateAktstatus(std::string _input);
|
string TranslateAktstatus(std::string _input);
|
||||||
|
|
||||||
@@ -77,6 +71,7 @@ public:
|
|||||||
bool isAutoStart(long &_intervall);
|
bool isAutoStart(long &_intervall);
|
||||||
|
|
||||||
std::string* getActStatus();
|
std::string* getActStatus();
|
||||||
|
void setActStatus(std::string _aktstatus);
|
||||||
|
|
||||||
std::vector<HTMLInfo*> GetAllDigital();
|
std::vector<HTMLInfo*> GetAllDigital();
|
||||||
std::vector<HTMLInfo*> GetAllAnalog();
|
std::vector<HTMLInfo*> GetAllAnalog();
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ ClassFlowControll tfliteflow;
|
|||||||
|
|
||||||
TaskHandle_t xHandletask_autodoFlow = NULL;
|
TaskHandle_t xHandletask_autodoFlow = NULL;
|
||||||
|
|
||||||
bool FlowInitDone = false;
|
bool bTaskAutoFlowCreated = false;
|
||||||
bool flowisrunning = false;
|
bool flowisrunning = false;
|
||||||
|
|
||||||
long auto_intervall = 0;
|
long auto_intervall = 0;
|
||||||
@@ -104,7 +104,6 @@ void doInit(void)
|
|||||||
ESP_LOGD(TAG, "Start tfliteflow.InitFlow(config);");
|
ESP_LOGD(TAG, "Start tfliteflow.InitFlow(config);");
|
||||||
#endif
|
#endif
|
||||||
tfliteflow.InitFlow(CONFIG_FILE);
|
tfliteflow.InitFlow(CONFIG_FILE);
|
||||||
FlowInitDone = true;
|
|
||||||
#ifdef DEBUG_DETAIL_ON
|
#ifdef DEBUG_DETAIL_ON
|
||||||
ESP_LOGD(TAG, "Finished tfliteflow.InitFlow(config);");
|
ESP_LOGD(TAG, "Finished tfliteflow.InitFlow(config);");
|
||||||
#endif
|
#endif
|
||||||
@@ -265,7 +264,7 @@ esp_err_t handler_json(httpd_req_t *req)
|
|||||||
|
|
||||||
ESP_LOGD(TAG, "handler_JSON uri: %s", req->uri);
|
ESP_LOGD(TAG, "handler_JSON uri: %s", req->uri);
|
||||||
|
|
||||||
if (FlowInitDone)
|
if (bTaskAutoFlowCreated)
|
||||||
{
|
{
|
||||||
httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
|
httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
|
||||||
httpd_resp_set_type(req, "application/json");
|
httpd_resp_set_type(req, "application/json");
|
||||||
@@ -300,7 +299,7 @@ esp_err_t handler_wasserzaehler(httpd_req_t *req)
|
|||||||
LogFile.WriteHeapInfo("handler water counter - Start");
|
LogFile.WriteHeapInfo("handler water counter - Start");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (FlowInitDone)
|
if (bTaskAutoFlowCreated)
|
||||||
{
|
{
|
||||||
bool _rawValue = false;
|
bool _rawValue = false;
|
||||||
bool _noerror = false;
|
bool _noerror = false;
|
||||||
@@ -656,10 +655,11 @@ esp_err_t handler_statusflow(httpd_req_t *req)
|
|||||||
LogFile.WriteHeapInfo("handler_prevalue - Start");
|
LogFile.WriteHeapInfo("handler_prevalue - Start");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (FlowInitDone)
|
const char* resp_str;
|
||||||
{
|
httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
|
||||||
const char* resp_str;
|
|
||||||
|
|
||||||
|
if (bTaskAutoFlowCreated)
|
||||||
|
{
|
||||||
#ifdef DEBUG_DETAIL_ON
|
#ifdef DEBUG_DETAIL_ON
|
||||||
ESP_LOGD(TAG, "handler_prevalue: %s", req->uri);
|
ESP_LOGD(TAG, "handler_prevalue: %s", req->uri);
|
||||||
#endif
|
#endif
|
||||||
@@ -667,13 +667,12 @@ esp_err_t handler_statusflow(httpd_req_t *req)
|
|||||||
string* zw = tfliteflow.getActStatus();
|
string* zw = tfliteflow.getActStatus();
|
||||||
resp_str = zw->c_str();
|
resp_str = zw->c_str();
|
||||||
|
|
||||||
httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
|
|
||||||
httpd_resp_send(req, resp_str, HTTPD_RESP_USE_STRLEN);
|
httpd_resp_send(req, resp_str, HTTPD_RESP_USE_STRLEN);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
httpd_resp_send_err(req, HTTPD_403_FORBIDDEN, "Flow not (yet) started: REST API /flowstatus not available!");
|
resp_str = "Flow task not yet created";
|
||||||
return ESP_ERR_NOT_FOUND;
|
httpd_resp_send(req, resp_str, HTTPD_RESP_USE_STRLEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_DETAIL_ON
|
#ifdef DEBUG_DETAIL_ON
|
||||||
@@ -820,13 +819,18 @@ void task_autodoFlow(void *pvParameter)
|
|||||||
{
|
{
|
||||||
int64_t fr_start, fr_delta_ms;
|
int64_t fr_start, fr_delta_ms;
|
||||||
|
|
||||||
|
bTaskAutoFlowCreated = true;
|
||||||
|
|
||||||
if (!isPlannedReboot)
|
if (!isPlannedReboot)
|
||||||
{
|
{
|
||||||
if (esp_reset_reason() == ESP_RST_PANIC) {
|
if (esp_reset_reason() == ESP_RST_PANIC) {
|
||||||
LogFile.WriteToFile(ESP_LOG_WARN, TAG, "Restarted due to an Exception/panic! Postponing first round start by 5 minutes to allow for an OTA Update or to fetch the log!");
|
LogFile.WriteToFile(ESP_LOG_WARN, TAG, "Restarted due to an Exception/panic! Postponing first round start by 5 minutes to allow for an OTA Update or to fetch the log!");
|
||||||
LogFile.WriteToFile(ESP_LOG_WARN, TAG, "Setting logfile level to DEBUG until the next reboot!");
|
LogFile.WriteToFile(ESP_LOG_WARN, TAG, "Setting logfile level to DEBUG until the next reboot!");
|
||||||
LogFile.setLogLevel(ESP_LOG_DEBUG);
|
LogFile.setLogLevel(ESP_LOG_DEBUG);
|
||||||
//MQTTPublish(GetMQTTMainTopic() + "/" + "status", "Postponing first round", false);
|
tfliteflow.setActStatus("Initialization (delayed)");
|
||||||
|
//#ifdef ENABLE_MQTT
|
||||||
|
//MQTTPublish(mqttServer_getMainTopic() + "/" + "status", "Initialization (delayed)", false); // Right now, not possible -> MQTT Service is going to be started later
|
||||||
|
//#endif //ENABLE_MQTT
|
||||||
vTaskDelay(60*5000 / portTICK_RATE_MS); // Wait 5 minutes to give time to do an OTA Update or fetch the log
|
vTaskDelay(60*5000 / portTICK_RATE_MS); // Wait 5 minutes to give time to do an OTA Update or fetch the log
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -836,12 +840,14 @@ void task_autodoFlow(void *pvParameter)
|
|||||||
doInit();
|
doInit();
|
||||||
|
|
||||||
auto_isrunning = tfliteflow.isAutoStart(auto_intervall);
|
auto_isrunning = tfliteflow.isAutoStart(auto_intervall);
|
||||||
if (isSetupModusActive()) {
|
|
||||||
|
if (isSetupModusActive())
|
||||||
|
{
|
||||||
auto_isrunning = false;
|
auto_isrunning = false;
|
||||||
std::string zw_time = getCurrentTimeString(LOGFILE_TIME_FORMAT);
|
std::string zw_time = getCurrentTimeString(LOGFILE_TIME_FORMAT);
|
||||||
tfliteflow.doFlowMakeImageOnly(zw_time);
|
tfliteflow.doFlowMakeImageOnly(zw_time);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while (auto_isrunning)
|
while (auto_isrunning)
|
||||||
{
|
{
|
||||||
LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "----------------------------------------------------------------"); // Clear separation between runs
|
LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "----------------------------------------------------------------"); // Clear separation between runs
|
||||||
|
|||||||
BIN
images/Flowstate_initialization.xcf
Normal file
BIN
images/Flowstate_initialization.xcf
Normal file
Binary file not shown.
BIN
images/Flowstate_initialization_delayed.xcf
Normal file
BIN
images/Flowstate_initialization_delayed.xcf
Normal file
Binary file not shown.
BIN
images/Flowstate_take_image.xcf
Normal file
BIN
images/Flowstate_take_image.xcf
Normal file
Binary file not shown.
BIN
sd-card/html/Flowstate_initialization.jpg
Normal file
BIN
sd-card/html/Flowstate_initialization.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
BIN
sd-card/html/Flowstate_initialization_delayed.jpg
Normal file
BIN
sd-card/html/Flowstate_initialization_delayed.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
BIN
sd-card/html/Flowstate_take_image.jpg
Normal file
BIN
sd-card/html/Flowstate_take_image.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
@@ -55,8 +55,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tg-3">
|
<td class="tg-3">
|
||||||
<div id="timestamp" ></div>
|
|
||||||
<div id="statusflow" ></div>
|
<div id="statusflow" ></div>
|
||||||
|
<div id="timestamp" ></div>
|
||||||
<div id="cputemp" ></div>
|
<div id="cputemp" ></div>
|
||||||
<div id="rssi" ></div>
|
<div id="rssi" ></div>
|
||||||
<div>
|
<div>
|
||||||
@@ -126,7 +126,7 @@
|
|||||||
xhttp.onreadystatechange = function() {
|
xhttp.onreadystatechange = function() {
|
||||||
if (this.readyState == 4 && this.status == 200) {
|
if (this.readyState == 4 && this.status == 200) {
|
||||||
var _rsp = xhttp.responseText;
|
var _rsp = xhttp.responseText;
|
||||||
$('#statusflow').html("Status: " + _rsp);
|
$('#statusflow').html("State: " + _rsp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xhttp.open("GET", url, true);
|
xhttp.open("GET", url, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user