diff --git a/README.md b/README.md index 049be878..24b55ffd 100644 --- a/README.md +++ b/README.md @@ -19,13 +19,30 @@ A 3d-printable housing can be found here: https://www.thingiverse.com/thing:4571 ### Known Issues -* Reboot on extensive web access due to the limits of the internal web server +* Spontaneous reboots, most probably due to weak power supply during power intensive operations (taking / calculating pictures) ------ **General remark:** Beside the `firmware.bin`, typically also the content of `/html` needs to be updated! -##### Rolling - (2020-12-07) +##### Rolling - (2020-12-27) + +* Major change: no need of SD card for image processing anymore (all in memory) + * 95% less SD card writing + * SD use: mainly reading of data (config, html, tflite parameters), only log files and prevalue write on SD card anymore + * Need to limit camera resolution to VGA (due to memory limits) +* New Feature: setting of time server in `config.ini` + + ``` + [System] + TimeServer = fritz.box + ``` + +* Bug fix: corrected handling of out commented analog pointer ROIs + + +2020-12-07 + * Improvement: internal file handling diff --git a/code/components/jomjol_controlcamera/ClassControllCamera.cpp b/code/components/jomjol_controlcamera/ClassControllCamera.cpp index 6acc5aef..11af89d5 100644 --- a/code/components/jomjol_controlcamera/ClassControllCamera.cpp +++ b/code/components/jomjol_controlcamera/ClassControllCamera.cpp @@ -206,21 +206,49 @@ esp_err_t CCamera::CaptureToBasisImage(CImageBasis *_Image, int delay) // if (debug_detail_heap) LogFile.WriteHeapInfo("CCamera::CaptureToBasisImage - After fb_get"); LEDOnOff(false); + + + if (delay > 0) + { + LightOnOff(false); + } + + + TickType_t xDelay = 1000 / portTICK_PERIOD_MS; + vTaskDelay( xDelay ); // wait for power to recover uint8_t * buf = NULL; size_t buf_len = 0; int _anz = 0; - TickType_t xDelay = 3000 / portTICK_PERIOD_MS; + xDelay = 3000 / portTICK_PERIOD_MS; while (!frame2bmp(fb, &buf, &buf_len) && _anz < 5) { - esp_camera_fb_return(fb); std::string _zw1 = "CCamera::CaptureToBasisImage failed #" + std::to_string(++_anz); LogFile.WriteToFile(_zw1); + + esp_camera_fb_return(fb); + _zw1 = "CCamera::CaptureToBasisImage failed #" + std::to_string(_anz) + " - after esp_camera_fb_return"; + LogFile.WriteToFile(_zw1); + free(buf); + + _zw1 = "CCamera::CaptureToBasisImage failed #" + std::to_string(_anz) + " - after free"; + LogFile.WriteToFile(_zw1); + + InitCam(); + + _zw1 = "CCamera::CaptureToBasisImage failed #" + std::to_string(_anz) + " - after InitCam"; + LogFile.WriteToFile(_zw1); + vTaskDelay( xDelay ); - fb = esp_camera_fb_get(); + fb = esp_camera_fb_get(); + + _zw1 = "CCamera::CaptureToBasisImage failed #" + std::to_string(_anz) + " - after esp_camera_fb_get"; + LogFile.WriteToFile(_zw1); + } + esp_camera_fb_return(fb); @@ -256,11 +284,6 @@ esp_err_t CCamera::CaptureToBasisImage(CImageBasis *_Image, int delay) free(buf); - if (delay > 0) - { - LightOnOff(false); - } - if (debug_detail_heap) LogFile.WriteHeapInfo("CCamera::CaptureToBasisImage - Done"); return ESP_OK; diff --git a/code/components/jomjol_flowcontroll/ClassFlow.cpp b/code/components/jomjol_flowcontroll/ClassFlow.cpp index f760cc06..60ca0620 100644 --- a/code/components/jomjol_flowcontroll/ClassFlow.cpp +++ b/code/components/jomjol_flowcontroll/ClassFlow.cpp @@ -108,7 +108,7 @@ bool ClassFlow::getNextLine(FILE* pfile, string *rt) } *rt = zw; *rt = trim(*rt); - while (zw[0] == '#' || (rt->size() == 0)) // Kommentarzeilen und Leerzeilen überspringen + while (zw[0] == ';' || zw[0] == '#' || (rt->size() == 0)) // Kommentarzeilen (; oder #) und Leerzeilen überspringen { fgets(zw, 1024, pfile); printf("%s", zw); diff --git a/code/main/main.cpp b/code/main/main.cpp index 6f20870a..d3af8b91 100644 --- a/code/main/main.cpp +++ b/code/main/main.cpp @@ -29,7 +29,7 @@ static const char *TAGMAIN = "connect_wlan_main"; -bool debug_detail_heap = true; +bool debug_detail_heap = false; #define FLASH_GPIO GPIO_NUM_4 diff --git a/code/main/version.cpp b/code/main/version.cpp index 550e15db..9b392b66 100644 --- a/code/main/version.cpp +++ b/code/main/version.cpp @@ -1,4 +1,4 @@ -const char* GIT_REV="c05313a"; +const char* GIT_REV="6e521f0"; const char* GIT_TAG=""; const char* GIT_BRANCH="rolling-reduce-sd-use"; -const char* BUILD_TIME="2020-12-27 17:35"; \ No newline at end of file +const char* BUILD_TIME="2020-12-28 15:38"; \ No newline at end of file diff --git a/code/version.cpp b/code/version.cpp index adf61efb..9b392b66 100644 --- a/code/version.cpp +++ b/code/version.cpp @@ -1,4 +1,4 @@ -const char* GIT_REV="c05313a"; +const char* GIT_REV="6e521f0"; const char* GIT_TAG=""; const char* GIT_BRANCH="rolling-reduce-sd-use"; -const char* BUILD_TIME="2020-12-27 11:05"; \ No newline at end of file +const char* BUILD_TIME="2020-12-28 15:38"; \ No newline at end of file diff --git a/firmware/bootloader.bin b/firmware/bootloader.bin index eeddb528..c8b1fb30 100644 Binary files a/firmware/bootloader.bin and b/firmware/bootloader.bin differ diff --git a/firmware/firmware.bin b/firmware/firmware.bin index 438df29e..cef9643b 100644 Binary files a/firmware/firmware.bin and b/firmware/firmware.bin differ diff --git a/firmware/html.zip b/firmware/html.zip index 7cd35d71..6ced1d3a 100644 Binary files a/firmware/html.zip and b/firmware/html.zip differ diff --git a/sd-card/html/edit_config_param.html b/sd-card/html/edit_config_param.html index 74cb8a54..8383c18f 100644 --- a/sd-card/html/edit_config_param.html +++ b/sd-card/html/edit_config_param.html @@ -570,16 +570,16 @@ textarea {