Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v15.2.2 #2379

Merged
merged 56 commits into from
May 1, 2023
Merged

v15.2.2 #2379

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
512d7f9
Testcase for #2145 and debug-log (#2151)
haverland Mar 11, 2023
5e5d2e2
Fix timezone config parser (#2169)
caco3 Mar 12, 2023
ff81fcb
Enhance ROI pages (#2161)
caco3 Mar 12, 2023
4dd41c4
restart timeout on progress, catch error (#2170)
caco3 Mar 12, 2023
dfc4577
BugFix #2167
jomjol Mar 12, 2023
d1807a1
Merge branch 'rolling' of https://github.com/jomjol/AI-on-the-edge-de…
jomjol Mar 12, 2023
eefc41d
Release 15.1 preparations (#2171)
caco3 Mar 12, 2023
863856c
Merge branch 'master' into rolling
caco3 Mar 12, 2023
e81a7ee
fix typo
Mar 13, 2023
933215c
Replace relative documentation links with absolute ones pointing to t…
caco3 Mar 13, 2023
ab0fc72
Sort model files in configuration combobox (#2189)
haverland Mar 14, 2023
a8d7b29
reboot task - increase stack size (#2201)
Slider0007 Mar 17, 2023
d944e86
Update interface_influxdb.cpp
jomjol Mar 19, 2023
6ff8344
Merge branch 'correct-influxdbv1-bug' into rolling
jomjol Mar 19, 2023
d93c5da
Update Changelog.md
jomjol Mar 19, 2023
58185a0
Show PSRAM usage (#2206)
caco3 Mar 19, 2023
5db20d3
Disable custom MQTT Outbox. This also moves the MQTT Publishing memor…
Mar 19, 2023
e4a6fd3
log MQTT connection refused reasons (#2216)
Slider0007 Mar 22, 2023
267782d
Revert PSRAM usage as it lead to memory fragmentation.
Mar 22, 2023
c4b990a
fix missing value data
Mar 23, 2023
e2b66aa
Revert PSRAM usage as it lead to memory fragmentation. (#2224)
caco3 Mar 23, 2023
fa09680
Fix missing value data in graph (#2230)
caco3 Mar 23, 2023
9ffaf6e
Update Changelog.md (#2231)
caco3 Mar 23, 2023
db36fe2
Merge branch 'master' into rolling
caco3 Mar 23, 2023
727b871
Update interface_influxdb.cpp (#2233)
caco3 Mar 24, 2023
33bfef0
Merge branch 'rolling' of https://github.com/jomjol/AI-on-the-edge-de…
Mar 25, 2023
de1dcc4
update copyright year
Mar 25, 2023
f79e03f
Cleanup
jomjol Mar 26, 2023
b6bfeea
Set prevalue using MQTT + set prevalue to RAW value (REST+MQTT) (#2252)
Slider0007 Mar 28, 2023
df12dea
removed the stb_image files and re-add them as a submodule. (#2223)
caco3 Mar 30, 2023
0e3a50d
Remove obsolete ClassFlowWriteList (#2264)
Slider0007 Mar 30, 2023
e995d6c
Renaming & cleanup of some modules / functions in source code (#2265)
Slider0007 Mar 30, 2023
e2cf833
Fix last element missing in digit model drop down (#2282)
Slider0007 Apr 1, 2023
63ac38a
Debug influxdb (#2283)
jomjol Apr 2, 2023
e7bfba4
Implement a camera livestream handler (#2286)
Slider0007 Apr 4, 2023
7488d7b
fix leading NaN (#2310)
caco3 Apr 14, 2023
9ca02e0
analogROI: Activate save button after ROI creation (#2326)
Slider0007 Apr 17, 2023
17ffd28
Migration of PlatformIO 5.2.0 to 6.1.0 (resp. ESP IDF from 4.4.2 to 5…
caco3 Apr 19, 2023
19158c9
Keep MainFlowTask alive to handle reboot (#2325)
Slider0007 Apr 19, 2023
de92c29
Shared PSRAM memory (#2285)
caco3 Apr 19, 2023
262d83e
fix PSRAM init return value check
Apr 19, 2023
2a7f3b3
Extend InfluxDBv1 with individual topic names (#2319)
jomjol Apr 20, 2023
eebdd7c
Update Changelog.md (#2344)
caco3 Apr 23, 2023
e40ceb5
merge conflicts
caco3 Apr 23, 2023
929796c
merge conflicts
caco3 Apr 23, 2023
a20fec1
merge conflicts
caco3 Apr 23, 2023
a636ce3
update changelog
caco3 Apr 23, 2023
6defcf8
Update Changelog.md
caco3 Apr 23, 2023
9b1a83c
Fix alignment mark PSRAM issue (#2357)
caco3 Apr 27, 2023
fc719da
Update Changelog.md (#2360)
caco3 Apr 27, 2023
43aae5a
Update platformio.ini (#2368)
caco3 May 1, 2023
9fc8768
Allow the Alignment Mark step while status is "Initializing" or "Init…
caco3 May 1, 2023
6a45ab7
Improve logging if Autostart is not enabled. Renamed/splitted functio…
caco3 May 1, 2023
9a07f27
Cleanup web UI (#2378)
caco3 May 1, 2023
db7ffb3
Merge branch 'master' into rolling
caco3 May 1, 2023
5a00bdd
Update Changelog.md
caco3 May 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
## [15.2.2] - 2023-05-01

### Changes

For a full list of changes see [Full list of changes](https://github.com/jomjol/AI-on-the-edge-device/compare/v15.2.1...v15.2.2)

#### Changed
- Updated PlatformIO to `6.2.0`
- [#2376](https://github.com/jomjol/AI-on-the-edge-device/pull/2376) Improve logging if Autostart is not enabled

#### Fixed
- [#2373](https://github.com/jomjol/AI-on-the-edge-device/pull/2373) Allow the Alignment Mark step while status is "Initializing" or "Initialization (delayed)" or while in setup mode


## [15.2.1] - 2023-04-27

### Changes

For a full list of changes see [Full list of changes](https://github.com/jomjol/AI-on-the-edge-device/compare/v15.2.0...v15.2.1)

#### Fixed
- [#2357](https://github.com/jomjol/AI-on-the-edge-device/pull/2357) Fix Alignment Mark issue

Expand Down Expand Up @@ -966,6 +984,7 @@ External Illumination
- Initial Version


[15.2.2]: https://github.com/jomjol/AI-on-the-edge-device/compare/v15.2.1...v15.2.2
[15.2.1]: https://github.com/jomjol/AI-on-the-edge-device/compare/v15.2.0...v15.2.1
[15.2.0]: https://github.com/jomjol/AI-on-the-edge-device/compare/v15.1.1...v15.2.0
[15.1.1]: https://github.com/jomjol/AI-on-the-edge-device/compare/v15.1.0...v15.1.1
Expand Down
9 changes: 7 additions & 2 deletions code/components/jomjol_flowcontroll/ClassFlowControll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,18 @@ void ClassFlowControll::SetInitialParameter(void)
}


bool ClassFlowControll::isAutoStart(long &_interval)
bool ClassFlowControll::getIsAutoStart(void)
{
_interval = AutoInterval * 60 * 1000; // AutoInterval: minutes -> ms
return AutoStart;
}


void ClassFlowControll::setAutoStartInterval(long &_interval)
{
_interval = AutoInterval * 60 * 1000; // AutoInterval: minutes -> ms
}


ClassFlow* ClassFlowControll::CreateClassFlow(std::string _type)
{
ClassFlow* cfc = NULL;
Expand Down
3 changes: 2 additions & 1 deletion code/components/jomjol_flowcontroll/ClassFlowControll.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ class ClassFlowControll :

std::string doSingleStep(std::string _stepname, std::string _host);

bool isAutoStart(long &_interval);
bool getIsAutoStart();
void setAutoStartInterval(long &_interval);

std::string* getActStatusWithTime();
std::string* getActStatus();
Expand Down
35 changes: 26 additions & 9 deletions code/components/jomjol_flowcontroll/MainFlowControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ bool bTaskAutoFlowCreated = false;
bool flowisrunning = false;

long auto_interval = 0;
bool auto_isrunning = false;
bool autostartIsEnabled = false;

int countRounds = 0;
bool isPlannedReboot = false;
Expand Down Expand Up @@ -257,7 +257,7 @@ esp_err_t handler_flow_start(httpd_req_t *req) {

httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");

if (auto_isrunning) {
if (autostartIsEnabled) {
xTaskAbortDelay(xHandletask_autodoFlow); // Delay will be aborted if task is in blocked (waiting) state. If task is already running, no action
LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "Flow start triggered by REST API /flow_start");
const char* resp_str = "The flow is going to be started immediately or is already running";
Expand Down Expand Up @@ -286,7 +286,7 @@ esp_err_t MQTTCtrlFlowStart(std::string _topic) {

ESP_LOGD(TAG, "MQTTCtrlFlowStart: topic %s", _topic.c_str());

if (auto_isrunning)
if (autostartIsEnabled)
{
xTaskAbortDelay(xHandletask_autodoFlow); // Delay will be aborted if task is in blocked (waiting) state. If task is already running, no action
LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "Flow start triggered by MQTT topic " + _topic);
Expand Down Expand Up @@ -657,7 +657,14 @@ esp_err_t handler_editflow(httpd_req_t *req)

string out2 = out.substr(0, out.length() - 4) + "_org.jpg";

if ((*flowctrl.getActStatus() == "Flow finished") && psram_init_shared_memory_for_take_image_step()) {
std::string state = *flowctrl.getActStatus();

/* To be able to provide the image, several conditions must be met due to the shared PSRAM usage:
- Ether the round most be completed or not started yet
- Or we must be in Setup Mode
- Additionally, the initialization of the shared PSRAM must be successful */
if (((state == "Flow finished") || (state == "Initialization") || (state == "Initialization (delayed)") || isSetupModusActive()) &&
psram_init_shared_memory_for_take_image_step()) {
LogFile.WriteToFile(ESP_LOG_INFO, TAG, "Taking image for Alignment Mark Update...");

CAlignAndCutImage *caic = new CAlignAndCutImage("cutref", in);
Expand All @@ -679,7 +686,8 @@ esp_err_t handler_editflow(httpd_req_t *req)
zw = "CutImage Done";
}
else {
LogFile.WriteToFile(ESP_LOG_WARN, TAG, "Taking image for Alignment Mark not possible while device is busy with a round!");
LogFile.WriteToFile(ESP_LOG_WARN, TAG, std::string("Taking image for Alignment Mark not possible while device") +
" is busy with a round (Current State: '" + state + "')!");
zw = "Device Busy";
}

Expand Down Expand Up @@ -955,16 +963,25 @@ void task_autodoFlow(void *pvParameter)
ESP_LOGD(TAG, "task_autodoFlow: start");
doInit();

auto_isrunning = flowctrl.isAutoStart(auto_interval);
flowctrl.setAutoStartInterval(auto_interval);
autostartIsEnabled = flowctrl.getIsAutoStart();

if (isSetupModusActive())
{
auto_isrunning = false;
LogFile.WriteToFile(ESP_LOG_INFO, TAG, "We are in Setup Mode -> Not starting Auto Flow!");
autostartIsEnabled = false;
std::string zw_time = getCurrentTimeString(LOGFILE_TIME_FORMAT);
flowctrl.doFlowTakeImageOnly(zw_time);
}

if (autostartIsEnabled) {
LogFile.WriteToFile(ESP_LOG_INFO, TAG, "Starting Flow...");
}
else {
LogFile.WriteToFile(ESP_LOG_INFO, TAG, "Autostart is not enabled -> Not starting Flow");
}

while (auto_isrunning)
while (autostartIsEnabled)
{
LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "----------------------------------------------------------------"); // Clear separation between runs
std::string _zw = "Round #" + std::to_string(++countRounds) + " started";
Expand Down Expand Up @@ -1038,7 +1055,7 @@ void task_autodoFlow(void *pvParameter)
}


void StartMainFlowTask()
void InitializeFlowTask()
{
BaseType_t xReturned;

Expand Down
2 changes: 1 addition & 1 deletion code/components/jomjol_flowcontroll/MainFlowControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void register_server_main_flow_task_uri(httpd_handle_t server);
void CheckIsPlannedReboot();
bool getIsPlannedReboot();

void StartMainFlowTask();
void InitializeFlowTask();
void DeleteMainFlowTask();
bool isSetupModusActive();

Expand Down
8 changes: 4 additions & 4 deletions code/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,13 +512,13 @@ extern "C" void app_main(void)
// Check main init + start TFlite task
// ********************************************
if (getSystemStatus() == 0) { // No error flag is set
LogFile.WriteToFile(ESP_LOG_INFO, TAG, "Initialization completed successfully! Starting flow task ...");
StartMainFlowTask();
LogFile.WriteToFile(ESP_LOG_INFO, TAG, "Initialization completed successfully");
InitializeFlowTask();
}
else if (isSetSystemStatusFlag(SYSTEM_STATUS_CAM_FB_BAD) || // Non critical errors occured, we try to continue...
isSetSystemStatusFlag(SYSTEM_STATUS_NTP_BAD)) {
LogFile.WriteToFile(ESP_LOG_WARN, TAG, "Initialization completed with errors! Starting flow task ...");
StartMainFlowTask();
LogFile.WriteToFile(ESP_LOG_WARN, TAG, "Initialization completed with non-critical errors!");
InitializeFlowTask();
}
else { // Any other error is critical and makes running the flow impossible. Init is going to abort.
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Initialization failed. Flow task start aborted. Loading reduced web interface...");
Expand Down
2 changes: 1 addition & 1 deletion code/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

[common:esp32-idf]
extends = common:idf
platform = platformio/espressif32 @ 6.1.0
platform = platformio/espressif32 @ 6.2.0
framework = espidf
lib_deps =
${common:idf.lib_deps}
Expand Down
2 changes: 1 addition & 1 deletion sd-card/html/backup.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ <h2>Restore Configuration</h2>

// console.log(url + " started (" + index + "/" + urls.length + ")");
if (retry == 0) {
setStatus("&nbsp;- " + getFilenameFromUrl(urls[index]) + " (" + index + "/" + urls.length + ")...");
setStatus("&nbsp;- " + getFilenameFromUrl(urls[index]) + " (" + (index+1) + "/" + urls.length + ")...");
}
else {
setStatus("<span style=\"color: gray\">&nbsp;&nbsp;&nbsp;Retrying (" + retry + ")...</span>");
Expand Down
6 changes: 0 additions & 6 deletions sd-card/html/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
var domainname_for_testing = "192.168.178.23";



function gethost_Version(){
return "1.0.0 - 20200910";
}


/* Returns the domainname with prepended protocol.
Eg. http://watermeter.fritz.box or http://192.168.1.5 */
function getDomainname(){
Expand Down
41 changes: 0 additions & 41 deletions sd-card/html/gethost.js

This file was deleted.

4 changes: 2 additions & 2 deletions sd-card/html/readconfigcommon.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ function MakeContrastImageZW(zw, _enhance, _domainname){
return true;
}
else {
firework.launch("Device is busy, please try again when the round got completed!", 'warning', 10000);
firework.launch("Device is busy, please try again when the Digitalization Round got completed!", 'warning', 10000);
return false;
}
}
Expand Down Expand Up @@ -293,7 +293,7 @@ function MakeRefZW(zw, _domainname){
return true;
}
else {
firework.launch("Device is busy, please try again when the round got completed!", 'warning', 10000);
firework.launch("Device is busy, please try again when the Digitalization Round got completed!", 'warning', 10000);
return false;
}
}
Expand Down
1 change: 1 addition & 0 deletions sd-card/html/wlan_config.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
<script type="text/javascript" src="/common.js?v=$COMMIT_HASH">
</head>
<body>
<table>
Expand Down