mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-09 21:17:06 +03:00
@@ -25,9 +25,13 @@ A 3d-printable housing can be found here: https://www.thingiverse.com/thing:4571
|
|||||||
|
|
||||||
**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!
|
||||||
|
|
||||||
|
##### 4.1.1 Configuration editor - (2020-12-02)
|
||||||
|
|
||||||
|
* Bug fixing: internal improvement of file handling (reduce not responding)
|
||||||
|
|
||||||
##### 4.1.0 Configuration editor- (2020-11-30)
|
|
||||||
|
|
||||||
|
##### 4.1.0 Configuration editor - (2020-11-30)
|
||||||
|
|
||||||
* Implementation of configuration editor (including basic and expert mode)
|
* Implementation of configuration editor (including basic and expert mode)
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,6 @@ bool ClassFlowMQTT::doFlow(string zwtime)
|
|||||||
}
|
}
|
||||||
|
|
||||||
OldValue = result;
|
OldValue = result;
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "ClassFlowAnalog.h"
|
#include "ClassFlowAnalog.h"
|
||||||
#include "ClassFlowDigit.h"
|
#include "ClassFlowDigit.h"
|
||||||
#include "ClassFlowMakeImage.h"
|
#include "ClassFlowMakeImage.h"
|
||||||
|
#include "ClassLogFile.h"
|
||||||
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@@ -42,6 +43,7 @@ bool ClassFlowPostProcessing::LoadPreValue(void)
|
|||||||
zwtime = trim(std::string(zw));
|
zwtime = trim(std::string(zw));
|
||||||
|
|
||||||
fgets(zw, 1024, pFile);
|
fgets(zw, 1024, pFile);
|
||||||
|
fclose(pFile);
|
||||||
printf("%s", zw);
|
printf("%s", zw);
|
||||||
zwvalue = trim(std::string(zw));
|
zwvalue = trim(std::string(zw));
|
||||||
PreValue = stof(zwvalue.c_str());
|
PreValue = stof(zwvalue.c_str());
|
||||||
@@ -103,17 +105,15 @@ void ClassFlowPostProcessing::SavePreValue(float value, string zwtime)
|
|||||||
timeinfo = localtime(&rawtime);
|
timeinfo = localtime(&rawtime);
|
||||||
|
|
||||||
strftime(buffer, 80, "%Y-%m-%d_%H-%M-%S", timeinfo);
|
strftime(buffer, 80, "%Y-%m-%d_%H-%M-%S", timeinfo);
|
||||||
|
|
||||||
zwtime = std::string(buffer);
|
zwtime = std::string(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
fputs(zwtime.c_str(), pFile);
|
fputs(zwtime.c_str(), pFile);
|
||||||
fputs("\n", pFile);
|
fputs("\n", pFile);
|
||||||
|
fputs(to_string(value).c_str(), pFile);
|
||||||
|
fputs("\n", pFile);
|
||||||
|
|
||||||
fputs(to_string(value).c_str(), pFile);
|
fclose(pFile);
|
||||||
fputs("\n", pFile);
|
|
||||||
|
|
||||||
fclose(pFile);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -269,6 +269,7 @@ bool ClassFlowPostProcessing::doFlow(string zwtime)
|
|||||||
|
|
||||||
ErrorMessageText = "";
|
ErrorMessageText = "";
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < ListFlowControll->size(); ++i)
|
for (int i = 0; i < ListFlowControll->size(); ++i)
|
||||||
{
|
{
|
||||||
if (((*ListFlowControll)[i])->name().compare("ClassFlowMakeImage") == 0)
|
if (((*ListFlowControll)[i])->name().compare("ClassFlowMakeImage") == 0)
|
||||||
@@ -312,6 +313,7 @@ bool ClassFlowPostProcessing::doFlow(string zwtime)
|
|||||||
|
|
||||||
ReturnRawValue = ShiftDecimal(ReturnRawValue, DecimalShift);
|
ReturnRawValue = ShiftDecimal(ReturnRawValue, DecimalShift);
|
||||||
|
|
||||||
|
|
||||||
if (!PreValueUse || !PreValueOkay)
|
if (!PreValueUse || !PreValueOkay)
|
||||||
{
|
{
|
||||||
ReturnValue = ReturnRawValue;
|
ReturnValue = ReturnRawValue;
|
||||||
@@ -336,7 +338,6 @@ bool ClassFlowPostProcessing::doFlow(string zwtime)
|
|||||||
|
|
||||||
zw = ErsetzteN(ReturnRawValue);
|
zw = ErsetzteN(ReturnRawValue);
|
||||||
|
|
||||||
|
|
||||||
Value = std::stof(zw);
|
Value = std::stof(zw);
|
||||||
if (checkDigitIncreaseConsistency)
|
if (checkDigitIncreaseConsistency)
|
||||||
{
|
{
|
||||||
@@ -367,10 +368,10 @@ bool ClassFlowPostProcessing::doFlow(string zwtime)
|
|||||||
if (ErrorMessageText.length() == 0)
|
if (ErrorMessageText.length() == 0)
|
||||||
{
|
{
|
||||||
PreValue = Value;
|
PreValue = Value;
|
||||||
|
|
||||||
SavePreValue(Value, zwtime);
|
SavePreValue(Value, zwtime);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,18 +48,7 @@ std::string gettimestring(const char * frm)
|
|||||||
time_t now;
|
time_t now;
|
||||||
struct tm timeinfo;
|
struct tm timeinfo;
|
||||||
time(&now);
|
time(&now);
|
||||||
localtime_r(&now, &timeinfo);
|
|
||||||
// Is time set? If not, tm_year will be (1970 - 1900).
|
|
||||||
if (timeinfo.tm_year < (2016 - 1900)) {
|
|
||||||
ESP_LOGI(TAG, "Reboot - Connecting to WiFi and getting time over NTP.");
|
|
||||||
obtain_time();
|
|
||||||
// update 'now' variable with current time
|
|
||||||
time(&now);
|
|
||||||
}
|
|
||||||
char strftime_buf[64];
|
char strftime_buf[64];
|
||||||
|
|
||||||
// setenv("TZ", "UTC-2", 1);
|
|
||||||
// tzset();
|
|
||||||
localtime_r(&now, &timeinfo);
|
localtime_r(&now, &timeinfo);
|
||||||
strftime(strftime_buf, sizeof(strftime_buf), frm, &timeinfo);
|
strftime(strftime_buf, sizeof(strftime_buf), frm, &timeinfo);
|
||||||
|
|
||||||
@@ -119,6 +108,8 @@ static void obtain_time(void)
|
|||||||
struct tm timeinfo = {};
|
struct tm timeinfo = {};
|
||||||
int retry = 0;
|
int retry = 0;
|
||||||
const int retry_count = 10;
|
const int retry_count = 10;
|
||||||
|
time(&now);
|
||||||
|
localtime_r(&now, &timeinfo);
|
||||||
while (sntp_get_sync_status() == SNTP_SYNC_STATUS_RESET && ++retry < retry_count) {
|
while (sntp_get_sync_status() == SNTP_SYNC_STATUS_RESET && ++retry < retry_count) {
|
||||||
ESP_LOGI(TAG, "Waiting for system time to be set... (%d/%d)", retry, retry_count);
|
ESP_LOGI(TAG, "Waiting for system time to be set... (%d/%d)", retry, retry_count);
|
||||||
vTaskDelay(2000 / portTICK_PERIOD_MS);
|
vTaskDelay(2000 / portTICK_PERIOD_MS);
|
||||||
|
|||||||
@@ -537,7 +537,7 @@ CONFIG_FATFS_MAX_LFN=255
|
|||||||
CONFIG_FATFS_API_ENCODING_ANSI_OEM=y
|
CONFIG_FATFS_API_ENCODING_ANSI_OEM=y
|
||||||
# CONFIG_FATFS_API_ENCODING_UTF_16 is not set
|
# CONFIG_FATFS_API_ENCODING_UTF_16 is not set
|
||||||
# CONFIG_FATFS_API_ENCODING_UTF_8 is not set
|
# CONFIG_FATFS_API_ENCODING_UTF_8 is not set
|
||||||
CONFIG_FATFS_FS_LOCK=0
|
CONFIG_FATFS_FS_LOCK=5
|
||||||
CONFIG_FATFS_TIMEOUT_MS=10000
|
CONFIG_FATFS_TIMEOUT_MS=10000
|
||||||
CONFIG_FATFS_PER_FILE_CACHE=y
|
CONFIG_FATFS_PER_FILE_CACHE=y
|
||||||
CONFIG_FATFS_ALLOC_PREFER_EXTRAM=y
|
CONFIG_FATFS_ALLOC_PREFER_EXTRAM=y
|
||||||
|
|||||||
1171
code/sdkconfig.old
Normal file
1171
code/sdkconfig.old
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
|||||||
const char* GIT_REV="2753552";
|
const char* GIT_REV="f6f3e23";
|
||||||
const char* GIT_TAG="";
|
const char* GIT_TAG="";
|
||||||
const char* GIT_BRANCH="master";
|
const char* GIT_BRANCH="rolling";
|
||||||
const char* BUILD_TIME="2020-11-30 22:02";
|
const char* BUILD_TIME="2020-12-02 21:50";
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
const char* GIT_REV="2753552";
|
const char* GIT_REV="f6f3e23";
|
||||||
const char* GIT_TAG="";
|
const char* GIT_TAG="";
|
||||||
const char* GIT_BRANCH="master";
|
const char* GIT_BRANCH="rolling";
|
||||||
const char* BUILD_TIME="2020-11-30 22:02";
|
const char* BUILD_TIME="2020-12-02 21:50";
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user