mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 20:46:52 +03:00
Update for rolling
This commit is contained in:
21
README.md
21
README.md
@@ -19,13 +19,30 @@ A 3d-printable housing can be found here: https://www.thingiverse.com/thing:4571
|
|||||||
|
|
||||||
### Known Issues
|
### 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!
|
**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
|
* Improvement: internal file handling
|
||||||
|
|
||||||
|
|||||||
@@ -207,21 +207,49 @@ esp_err_t CCamera::CaptureToBasisImage(CImageBasis *_Image, int delay)
|
|||||||
|
|
||||||
LEDOnOff(false);
|
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;
|
uint8_t * buf = NULL;
|
||||||
size_t buf_len = 0;
|
size_t buf_len = 0;
|
||||||
|
|
||||||
int _anz = 0;
|
int _anz = 0;
|
||||||
TickType_t xDelay = 3000 / portTICK_PERIOD_MS;
|
xDelay = 3000 / portTICK_PERIOD_MS;
|
||||||
|
|
||||||
while (!frame2bmp(fb, &buf, &buf_len) && _anz < 5)
|
while (!frame2bmp(fb, &buf, &buf_len) && _anz < 5)
|
||||||
{
|
{
|
||||||
esp_camera_fb_return(fb);
|
|
||||||
std::string _zw1 = "CCamera::CaptureToBasisImage failed #" + std::to_string(++_anz);
|
std::string _zw1 = "CCamera::CaptureToBasisImage failed #" + std::to_string(++_anz);
|
||||||
LogFile.WriteToFile(_zw1);
|
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 );
|
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);
|
esp_camera_fb_return(fb);
|
||||||
|
|
||||||
if (debug_detail_heap) LogFile.WriteHeapInfo("CCamera::CaptureToBasisImage - After frame2bmp");
|
if (debug_detail_heap) LogFile.WriteHeapInfo("CCamera::CaptureToBasisImage - After frame2bmp");
|
||||||
@@ -256,11 +284,6 @@ esp_err_t CCamera::CaptureToBasisImage(CImageBasis *_Image, int delay)
|
|||||||
|
|
||||||
free(buf);
|
free(buf);
|
||||||
|
|
||||||
if (delay > 0)
|
|
||||||
{
|
|
||||||
LightOnOff(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (debug_detail_heap) LogFile.WriteHeapInfo("CCamera::CaptureToBasisImage - Done");
|
if (debug_detail_heap) LogFile.WriteHeapInfo("CCamera::CaptureToBasisImage - Done");
|
||||||
|
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ bool ClassFlow::getNextLine(FILE* pfile, string *rt)
|
|||||||
}
|
}
|
||||||
*rt = zw;
|
*rt = zw;
|
||||||
*rt = trim(*rt);
|
*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);
|
fgets(zw, 1024, pfile);
|
||||||
printf("%s", zw);
|
printf("%s", zw);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
static const char *TAGMAIN = "connect_wlan_main";
|
static const char *TAGMAIN = "connect_wlan_main";
|
||||||
|
|
||||||
|
|
||||||
bool debug_detail_heap = true;
|
bool debug_detail_heap = false;
|
||||||
|
|
||||||
#define FLASH_GPIO GPIO_NUM_4
|
#define FLASH_GPIO GPIO_NUM_4
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const char* GIT_REV="c05313a";
|
const char* GIT_REV="6e521f0";
|
||||||
const char* GIT_TAG="";
|
const char* GIT_TAG="";
|
||||||
const char* GIT_BRANCH="rolling-reduce-sd-use";
|
const char* GIT_BRANCH="rolling-reduce-sd-use";
|
||||||
const char* BUILD_TIME="2020-12-27 17:35";
|
const char* BUILD_TIME="2020-12-28 15:38";
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
const char* GIT_REV="c05313a";
|
const char* GIT_REV="6e521f0";
|
||||||
const char* GIT_TAG="";
|
const char* GIT_TAG="";
|
||||||
const char* GIT_BRANCH="rolling-reduce-sd-use";
|
const char* GIT_BRANCH="rolling-reduce-sd-use";
|
||||||
const char* BUILD_TIME="2020-12-27 11:05";
|
const char* BUILD_TIME="2020-12-28 15:38";
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -570,16 +570,16 @@ textarea {
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="expert" id="ex16">
|
<tr class="expert" id="ex16">
|
||||||
<td width="20px" style="padding-left: 40px;">
|
<td width="20px" style="padding-left: 40px;">
|
||||||
<input type="checkbox" id="System_TimeUpdateIntervall_enabled" value="1" onclick = 'document.getElementById("System_TimeUpdateIntervall_value1").disabled = !document.getElementById("System_TimeUpdateIntervall_value1").disabled' unchecked >
|
<td"><input type="checkbox" id="System_TimeServer_enabled" value="1" onclick = 'document.getElementById("System_TimeServer_value1").disabled = !document.getElementById("System_TimeServer_value1").disabled' unchecked ></td>
|
||||||
</td>
|
|
||||||
<td width="200px">
|
|
||||||
<class id="System_TimeUpdateIntervall_text" style="color:black;">TimeUpdateIntervall</class>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="number" id="System_TimeUpdateIntervall_value1" size="13" min="0" step="1">
|
<class id="System_TimeServer_text" style="color:black;">TimeServer</class>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" id="System_TimeServer_value1">
|
||||||
</td>
|
</td>
|
||||||
<td style="font-size: 80%;">
|
<td style="font-size: 80%;">
|
||||||
Intervall for synchronizing the time with the time server (in hours)
|
Time server to synchronize system time (default: "pool.ntp.org" - used if nothing is specified)
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -717,7 +717,7 @@ function UpdateInput() {
|
|||||||
WriteParameter(param, "Debug", "LogfileRetentionInDays", true);
|
WriteParameter(param, "Debug", "LogfileRetentionInDays", true);
|
||||||
|
|
||||||
WriteParameter(param, "System", "TimeZone", true);
|
WriteParameter(param, "System", "TimeZone", true);
|
||||||
WriteParameter(param, "System", "TimeUpdateIntervall", true);
|
WriteParameter(param, "System", "TimeServer", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function WriteConfig(){
|
function WriteConfig(){
|
||||||
@@ -762,7 +762,7 @@ function WriteConfig(){
|
|||||||
ReadParameter(param, "Debug", "LogfileRetentionInDays", true);
|
ReadParameter(param, "Debug", "LogfileRetentionInDays", true);
|
||||||
|
|
||||||
ReadParameter(param, "System", "TimeZone", true);
|
ReadParameter(param, "System", "TimeZone", true);
|
||||||
ReadParameter(param, "System", "TimeUpdateIntervall", true);
|
ReadParameter(param, "System", "TimeServer", true);
|
||||||
|
|
||||||
FormatDecimalValue(param, "PostProcessing", "MaxRateValue");
|
FormatDecimalValue(param, "PostProcessing", "MaxRateValue");
|
||||||
|
|
||||||
|
|||||||
@@ -72,8 +72,8 @@ function ParseConfig() {
|
|||||||
var catname = "System";
|
var catname = "System";
|
||||||
param[catname] = new Object();
|
param[catname] = new Object();
|
||||||
ParamAddValue(param, catname, "TimeZone");
|
ParamAddValue(param, catname, "TimeZone");
|
||||||
|
ParamAddValue(param, catname, "TimeServer");
|
||||||
ParamAddValue(param, catname, "AutoAdjustSummertime");
|
ParamAddValue(param, catname, "AutoAdjustSummertime");
|
||||||
ParamAddValue(param, catname, "TimeUpdateIntervall");
|
|
||||||
ParamAddValue(param, catname, "SetupMode");
|
ParamAddValue(param, catname, "SetupMode");
|
||||||
|
|
||||||
while (aktline < config_split.length){
|
while (aktline < config_split.length){
|
||||||
@@ -149,6 +149,7 @@ function ParseConfigParamSystem(_aktline){
|
|||||||
var linesplit = ZerlegeZeile(input, " =");
|
var linesplit = ZerlegeZeile(input, " =");
|
||||||
|
|
||||||
ParamExtractValue(param, linesplit, catname, "TimeZone", _aktline, isCom);
|
ParamExtractValue(param, linesplit, catname, "TimeZone", _aktline, isCom);
|
||||||
|
ParamExtractValue(param, linesplit, catname, "TimeServer", _aktline, isCom);
|
||||||
ParamExtractValue(param, linesplit, catname, "AutoAdjustSummertime", _aktline, isCom);
|
ParamExtractValue(param, linesplit, catname, "AutoAdjustSummertime", _aktline, isCom);
|
||||||
ParamExtractValue(param, linesplit, catname, "TimeUpdateIntervall", _aktline, isCom);
|
ParamExtractValue(param, linesplit, catname, "TimeUpdateIntervall", _aktline, isCom);
|
||||||
ParamExtractValue(param, linesplit, catname, "SetupMode", _aktline, isCom);
|
ParamExtractValue(param, linesplit, catname, "SetupMode", _aktline, isCom);
|
||||||
|
|||||||
Reference in New Issue
Block a user