mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-07 03:56:57 +03:00
Compare commits
65 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f518954aa | ||
|
|
26144815d2 | ||
|
|
21d07be7df | ||
|
|
04f69f0853 | ||
|
|
0678c81959 | ||
|
|
70a88088f2 | ||
|
|
f8e8c756ab | ||
|
|
6e26fa6e3c | ||
|
|
b54d6e785d | ||
|
|
5d2e22cd86 | ||
|
|
ccd1d3f460 | ||
|
|
964486a819 | ||
|
|
9080f1d2f0 | ||
|
|
aab8dfcde5 | ||
|
|
1633b74ab2 | ||
|
|
bafd67be36 | ||
|
|
8f1d7d081d | ||
|
|
66bfcd1d45 | ||
|
|
d89438a15f | ||
|
|
d77fa5245d | ||
|
|
67115dd8d8 | ||
|
|
cefe125304 | ||
|
|
5a98b3d0bb | ||
|
|
480da7c38b | ||
|
|
d428abc12f | ||
|
|
a08144cc9f | ||
|
|
0868c22ac6 | ||
|
|
8ff17650dd | ||
|
|
5e037d7ab9 | ||
|
|
8d2ddc2f22 | ||
|
|
7963474bf0 | ||
|
|
a8aa6d6329 | ||
|
|
5b52b806ae | ||
|
|
b059713df5 | ||
|
|
48ec76ab38 | ||
|
|
fe446d60d7 | ||
|
|
9e2e0d4591 | ||
|
|
87935a23d4 | ||
|
|
2b178dcbd7 | ||
|
|
05cdc99079 | ||
|
|
51bca222c0 | ||
|
|
61bbe57018 | ||
|
|
9997539736 | ||
|
|
d142917afc | ||
|
|
41c1316575 | ||
|
|
d4be57f59e | ||
|
|
6a047d14a0 | ||
|
|
0d1b58542b | ||
|
|
bb05957d33 | ||
|
|
157b071a78 | ||
|
|
927b5e6e38 | ||
|
|
fb0fb551ff | ||
|
|
db02a306e9 | ||
|
|
7d84891813 | ||
|
|
e1a33003f0 | ||
|
|
64c7a171ae | ||
|
|
6a3cb6d9d9 | ||
|
|
efed040e9e | ||
|
|
2148f1031f | ||
|
|
6659456cb3 | ||
|
|
207cc585d9 | ||
|
|
df80124c57 | ||
|
|
dd1155dc89 | ||
|
|
4bbed42fb8 | ||
|
|
d70beb57fc |
49
README.md
49
README.md
@@ -19,9 +19,7 @@ A 3d-printable housing can be found here: https://www.thingiverse.com/thing:4571
|
|||||||
|
|
||||||
### Known Issues
|
### Known Issues
|
||||||
|
|
||||||
* Parts of the web page only works correctly in **Firefox** and Chrome!
|
* spontaneous reboot, especially in case of intensive web server access (improved since v2.1.0)
|
||||||
With **Edge** not all parts (especially the configuration) are **not full functional**.
|
|
||||||
* spontaneous reboot, especially in case of intensive web server access (improved since v2.0.0)
|
|
||||||
|
|
||||||
------
|
------
|
||||||
|
|
||||||
@@ -29,9 +27,50 @@ A 3d-printable housing can be found here: https://www.thingiverse.com/thing:4571
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
##### Rolling - (2020-09-12)
|
##### Rolling - (2020-10-14)
|
||||||
|
|
||||||
* based on v2.0.0 (2020-09-12)
|
* based on v3.0.0 (2020-10-14)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
##### 3.0.0 MQTT-Client (2020-10-14)
|
||||||
|
|
||||||
|
* Implementation of MQTT Client
|
||||||
|
* Improved Version Control
|
||||||
|
* bug-fixing
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
##### 2.2.1 Version Control (2020-09-27)
|
||||||
|
|
||||||
|
* Bug-Fixing (hostname in wlan.ini and error handling inside flow)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
##### 2.2.0 Version Control (2020-09-27)
|
||||||
|
|
||||||
|
* Integrated automated versioning system (menu: SYSTEM --> INFO)
|
||||||
|
* Update Build-System to PlatformIO - Espressif 32 v2.0.0 (ESP-IDF 4.1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
##### 2.1.0 Decimal Shift, Chrome & Edge (2020-09-25)
|
||||||
|
|
||||||
|
* Implementation of Decimal Shift
|
||||||
|
|
||||||
|
* Update default CNN for digits to v6.4.0
|
||||||
|
|
||||||
|
* Improvement HTML
|
||||||
|
|
||||||
|
* Support for Chrome and Edge
|
||||||
|
|
||||||
|
* Reduce logging to minimum - extended logging on demand
|
||||||
|
|
||||||
|
* Implementation of hostname in wlan.ini (`hostname = "HOSTNAME")`
|
||||||
|
|
||||||
|
* Bug fixing, code corrections
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
BIN
code/.DS_Store
vendored
Normal file
BIN
code/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -4,5 +4,12 @@ list(APPEND EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/proto
|
|||||||
|
|
||||||
set(PROJECT_VER "0.0.9.3")
|
set(PROJECT_VER "0.0.9.3")
|
||||||
|
|
||||||
|
ADD_CUSTOM_COMMAND(
|
||||||
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/_version.cpp
|
||||||
|
COMMAND ${CMAKE_COMMAND} -P
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/version.cmake)
|
||||||
|
|
||||||
|
|
||||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||||
project(esp32cam-server-only)
|
project(esp32cam-server-only)
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ static const char *MAIN_TAG = "connect_wlan";
|
|||||||
|
|
||||||
std::string ssid;
|
std::string ssid;
|
||||||
std::string passphrase;
|
std::string passphrase;
|
||||||
|
std::string hostname;
|
||||||
|
|
||||||
|
std::string std_hostname = "watermeter";
|
||||||
|
|
||||||
static EventGroupHandle_t wifi_event_group;
|
static EventGroupHandle_t wifi_event_group;
|
||||||
|
|
||||||
@@ -100,33 +103,36 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
|
|||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void initialise_wifi(std::string _ssid, std::string _passphrase)
|
void initialise_wifi(std::string _ssid, std::string _passphrase, std::string _hostname)
|
||||||
{
|
{
|
||||||
ESP_ERROR_CHECK(esp_event_loop_init(event_handler, NULL) );
|
ESP_ERROR_CHECK(esp_event_loop_init(event_handler, NULL) );
|
||||||
wifi_event_group = xEventGroupCreate();
|
wifi_event_group = xEventGroupCreate();
|
||||||
ssid = _ssid;
|
ssid = _ssid;
|
||||||
passphrase = _passphrase;
|
passphrase = _passphrase;
|
||||||
|
hostname = _hostname;
|
||||||
esp_log_level_set("wifi", ESP_LOG_NONE); // disable wifi driver logging
|
esp_log_level_set("wifi", ESP_LOG_NONE); // disable wifi driver logging
|
||||||
tcpip_adapter_init();
|
tcpip_adapter_init();
|
||||||
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
|
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
|
||||||
ESP_ERROR_CHECK( esp_wifi_init(&cfg) );
|
ESP_ERROR_CHECK( esp_wifi_init(&cfg) );
|
||||||
ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) );
|
ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) );
|
||||||
ESP_ERROR_CHECK( esp_wifi_start() );
|
ESP_ERROR_CHECK( esp_wifi_start() );
|
||||||
esp_err_t ret = tcpip_adapter_set_hostname(TCPIP_ADAPTER_IF_STA ,"icircuit");
|
esp_err_t ret = tcpip_adapter_set_hostname(TCPIP_ADAPTER_IF_STA , hostname.c_str());
|
||||||
if(ret != ESP_OK ){
|
if(ret != ESP_OK ){
|
||||||
ESP_LOGE(MAIN_TAG,"failed to set hostname:%d",ret);
|
ESP_LOGE(MAIN_TAG,"failed to set hostname:%d",ret);
|
||||||
}
|
}
|
||||||
xEventGroupWaitBits(wifi_event_group,CONNECTED_BIT,true,true,portMAX_DELAY);
|
xEventGroupWaitBits(wifi_event_group,CONNECTED_BIT,true,true,portMAX_DELAY);
|
||||||
tcpip_adapter_ip_info_t ip_info;
|
tcpip_adapter_ip_info_t ip_info;
|
||||||
ESP_ERROR_CHECK(tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_STA, &ip_info));
|
ESP_ERROR_CHECK(tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_STA, &ip_info));
|
||||||
printf("IP : %s\n", ip4addr_ntoa(&ip_info.ip));
|
printf("IPv4 : %s\n", ip4addr_ntoa(&ip_info.ip));
|
||||||
|
printf("HostName : %s\n", hostname.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LoadWlanFromFile(std::string fn, std::string &_ssid, std::string &_passphrase)
|
void LoadWlanFromFile(std::string fn, std::string &_ssid, std::string &_passphrase, std::string &_hostname)
|
||||||
{
|
{
|
||||||
string line = "";
|
string line = "";
|
||||||
std::vector<string> zerlegt;
|
std::vector<string> zerlegt;
|
||||||
|
_hostname = std_hostname;
|
||||||
|
|
||||||
FILE* pFile;
|
FILE* pFile;
|
||||||
fn = FormatFileName(fn);
|
fn = FormatFileName(fn);
|
||||||
@@ -137,7 +143,6 @@ void LoadWlanFromFile(std::string fn, std::string &_ssid, std::string &_passphra
|
|||||||
|
|
||||||
char zw[1024];
|
char zw[1024];
|
||||||
fgets(zw, 1024, pFile);
|
fgets(zw, 1024, pFile);
|
||||||
// printf("%s", zw);
|
|
||||||
line = std::string(zw);
|
line = std::string(zw);
|
||||||
|
|
||||||
while ((line.size() > 0) || !(feof(pFile)))
|
while ((line.size() > 0) || !(feof(pFile)))
|
||||||
@@ -145,13 +150,21 @@ void LoadWlanFromFile(std::string fn, std::string &_ssid, std::string &_passphra
|
|||||||
// printf("%s", line.c_str());
|
// printf("%s", line.c_str());
|
||||||
zerlegt = ZerlegeZeile(line, "=");
|
zerlegt = ZerlegeZeile(line, "=");
|
||||||
zerlegt[0] = trim(zerlegt[0], " ");
|
zerlegt[0] = trim(zerlegt[0], " ");
|
||||||
zerlegt[1] = trim(zerlegt[1], " ");
|
|
||||||
|
if ((zerlegt.size() > 1) && (toUpper(zerlegt[0]) == "HOSTNAME")){
|
||||||
|
_hostname = trim(zerlegt[1]);
|
||||||
|
if ((_hostname[0] == '"') && (_hostname[_hostname.length()-1] == '"')){
|
||||||
|
_hostname = _hostname.substr(1, _hostname.length()-2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((zerlegt.size() > 1) && (toUpper(zerlegt[0]) == "SSID")){
|
if ((zerlegt.size() > 1) && (toUpper(zerlegt[0]) == "SSID")){
|
||||||
_ssid = zerlegt[1];
|
_ssid = trim(zerlegt[1]);
|
||||||
if ((_ssid[0] == '"') && (_ssid[_ssid.length()-1] == '"')){
|
if ((_ssid[0] == '"') && (_ssid[_ssid.length()-1] == '"')){
|
||||||
_ssid = _ssid.substr(1, _ssid.length()-2);
|
_ssid = _ssid.substr(1, _ssid.length()-2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((zerlegt.size() > 1) && (toUpper(zerlegt[0]) == "PASSWORD")){
|
if ((zerlegt.size() > 1) && (toUpper(zerlegt[0]) == "PASSWORD")){
|
||||||
_passphrase = zerlegt[1];
|
_passphrase = zerlegt[1];
|
||||||
if ((_passphrase[0] == '"') && (_passphrase[_passphrase.length()-1] == '"')){
|
if ((_passphrase[0] == '"') && (_passphrase[_passphrase.length()-1] == '"')){
|
||||||
@@ -170,6 +183,11 @@ void LoadWlanFromFile(std::string fn, std::string &_ssid, std::string &_passphra
|
|||||||
}
|
}
|
||||||
|
|
||||||
fclose(pFile);
|
fclose(pFile);
|
||||||
|
|
||||||
|
// Check if Hostname was empty in .ini if yes set to std_hostname
|
||||||
|
if(_hostname.length() <= 0){
|
||||||
|
_hostname = std_hostname;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
const int CONNECTED_BIT = BIT0;
|
const int CONNECTED_BIT = BIT0;
|
||||||
|
|
||||||
void initialise_wifi(std::string _ssid, std::string _passphrase);
|
void initialise_wifi(std::string _ssid, std::string _passphrase, std::string _hostname);
|
||||||
|
|
||||||
void LoadWlanFromFile(std::string fn, std::string &_ssid, std::string &_passphrase);
|
void LoadWlanFromFile(std::string fn, std::string &_ssid, std::string &_passphrase, std::string &_hostname);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -258,7 +258,7 @@ static esp_err_t download_get_handler(httpd_req_t *req)
|
|||||||
return ESP_FAIL;
|
return ESP_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
esp_err_t res = httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
|
httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
|
||||||
|
|
||||||
ESP_LOGI(TAG, "Sending file : %s (%ld bytes)...", filename, file_stat.st_size);
|
ESP_LOGI(TAG, "Sending file : %s (%ld bytes)...", filename, file_stat.st_size);
|
||||||
set_content_type_from_file(req, filename);
|
set_content_type_from_file(req, filename);
|
||||||
@@ -437,7 +437,6 @@ static esp_err_t delete_post_handler(httpd_req_t *req)
|
|||||||
|
|
||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
char _query[200];
|
char _query[200];
|
||||||
char _filename[30];
|
|
||||||
char _valuechar[30];
|
char _valuechar[30];
|
||||||
std::string fn = "/sdcard/firmware/";
|
std::string fn = "/sdcard/firmware/";
|
||||||
std::string _task;
|
std::string _task;
|
||||||
@@ -576,8 +575,6 @@ void unzip(std::string _in_zip_file, std::string _target_directory){
|
|||||||
size_t uncomp_size;
|
size_t uncomp_size;
|
||||||
mz_zip_archive zip_archive;
|
mz_zip_archive zip_archive;
|
||||||
void* p;
|
void* p;
|
||||||
const int N = 50;
|
|
||||||
char data[2048];
|
|
||||||
char archive_filename[64];
|
char archive_filename[64];
|
||||||
std::string zw;
|
std::string zw;
|
||||||
// static const char* s_Test_archive_filename = "testhtml.zip";
|
// static const char* s_Test_archive_filename = "testhtml.zip";
|
||||||
|
|||||||
@@ -10,6 +10,10 @@
|
|||||||
#include "CTfLiteClass.h"
|
#include "CTfLiteClass.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "ClassLogFile.h"
|
||||||
|
|
||||||
|
bool debugdetailanalog = false;
|
||||||
|
|
||||||
ClassFlowAnalog::ClassFlowAnalog()
|
ClassFlowAnalog::ClassFlowAnalog()
|
||||||
{
|
{
|
||||||
isLogImage = false;
|
isLogImage = false;
|
||||||
@@ -106,6 +110,7 @@ bool ClassFlowAnalog::ReadParameter(FILE* pfile, string& aktparamgraph)
|
|||||||
neuroi->posy = std::stoi(zerlegt[2]);
|
neuroi->posy = std::stoi(zerlegt[2]);
|
||||||
neuroi->deltax = std::stoi(zerlegt[3]);
|
neuroi->deltax = std::stoi(zerlegt[3]);
|
||||||
neuroi->deltay = std::stoi(zerlegt[4]);
|
neuroi->deltay = std::stoi(zerlegt[4]);
|
||||||
|
neuroi->result = -1;
|
||||||
ROI.push_back(neuroi);
|
ROI.push_back(neuroi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -140,7 +145,12 @@ string ClassFlowAnalog::getHTMLSingleStep(string host)
|
|||||||
|
|
||||||
bool ClassFlowAnalog::doFlow(string time)
|
bool ClassFlowAnalog::doFlow(string time)
|
||||||
{
|
{
|
||||||
doAlignAndCut(time);
|
if (!doAlignAndCut(time)){
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (debugdetailanalog) LogFile.WriteToFile("ClassFlowAnalog::doFlow nach Alignment");
|
||||||
|
|
||||||
doNeuralNetwork(time);
|
doNeuralNetwork(time);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -160,8 +170,21 @@ bool ClassFlowAnalog::doAlignAndCut(string time)
|
|||||||
CImageBasis *img_roi = NULL;
|
CImageBasis *img_roi = NULL;
|
||||||
CAlignAndCutImage *caic = new CAlignAndCutImage(input);
|
CAlignAndCutImage *caic = new CAlignAndCutImage(input);
|
||||||
|
|
||||||
if (input_roi.length() > 0)
|
if (!caic->ImageOkay()){
|
||||||
img_roi = new CImageBasis(input_roi);
|
if (debugdetailanalog) LogFile.WriteToFile("ClassFlowAnalog::doAlignAndCut not okay!");
|
||||||
|
delete caic;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (input_roi.length() > 0){
|
||||||
|
img_roi = new CImageBasis(input_roi);
|
||||||
|
if (!img_roi->ImageOkay()){
|
||||||
|
if (debugdetailanalog) LogFile.WriteToFile("ClassFlowAnalog::doAlignAndCut ImageRoi not okay!");
|
||||||
|
delete caic;
|
||||||
|
delete img_roi;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < ROI.size(); ++i)
|
for (int i = 0; i < ROI.size(); ++i)
|
||||||
{
|
{
|
||||||
@@ -171,6 +194,13 @@ bool ClassFlowAnalog::doAlignAndCut(string time)
|
|||||||
caic->CutAndSave(output, ROI[i]->posx, ROI[i]->posy, ROI[i]->deltax, ROI[i]->deltay);
|
caic->CutAndSave(output, ROI[i]->posx, ROI[i]->posy, ROI[i]->deltax, ROI[i]->deltay);
|
||||||
|
|
||||||
rs = new CResizeImage(output);
|
rs = new CResizeImage(output);
|
||||||
|
if (!rs->ImageOkay()){
|
||||||
|
if (debugdetailanalog) LogFile.WriteToFile("ClassFlowAnalog::doAlignAndCut CResizeImage(output);!");
|
||||||
|
delete caic;
|
||||||
|
delete rs;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
rs->Resize(modelxsize, modelysize);
|
rs->Resize(modelxsize, modelysize);
|
||||||
ioresize = "/sdcard/img_tmp/ra" + std::to_string(i) + ".bmp";
|
ioresize = "/sdcard/img_tmp/ra" + std::to_string(i) + ".bmp";
|
||||||
ioresize = FormatFileName(ioresize);
|
ioresize = FormatFileName(ioresize);
|
||||||
@@ -229,8 +259,11 @@ bool ClassFlowAnalog::doNeuralNetwork(string time)
|
|||||||
f1 = 0; f2 = 0;
|
f1 = 0; f2 = 0;
|
||||||
|
|
||||||
#ifndef OHNETFLITE
|
#ifndef OHNETFLITE
|
||||||
|
// LogFile.WriteToFile("ClassFlowAnalog::doNeuralNetwork vor CNN tflite->LoadInputImage(ioresize)");
|
||||||
tflite->LoadInputImage(ioresize);
|
tflite->LoadInputImage(ioresize);
|
||||||
tflite->Invoke();
|
tflite->Invoke();
|
||||||
|
if (debugdetailanalog) LogFile.WriteToFile("Nach Invoke");
|
||||||
|
|
||||||
|
|
||||||
f1 = tflite->GetOutputValue(0);
|
f1 = tflite->GetOutputValue(0);
|
||||||
f2 = tflite->GetOutputValue(1);
|
f2 = tflite->GetOutputValue(1);
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
#include "server_ota.h"
|
#include "server_ota.h"
|
||||||
|
|
||||||
std::string ClassFlowControll::doSingleStep(std::string _stepname, std::string _host){
|
std::string ClassFlowControll::doSingleStep(std::string _stepname, std::string _host){
|
||||||
bool found = false;
|
|
||||||
std::string _classname = "";
|
std::string _classname = "";
|
||||||
std::string result = "";
|
std::string result = "";
|
||||||
if (_stepname.compare("[MakeImage]") == 0){
|
if (_stepname.compare("[MakeImage]") == 0){
|
||||||
@@ -21,6 +20,9 @@ std::string ClassFlowControll::doSingleStep(std::string _stepname, std::string _
|
|||||||
if (_stepname.compare("[Analog]") == 0){
|
if (_stepname.compare("[Analog]") == 0){
|
||||||
_classname = "ClassFlowAnalog";
|
_classname = "ClassFlowAnalog";
|
||||||
}
|
}
|
||||||
|
if (_stepname.compare("[MQTT]") == 0){
|
||||||
|
_classname = "ClassFlowMQTT";
|
||||||
|
}
|
||||||
// std::string zw = "Classname: " + _classname + "\n";
|
// std::string zw = "Classname: " + _classname + "\n";
|
||||||
// printf(zw.c_str());
|
// printf(zw.c_str());
|
||||||
|
|
||||||
@@ -29,7 +31,6 @@ std::string ClassFlowControll::doSingleStep(std::string _stepname, std::string _
|
|||||||
// printf(FlowControll[i]->name().c_str()); printf("\n");
|
// printf(FlowControll[i]->name().c_str()); printf("\n");
|
||||||
FlowControll[i]->doFlow("");
|
FlowControll[i]->doFlow("");
|
||||||
result = FlowControll[i]->getHTMLSingleStep(_host);
|
result = FlowControll[i]->getHTMLSingleStep(_host);
|
||||||
found = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@@ -74,15 +75,17 @@ ClassFlow* ClassFlowControll::CreateClassFlow(std::string _type)
|
|||||||
|
|
||||||
_type = trim(_type);
|
_type = trim(_type);
|
||||||
|
|
||||||
if (_type.compare("[MakeImage]") == 0)
|
if (toUpper(_type).compare("[MAKEIMAGE]") == 0)
|
||||||
cfc = new ClassFlowMakeImage(&FlowControll);
|
cfc = new ClassFlowMakeImage(&FlowControll);
|
||||||
if (_type.compare("[Alignment]") == 0)
|
if (toUpper(_type).compare("[ALIGNMENT]") == 0)
|
||||||
cfc = new ClassFlowAlignment(&FlowControll);
|
cfc = new ClassFlowAlignment(&FlowControll);
|
||||||
if (_type.compare("[Analog]") == 0)
|
if (toUpper(_type).compare("[ANALOG]") == 0)
|
||||||
cfc = new ClassFlowAnalog(&FlowControll);
|
cfc = new ClassFlowAnalog(&FlowControll);
|
||||||
if (_type.compare("[Digits]") == 0)
|
if (toUpper(_type).compare("[DIGITS]") == 0)
|
||||||
cfc = new ClassFlowDigit(&FlowControll);
|
cfc = new ClassFlowDigit(&FlowControll);
|
||||||
if (_type.compare("[PostProcessing]") == 0)
|
if (toUpper(_type).compare("[MQTT]") == 0)
|
||||||
|
cfc = new ClassFlowMQTT(&FlowControll);
|
||||||
|
if (toUpper(_type).compare("[POSTPROCESSING]") == 0)
|
||||||
{
|
{
|
||||||
cfc = new ClassFlowPostProcessing(&FlowControll);
|
cfc = new ClassFlowPostProcessing(&FlowControll);
|
||||||
flowpostprocessing = (ClassFlowPostProcessing*) cfc;
|
flowpostprocessing = (ClassFlowPostProcessing*) cfc;
|
||||||
@@ -91,9 +94,12 @@ ClassFlow* ClassFlowControll::CreateClassFlow(std::string _type)
|
|||||||
if (cfc) // Wird nur angehangen, falls es nicht [AutoTimer] ist, denn dieses ist für FlowControll
|
if (cfc) // Wird nur angehangen, falls es nicht [AutoTimer] ist, denn dieses ist für FlowControll
|
||||||
FlowControll.push_back(cfc);
|
FlowControll.push_back(cfc);
|
||||||
|
|
||||||
if (_type.compare("[AutoTimer]") == 0)
|
if (toUpper(_type).compare("[AUTOTIMER]") == 0)
|
||||||
cfc = this;
|
cfc = this;
|
||||||
|
|
||||||
|
if (toUpper(_type).compare("[DEBUG]") == 0)
|
||||||
|
cfc = this;
|
||||||
|
|
||||||
return cfc;
|
return cfc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,7 +162,7 @@ bool ClassFlowControll::doFlow(string time)
|
|||||||
if (!FlowControll[i]->doFlow(time)){
|
if (!FlowControll[i]->doFlow(time)){
|
||||||
repeat++;
|
repeat++;
|
||||||
LogFile.WriteToFile("Fehler im vorheriger Schritt - wird zum " + to_string(repeat) + ". Mal wiederholt");
|
LogFile.WriteToFile("Fehler im vorheriger Schritt - wird zum " + to_string(repeat) + ". Mal wiederholt");
|
||||||
i = i-2; // vorheriger Schritt muss wiederholt werden (vermutlich Bilder aufnehmen)
|
i = -1; // vorheriger Schritt muss wiederholt werden (vermutlich Bilder aufnehmen)
|
||||||
result = false;
|
result = false;
|
||||||
if (repeat > 5) {
|
if (repeat > 5) {
|
||||||
LogFile.WriteToFile("Wiederholung 5x nicht erfolgreich --> reboot");
|
LogFile.WriteToFile("Wiederholung 5x nicht erfolgreich --> reboot");
|
||||||
@@ -247,23 +253,34 @@ bool ClassFlowControll::ReadParameter(FILE* pfile, string& aktparamgraph)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
||||||
if (aktparamgraph.compare("[AutoTimer]") != 0) // Paragraph passt nich zu MakeImage
|
if ((toUpper(aktparamgraph).compare("[AUTOTIMER]") != 0) && (toUpper(aktparamgraph).compare("[DEBUG]") != 0)) // Paragraph passt nicht zu MakeImage
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
while (this->getNextLine(pfile, &aktparamgraph) && !this->isNewParagraph(aktparamgraph))
|
while (this->getNextLine(pfile, &aktparamgraph) && !this->isNewParagraph(aktparamgraph))
|
||||||
{
|
{
|
||||||
zerlegt = this->ZerlegeZeile(aktparamgraph);
|
zerlegt = this->ZerlegeZeile(aktparamgraph);
|
||||||
if ((zerlegt[0] == "AutoStart") && (zerlegt.size() > 1))
|
if ((toUpper(zerlegt[0]) == "AUTOSTART") && (zerlegt.size() > 1))
|
||||||
{
|
{
|
||||||
if (toUpper(zerlegt[1]) == "TRUE")
|
if (toUpper(zerlegt[1]) == "TRUE")
|
||||||
{
|
{
|
||||||
AutoStart = true;
|
AutoStart = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((zerlegt[0] == "Intervall") && (zerlegt.size() > 1))
|
if ((toUpper(zerlegt[0]) == "INTERVALL") && (zerlegt.size() > 1))
|
||||||
{
|
{
|
||||||
AutoIntervall = std::stof(zerlegt[1]);
|
AutoIntervall = std::stof(zerlegt[1]);
|
||||||
}
|
}
|
||||||
|
if ((toUpper(zerlegt[0]) == "LOGFILE") && (zerlegt.size() > 1))
|
||||||
|
{
|
||||||
|
if (toUpper(zerlegt[1]) == "TRUE")
|
||||||
|
{
|
||||||
|
LogFile.SwitchOnOff(true);
|
||||||
|
}
|
||||||
|
if (toUpper(zerlegt[1]) == "FALSE")
|
||||||
|
{
|
||||||
|
LogFile.SwitchOnOff(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "ClassFlowDigit.h"
|
#include "ClassFlowDigit.h"
|
||||||
#include "ClassFlowAnalog.h"
|
#include "ClassFlowAnalog.h"
|
||||||
#include "ClassFlowPostProcessing.h"
|
#include "ClassFlowPostProcessing.h"
|
||||||
|
#include "ClassFlowMQTT.h"
|
||||||
|
|
||||||
|
|
||||||
class ClassFlowControll :
|
class ClassFlowControll :
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
// #include "bitmap_image.hpp"
|
// #include "bitmap_image.hpp"
|
||||||
|
|
||||||
|
#include "ClassLogFile.h"
|
||||||
|
|
||||||
ClassFlowDigit::ClassFlowDigit()
|
ClassFlowDigit::ClassFlowDigit()
|
||||||
{
|
{
|
||||||
isLogImage = false;
|
isLogImage = false;
|
||||||
@@ -84,6 +86,7 @@ bool ClassFlowDigit::ReadParameter(FILE* pfile, string& aktparamgraph)
|
|||||||
neuroi->posy = std::stoi(zerlegt[2]);
|
neuroi->posy = std::stoi(zerlegt[2]);
|
||||||
neuroi->deltax = std::stoi(zerlegt[3]);
|
neuroi->deltax = std::stoi(zerlegt[3]);
|
||||||
neuroi->deltay = std::stoi(zerlegt[4]);
|
neuroi->deltay = std::stoi(zerlegt[4]);
|
||||||
|
neuroi->resultklasse = -1;
|
||||||
ROI.push_back(neuroi);
|
ROI.push_back(neuroi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -119,7 +122,10 @@ string ClassFlowDigit::getHTMLSingleStep(string host)
|
|||||||
|
|
||||||
bool ClassFlowDigit::doFlow(string time)
|
bool ClassFlowDigit::doFlow(string time)
|
||||||
{
|
{
|
||||||
doAlignAndCut(time);
|
if (!doAlignAndCut(time)){
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
doNeuralNetwork(time);
|
doNeuralNetwork(time);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -138,9 +144,22 @@ bool ClassFlowDigit::doAlignAndCut(string time)
|
|||||||
CResizeImage *rs;
|
CResizeImage *rs;
|
||||||
CImageBasis *img_roi = NULL;
|
CImageBasis *img_roi = NULL;
|
||||||
CAlignAndCutImage *caic = new CAlignAndCutImage(input);
|
CAlignAndCutImage *caic = new CAlignAndCutImage(input);
|
||||||
|
if (!caic->ImageOkay()){
|
||||||
|
LogFile.WriteToFile("ClassFlowDigit::doAlignAndCut not okay!");
|
||||||
|
delete caic;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (input_roi.length() > 0)
|
if (input_roi.length() > 0){
|
||||||
img_roi = new CImageBasis(input_roi);
|
img_roi = new CImageBasis(input_roi);
|
||||||
|
if (!img_roi->ImageOkay()){
|
||||||
|
LogFile.WriteToFile("ClassFlowDigit::doAlignAndCut ImageRoi not okay!");
|
||||||
|
delete caic;
|
||||||
|
delete img_roi;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < ROI.size(); ++i)
|
for (int i = 0; i < ROI.size(); ++i)
|
||||||
|
|||||||
122
code/lib/jomjol_flowcontroll/ClassFlowMQTT.cpp
Normal file
122
code/lib/jomjol_flowcontroll/ClassFlowMQTT.cpp
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
#include "ClassFlowMQTT.h"
|
||||||
|
#include "Helper.h"
|
||||||
|
|
||||||
|
#include "interface_mqtt.h"
|
||||||
|
#include "ClassFlowPostProcessing.h"
|
||||||
|
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
static const char* TAG2 = "example";
|
||||||
|
|
||||||
|
ClassFlowMQTT::ClassFlowMQTT()
|
||||||
|
{
|
||||||
|
uri = "";
|
||||||
|
topic = "";
|
||||||
|
clientname = "watermeter";
|
||||||
|
OldValue = "";
|
||||||
|
flowpostprocessing = NULL;
|
||||||
|
user = "";
|
||||||
|
password = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
ClassFlowMQTT::ClassFlowMQTT(std::vector<ClassFlow*>* lfc)
|
||||||
|
{
|
||||||
|
uri = "";
|
||||||
|
topic = "";
|
||||||
|
clientname = "watermeter";
|
||||||
|
OldValue = "";
|
||||||
|
flowpostprocessing = NULL;
|
||||||
|
user = "";
|
||||||
|
password = "";
|
||||||
|
|
||||||
|
ListFlowControll = lfc;
|
||||||
|
|
||||||
|
for (int i = 0; i < ListFlowControll->size(); ++i)
|
||||||
|
{
|
||||||
|
if (((*ListFlowControll)[i])->name().compare("ClassFlowPostProcessing") == 0)
|
||||||
|
{
|
||||||
|
flowpostprocessing = (ClassFlowPostProcessing*) (*ListFlowControll)[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ClassFlowMQTT::ReadParameter(FILE* pfile, string& aktparamgraph)
|
||||||
|
{
|
||||||
|
std::vector<string> zerlegt;
|
||||||
|
|
||||||
|
aktparamgraph = trim(aktparamgraph);
|
||||||
|
|
||||||
|
if (aktparamgraph.size() == 0)
|
||||||
|
if (!this->GetNextParagraph(pfile, aktparamgraph))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (toUpper(aktparamgraph).compare("[MQTT]") != 0) // Paragraph passt nich zu MakeImage
|
||||||
|
return false;
|
||||||
|
|
||||||
|
while (this->getNextLine(pfile, &aktparamgraph) && !this->isNewParagraph(aktparamgraph))
|
||||||
|
{
|
||||||
|
zerlegt = this->ZerlegeZeile(aktparamgraph);
|
||||||
|
if ((toUpper(zerlegt[0]) == "USER") && (zerlegt.size() > 1))
|
||||||
|
{
|
||||||
|
this->user = zerlegt[1];
|
||||||
|
}
|
||||||
|
if ((toUpper(zerlegt[0]) == "PASSWORD") && (zerlegt.size() > 1))
|
||||||
|
{
|
||||||
|
this->password = zerlegt[1];
|
||||||
|
}
|
||||||
|
if ((toUpper(zerlegt[0]) == "URI") && (zerlegt.size() > 1))
|
||||||
|
{
|
||||||
|
this->uri = zerlegt[1];
|
||||||
|
}
|
||||||
|
if ((toUpper(zerlegt[0]) == "TOPIC") && (zerlegt.size() > 1))
|
||||||
|
{
|
||||||
|
this->topic = zerlegt[1];
|
||||||
|
}
|
||||||
|
if ((toUpper(zerlegt[0]) == "CLIENTID") && (zerlegt.size() > 1))
|
||||||
|
{
|
||||||
|
this->clientname = zerlegt[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((uri.length() > 0) && (topic.length() > 0))
|
||||||
|
{
|
||||||
|
MQTTInit(uri, clientname, user, password);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool ClassFlowMQTT::doFlow(string zwtime)
|
||||||
|
{
|
||||||
|
std::string result;
|
||||||
|
string zw = "";
|
||||||
|
|
||||||
|
if (flowpostprocessing)
|
||||||
|
{
|
||||||
|
result = flowpostprocessing->getReadoutParam(false, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (int i = 0; i < ListFlowControll->size(); ++i)
|
||||||
|
{
|
||||||
|
zw = (*ListFlowControll)[i]->getReadout();
|
||||||
|
if (zw.length() > 0)
|
||||||
|
{
|
||||||
|
if (result.length() == 0)
|
||||||
|
result = zw;
|
||||||
|
else
|
||||||
|
result = result + "\t" + zw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MQTTPublish(topic, result);
|
||||||
|
|
||||||
|
OldValue = result;
|
||||||
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
25
code/lib/jomjol_flowcontroll/ClassFlowMQTT.h
Normal file
25
code/lib/jomjol_flowcontroll/ClassFlowMQTT.h
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "ClassFlow.h"
|
||||||
|
|
||||||
|
#include "ClassFlowPostProcessing.h"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
class ClassFlowMQTT :
|
||||||
|
public ClassFlow
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
std::string uri, topic, clientname;
|
||||||
|
std::string OldValue;
|
||||||
|
ClassFlowPostProcessing* flowpostprocessing;
|
||||||
|
std::string user, password;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
ClassFlowMQTT();
|
||||||
|
ClassFlowMQTT(std::vector<ClassFlow*>* lfc);
|
||||||
|
bool ReadParameter(FILE* pfile, string& aktparamgraph);
|
||||||
|
bool doFlow(string time);
|
||||||
|
string name(){return "ClassFlowMQTT";};
|
||||||
|
};
|
||||||
|
|
||||||
@@ -19,10 +19,8 @@ string ClassFlowPostProcessing::GetPreValue()
|
|||||||
{
|
{
|
||||||
if (((*ListFlowControll)[i])->name().compare("ClassFlowAnalog") == 0)
|
if (((*ListFlowControll)[i])->name().compare("ClassFlowAnalog") == 0)
|
||||||
{
|
{
|
||||||
int AnzahlNachkomma = ((ClassFlowAnalog*)(*ListFlowControll)[i])->AnzahlROIs();
|
int AnzahlAnalog = ((ClassFlowAnalog*)(*ListFlowControll)[i])->AnzahlROIs();
|
||||||
std::stringstream stream;
|
result = RundeOutput(PreValue, AnzahlAnalog - DecimalShift);
|
||||||
stream << std::fixed << std::setprecision(AnzahlNachkomma) << PreValue;
|
|
||||||
result = stream.str();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,14 +78,11 @@ bool ClassFlowPostProcessing::LoadPreValue(void)
|
|||||||
{
|
{
|
||||||
if (((*ListFlowControll)[i])->name().compare("ClassFlowAnalog") == 0)
|
if (((*ListFlowControll)[i])->name().compare("ClassFlowAnalog") == 0)
|
||||||
{
|
{
|
||||||
int AnzahlNachkomma = ((ClassFlowAnalog*)(*ListFlowControll)[i])->AnzahlROIs();
|
int AnzahlAnalog = ((ClassFlowAnalog*)(*ListFlowControll)[i])->AnzahlROIs();
|
||||||
std::stringstream stream;
|
ReturnValue = RundeOutput(Value, AnzahlAnalog - DecimalShift);
|
||||||
stream << std::fixed << std::setprecision(AnzahlNachkomma) << Value;
|
|
||||||
ReturnValue = stream.str();
|
|
||||||
ReturnValueNoError = ReturnValue;
|
ReturnValueNoError = ReturnValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -135,6 +130,7 @@ ClassFlowPostProcessing::ClassFlowPostProcessing()
|
|||||||
PreValueOkay = false;
|
PreValueOkay = false;
|
||||||
useMaxRateValue = false;
|
useMaxRateValue = false;
|
||||||
checkDigitIncreaseConsistency = false;
|
checkDigitIncreaseConsistency = false;
|
||||||
|
DecimalShift = 0;
|
||||||
FilePreValue = FormatFileName("/sdcard/config/prevalue.ini");
|
FilePreValue = FormatFileName("/sdcard/config/prevalue.ini");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,11 +144,13 @@ ClassFlowPostProcessing::ClassFlowPostProcessing(std::vector<ClassFlow*>* lfc)
|
|||||||
ListFlowControll = NULL;
|
ListFlowControll = NULL;
|
||||||
PreValueOkay = false;
|
PreValueOkay = false;
|
||||||
useMaxRateValue = false;
|
useMaxRateValue = false;
|
||||||
checkDigitIncreaseConsistency = false;
|
checkDigitIncreaseConsistency = false;
|
||||||
|
DecimalShift = 0;
|
||||||
FilePreValue = FormatFileName("/sdcard/config/prevalue.ini");
|
FilePreValue = FormatFileName("/sdcard/config/prevalue.ini");
|
||||||
ListFlowControll = lfc;
|
ListFlowControll = lfc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool ClassFlowPostProcessing::ReadParameter(FILE* pfile, string& aktparamgraph)
|
bool ClassFlowPostProcessing::ReadParameter(FILE* pfile, string& aktparamgraph)
|
||||||
{
|
{
|
||||||
std::vector<string> zerlegt;
|
std::vector<string> zerlegt;
|
||||||
@@ -170,42 +168,92 @@ bool ClassFlowPostProcessing::ReadParameter(FILE* pfile, string& aktparamgraph)
|
|||||||
while (this->getNextLine(pfile, &aktparamgraph) && !this->isNewParagraph(aktparamgraph))
|
while (this->getNextLine(pfile, &aktparamgraph) && !this->isNewParagraph(aktparamgraph))
|
||||||
{
|
{
|
||||||
zerlegt = this->ZerlegeZeile(aktparamgraph);
|
zerlegt = this->ZerlegeZeile(aktparamgraph);
|
||||||
if ((zerlegt[0] == "PreValueUse") && (zerlegt.size() > 1))
|
if ((toUpper(zerlegt[0]) == "DECIMALSHIFT") && (zerlegt.size() > 1))
|
||||||
{
|
{
|
||||||
if ((zerlegt[1] == "True") || (zerlegt[1] == "true"))
|
DecimalShift = stoi(zerlegt[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((toUpper(zerlegt[0]) == "PREVALUEUSE") && (zerlegt.size() > 1))
|
||||||
|
{
|
||||||
|
if (toUpper(zerlegt[1]) == "TRUE")
|
||||||
{
|
{
|
||||||
PreValueUse = true;
|
PreValueUse = true;
|
||||||
PreValueOkay = LoadPreValue();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((zerlegt[0] == "CheckDigitIncreaseConsistency") && (zerlegt.size() > 1))
|
if ((toUpper(zerlegt[0]) == "CHECKDIGITINCREASECONSISTENCY") && (zerlegt.size() > 1))
|
||||||
{
|
{
|
||||||
if (toUpper(zerlegt[1]) == "TRUE")
|
if (toUpper(zerlegt[1]) == "TRUE")
|
||||||
checkDigitIncreaseConsistency = true;
|
checkDigitIncreaseConsistency = true;
|
||||||
}
|
}
|
||||||
if ((zerlegt[0] == "AllowNegativeRates") && (zerlegt.size() > 1))
|
if ((toUpper(zerlegt[0]) == "ALLOWNEGATIVERATES") && (zerlegt.size() > 1))
|
||||||
{
|
{
|
||||||
if (toUpper(zerlegt[1]) == "TRUE")
|
if (toUpper(zerlegt[1]) == "TRUE")
|
||||||
AllowNegativeRates = true;
|
AllowNegativeRates = true;
|
||||||
}
|
}
|
||||||
if ((zerlegt[0] == "ErrorMessage") && (zerlegt.size() > 1))
|
if ((toUpper(zerlegt[0]) == "ERRORMESSAGE") && (zerlegt.size() > 1))
|
||||||
{
|
{
|
||||||
if (toUpper(zerlegt[1]) == "TRUE")
|
if (toUpper(zerlegt[1]) == "TRUE")
|
||||||
ErrorMessage = true;
|
ErrorMessage = true;
|
||||||
}
|
}
|
||||||
if ((zerlegt[0] == "PreValueAgeStartup") && (zerlegt.size() > 1))
|
if ((toUpper(zerlegt[0]) == "PREVALUEAGESTARTUP") && (zerlegt.size() > 1))
|
||||||
{
|
{
|
||||||
PreValueAgeStartup = std::stoi(zerlegt[1]);
|
PreValueAgeStartup = std::stoi(zerlegt[1]);
|
||||||
}
|
}
|
||||||
if ((zerlegt[0] == "MaxRateValue") && (zerlegt.size() > 1))
|
if ((toUpper(zerlegt[0]) == "MAXRATEVALUE") && (zerlegt.size() > 1))
|
||||||
{
|
{
|
||||||
useMaxRateValue = true;
|
useMaxRateValue = true;
|
||||||
MaxRateValue = std::stof(zerlegt[1]);
|
MaxRateValue = std::stof(zerlegt[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (PreValueUse) {
|
||||||
|
PreValueOkay = LoadPreValue();
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string ClassFlowPostProcessing::ShiftDecimal(string in, int _decShift){
|
||||||
|
|
||||||
|
if (_decShift == 0){
|
||||||
|
return in;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _pos_dec_org, _pos_dec_neu;
|
||||||
|
|
||||||
|
_pos_dec_org = findDelimiterPos(in, ".");
|
||||||
|
if (_pos_dec_org == std::string::npos) {
|
||||||
|
_pos_dec_org = in.length();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
in = in.erase(_pos_dec_org, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
_pos_dec_neu = _pos_dec_org + _decShift;
|
||||||
|
|
||||||
|
if (_pos_dec_neu <= 0) { // Komma ist vor der ersten Ziffer
|
||||||
|
for (int i = 0; i > _pos_dec_neu; --i){
|
||||||
|
in = in.insert(0, "0");
|
||||||
|
}
|
||||||
|
in = "0." + in;
|
||||||
|
return in;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_pos_dec_neu > in.length()){ // Komma soll hinter String (123 --> 1230)
|
||||||
|
for (int i = in.length(); i < _pos_dec_neu; ++i){
|
||||||
|
in = in.insert(in.length(), "0");
|
||||||
|
}
|
||||||
|
return in;
|
||||||
|
}
|
||||||
|
|
||||||
|
string zw;
|
||||||
|
zw = in.substr(0, _pos_dec_neu);
|
||||||
|
zw = zw + ".";
|
||||||
|
zw = zw + in.substr(_pos_dec_neu, in.length() - _pos_dec_neu);
|
||||||
|
|
||||||
|
return zw;
|
||||||
|
}
|
||||||
|
|
||||||
bool ClassFlowPostProcessing::doFlow(string zwtime)
|
bool ClassFlowPostProcessing::doFlow(string zwtime)
|
||||||
{
|
{
|
||||||
string result = "";
|
string result = "";
|
||||||
@@ -214,7 +262,7 @@ bool ClassFlowPostProcessing::doFlow(string zwtime)
|
|||||||
string zwvalue;
|
string zwvalue;
|
||||||
bool isdigit = false;
|
bool isdigit = false;
|
||||||
bool isanalog = false;
|
bool isanalog = false;
|
||||||
int AnzahlNachkomma = 0;
|
int AnzahlAnalog = 0;
|
||||||
string zw;
|
string zw;
|
||||||
string error = "";
|
string error = "";
|
||||||
time_t imagetime = 0;
|
time_t imagetime = 0;
|
||||||
@@ -234,7 +282,7 @@ bool ClassFlowPostProcessing::doFlow(string zwtime)
|
|||||||
{
|
{
|
||||||
isanalog = true;
|
isanalog = true;
|
||||||
analog = (*ListFlowControll)[i]->getReadout();
|
analog = (*ListFlowControll)[i]->getReadout();
|
||||||
AnzahlNachkomma = ((ClassFlowAnalog*)(*ListFlowControll)[i])->AnzahlROIs();
|
AnzahlAnalog = ((ClassFlowAnalog*)(*ListFlowControll)[i])->AnzahlROIs();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,7 +306,9 @@ bool ClassFlowPostProcessing::doFlow(string zwtime)
|
|||||||
if (isdigit && isanalog)
|
if (isdigit && isanalog)
|
||||||
ReturnRawValue = ReturnRawValue + ".";
|
ReturnRawValue = ReturnRawValue + ".";
|
||||||
if (isanalog)
|
if (isanalog)
|
||||||
ReturnRawValue = ReturnRawValue + analog;
|
ReturnRawValue = ReturnRawValue + analog;
|
||||||
|
|
||||||
|
ReturnRawValue = ShiftDecimal(ReturnRawValue, DecimalShift);
|
||||||
|
|
||||||
if (!PreValueUse || !PreValueOkay)
|
if (!PreValueUse || !PreValueOkay)
|
||||||
{
|
{
|
||||||
@@ -279,33 +329,22 @@ bool ClassFlowPostProcessing::doFlow(string zwtime)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isdigit)
|
zw = ErsetzteN(ReturnRawValue);
|
||||||
{
|
|
||||||
int lastanalog = -1;
|
|
||||||
if (isanalog)
|
|
||||||
lastanalog = analog[0] - 48;
|
|
||||||
digit = ErsetzteN(digit, lastanalog);
|
|
||||||
zw = digit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isdigit && isanalog)
|
|
||||||
zw = zw + ".";
|
|
||||||
if (isanalog)
|
|
||||||
zw = zw + analog;
|
|
||||||
|
|
||||||
Value = std::stof(zw);
|
Value = std::stof(zw);
|
||||||
|
if (checkDigitIncreaseConsistency)
|
||||||
|
{
|
||||||
|
// Value = checkDigitConsistency(Value, DecimalShift, isanalog);
|
||||||
|
}
|
||||||
|
|
||||||
std::stringstream stream;
|
zwvalue = RundeOutput(Value, AnzahlAnalog - DecimalShift);
|
||||||
stream << std::fixed << std::setprecision(AnzahlNachkomma) << Value;
|
|
||||||
zwvalue = stream.str();
|
|
||||||
|
|
||||||
if ((!AllowNegativeRates) && (Value < PreValue))
|
if ((!AllowNegativeRates) && (Value < PreValue))
|
||||||
{
|
{
|
||||||
error = "Negative Rate - Returned old value - read value: " + zwvalue;
|
error = "Negative Rate - Returned old value - read value: " + zwvalue;
|
||||||
Value = PreValue;
|
Value = PreValue;
|
||||||
stream.str("");
|
zwvalue = RundeOutput(Value, AnzahlAnalog - DecimalShift);
|
||||||
stream << std::fixed << std::setprecision(AnzahlNachkomma) << Value;
|
|
||||||
zwvalue = stream.str();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -313,9 +352,7 @@ bool ClassFlowPostProcessing::doFlow(string zwtime)
|
|||||||
{
|
{
|
||||||
error = "Rate too high - Returned old value - read value: " + zwvalue;
|
error = "Rate too high - Returned old value - read value: " + zwvalue;
|
||||||
Value = PreValue;
|
Value = PreValue;
|
||||||
stream.str("");
|
zwvalue = RundeOutput(Value, AnzahlAnalog - DecimalShift);
|
||||||
stream << std::fixed << std::setprecision(AnzahlNachkomma) << Value;
|
|
||||||
zwvalue = stream.str();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -344,19 +381,34 @@ string ClassFlowPostProcessing::getReadoutParam(bool _rawValue, bool _noerror)
|
|||||||
return ReturnValue;
|
return ReturnValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string ClassFlowPostProcessing::RundeOutput(float _in, int _anzNachkomma){
|
||||||
|
std::stringstream stream;
|
||||||
|
stream << std::fixed << std::setprecision(_anzNachkomma) << _in;
|
||||||
|
return stream.str();
|
||||||
|
}
|
||||||
|
|
||||||
string ClassFlowPostProcessing::ErsetzteN(string input, int lastvalueanalog = -1)
|
|
||||||
|
string ClassFlowPostProcessing::ErsetzteN(string input)
|
||||||
{
|
{
|
||||||
int posN, posPunkt;
|
int posN, posPunkt;
|
||||||
int pot, ziffer;
|
int pot, ziffer;
|
||||||
float zw;
|
float zw;
|
||||||
|
|
||||||
posN = findDelimiterPos(input, "N");
|
posN = findDelimiterPos(input, "N");
|
||||||
posPunkt = input.length();
|
posPunkt = findDelimiterPos(input, ".");
|
||||||
|
if (posPunkt == std::string::npos){
|
||||||
|
posPunkt = input.length();
|
||||||
|
}
|
||||||
|
|
||||||
while (posN != std::string::npos)
|
while (posN != std::string::npos)
|
||||||
{
|
{
|
||||||
pot = posPunkt - posN - 1;
|
if (posN < posPunkt) {
|
||||||
|
pot = posPunkt - posN - 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pot = posPunkt - posN;
|
||||||
|
}
|
||||||
|
|
||||||
zw = PreValue / pow(10, pot);
|
zw = PreValue / pow(10, pot);
|
||||||
ziffer = ((int) zw) % 10;
|
ziffer = ((int) zw) % 10;
|
||||||
input[posN] = ziffer + 48;
|
input[posN] = ziffer + 48;
|
||||||
@@ -364,44 +416,43 @@ string ClassFlowPostProcessing::ErsetzteN(string input, int lastvalueanalog = -1
|
|||||||
posN = findDelimiterPos(input, "N");
|
posN = findDelimiterPos(input, "N");
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////// TestCode
|
return input;
|
||||||
/*
|
}
|
||||||
input = "10";
|
|
||||||
posPunkt = input.length();
|
float ClassFlowPostProcessing::checkDigitConsistency(float input, int _decilamshift, bool _isanalog){
|
||||||
PreValue = 9.5;
|
int aktdigit, olddigit;
|
||||||
lastvalueanalog = 7;
|
int aktdigit_before, olddigit_before;
|
||||||
*/
|
int pot, pot_max;
|
||||||
if (checkDigitIncreaseConsistency && lastvalueanalog > -1)
|
float zw;
|
||||||
{
|
|
||||||
int zifferIST;
|
pot = _decilamshift;
|
||||||
int substrakt = 0;
|
if (!_isanalog) // falls es keine analogwerte gibt, kann die letzte nicht bewerte werden
|
||||||
bool lastcorrected = false;
|
{
|
||||||
for (int i = input.length() - 1; i >= 0; --i)
|
pot++;
|
||||||
{
|
}
|
||||||
zifferIST = input[i] - 48; //std::stoi(std::string(input[i]));
|
pot_max = ((int) log10(input)) + 1;
|
||||||
if (lastcorrected)
|
|
||||||
{
|
while (pot <= pot_max)
|
||||||
zifferIST--;
|
{
|
||||||
input[i] = zifferIST + 48;
|
zw = input / pow(10, pot-1);
|
||||||
lastcorrected = false;
|
aktdigit_before = ((int) zw) % 10;
|
||||||
}
|
zw = PreValue / pow(10, pot-1);
|
||||||
|
olddigit_before = ((int) zw) % 10;
|
||||||
pot = posPunkt - i - 1;
|
|
||||||
zw = PreValue / pow(10, pot);
|
zw = input / pow(10, pot);
|
||||||
ziffer = ((int) zw) % 10;
|
aktdigit = ((int) zw) % 10;
|
||||||
if (zifferIST < ziffer)
|
zw = PreValue / pow(10, pot);
|
||||||
{
|
olddigit = ((int) zw) % 10;
|
||||||
if (lastvalueanalog >= 7)
|
|
||||||
{
|
if (aktdigit != olddigit) {
|
||||||
input[i] = ziffer + 48;
|
if (olddigit_before <= aktdigit_before) // stelle vorher hat noch keinen Nulldurchgang --> nachfolgestelle sollte sich nicht verändern
|
||||||
lastvalueanalog = ziffer;
|
{
|
||||||
lastcorrected = true;
|
input = input + ((float) (olddigit - aktdigit)) * pow(10, pot); // Neue Digit wird durch alte Digit ersetzt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pot++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
return input;
|
return input;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,13 +9,14 @@ class ClassFlowPostProcessing :
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
bool PreValueUse;
|
bool PreValueUse;
|
||||||
int PreValueAgeStartup;
|
int PreValueAgeStartup;
|
||||||
bool AllowNegativeRates;
|
bool AllowNegativeRates;
|
||||||
float MaxRateValue;
|
float MaxRateValue;
|
||||||
bool useMaxRateValue;
|
bool useMaxRateValue;
|
||||||
bool ErrorMessage;
|
bool ErrorMessage;
|
||||||
bool PreValueOkay;
|
bool PreValueOkay;
|
||||||
bool checkDigitIncreaseConsistency;
|
bool checkDigitIncreaseConsistency;
|
||||||
|
int DecimalShift;
|
||||||
|
|
||||||
string FilePreValue;
|
string FilePreValue;
|
||||||
float PreValue; // letzter Wert, der gut ausgelesen wurde
|
float PreValue; // letzter Wert, der gut ausgelesen wurde
|
||||||
@@ -25,8 +26,11 @@ protected:
|
|||||||
string ReturnValueNoError; // korrigierter Rückgabewert ohne Fehlermeldung
|
string ReturnValueNoError; // korrigierter Rückgabewert ohne Fehlermeldung
|
||||||
|
|
||||||
bool LoadPreValue(void);
|
bool LoadPreValue(void);
|
||||||
|
string ShiftDecimal(string in, int _decShift);
|
||||||
|
|
||||||
string ErsetzteN(string, int lastvalueanalog);
|
string ErsetzteN(string);
|
||||||
|
float checkDigitConsistency(float input, int _decilamshift, bool _isanalog);
|
||||||
|
string RundeOutput(float _in, int _anzNachkomma);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ClassFlowPostProcessing();
|
ClassFlowPostProcessing();
|
||||||
|
|||||||
@@ -1,157 +0,0 @@
|
|||||||
//#pragma warning(disable : 4996)
|
|
||||||
|
|
||||||
#include "Helper.h"
|
|
||||||
|
|
||||||
//#define ISWINDOWS_TRUE
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
std::string FormatFileName(std::string input)
|
|
||||||
{
|
|
||||||
#ifdef ISWINDOWS_TRUE
|
|
||||||
input.erase(0, 1);
|
|
||||||
std::string os = "/";
|
|
||||||
std::string ns = "\\";
|
|
||||||
FindReplace(input, os, ns);
|
|
||||||
#endif
|
|
||||||
return input;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void FindReplace(std::string& line, std::string& oldString, std::string& newString) {
|
|
||||||
const size_t oldSize = oldString.length();
|
|
||||||
|
|
||||||
// do nothing if line is shorter than the string to find
|
|
||||||
if (oldSize > line.length()) return;
|
|
||||||
|
|
||||||
const size_t newSize = newString.length();
|
|
||||||
for (size_t pos = 0; ; pos += newSize) {
|
|
||||||
// Locate the substring to replace
|
|
||||||
pos = line.find(oldString, pos);
|
|
||||||
if (pos == std::string::npos) return;
|
|
||||||
if (oldSize == newSize) {
|
|
||||||
// if they're same size, use std::string::replace
|
|
||||||
line.replace(pos, oldSize, newString);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// if not same size, replace by erasing and inserting
|
|
||||||
line.erase(pos, oldSize);
|
|
||||||
line.insert(pos, newString);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool ctype_space(const char c, string adddelimiter)
|
|
||||||
{
|
|
||||||
if (c == ' ' || c == '\t' || c == '\r' || c == '\n' || c == 11)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (adddelimiter.find(c) != string::npos)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
string trim(string istring, string adddelimiter)
|
|
||||||
{
|
|
||||||
bool trimmed = false;
|
|
||||||
|
|
||||||
if (ctype_space(istring[istring.length() - 1], adddelimiter))
|
|
||||||
{
|
|
||||||
istring.erase(istring.length() - 1);
|
|
||||||
trimmed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ctype_space(istring[0], adddelimiter))
|
|
||||||
{
|
|
||||||
istring.erase(0, 1);
|
|
||||||
trimmed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((trimmed == false) || (istring.size() == 0))
|
|
||||||
{
|
|
||||||
return istring;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return trim(istring, adddelimiter);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t findDelimiterPos(string input, string delimiter)
|
|
||||||
{
|
|
||||||
size_t pos = std::string::npos;
|
|
||||||
size_t zw;
|
|
||||||
string akt_del;
|
|
||||||
|
|
||||||
for (int anz = 0; anz < delimiter.length(); ++anz)
|
|
||||||
{
|
|
||||||
akt_del = delimiter[anz];
|
|
||||||
if ((zw = input.find(akt_del)) != std::string::npos)
|
|
||||||
{
|
|
||||||
if (pos != std::string::npos)
|
|
||||||
{
|
|
||||||
if (zw < pos)
|
|
||||||
pos = zw;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
pos = zw;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return pos;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CopyFile(string input, string output)
|
|
||||||
{
|
|
||||||
input = FormatFileName(input);
|
|
||||||
output = FormatFileName(output);
|
|
||||||
|
|
||||||
char cTemp;
|
|
||||||
FILE* fpSourceFile = fopen(input.c_str(), "rb");
|
|
||||||
FILE* fpTargetFile = fopen(output.c_str(), "wb");
|
|
||||||
|
|
||||||
// Code Section
|
|
||||||
|
|
||||||
// Read From The Source File - "Copy"
|
|
||||||
while (fread(&cTemp, 1, 1, fpSourceFile) == 1)
|
|
||||||
{
|
|
||||||
// Write To The Target File - "Paste"
|
|
||||||
fwrite(&cTemp, 1, 1, fpTargetFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Close The Files
|
|
||||||
fclose(fpSourceFile);
|
|
||||||
fclose(fpTargetFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
string getFileType(string filename)
|
|
||||||
{
|
|
||||||
int lastpos = filename.find(".", 0);
|
|
||||||
int neu_pos;
|
|
||||||
while ((neu_pos = filename.find(".", lastpos + 1)) > -1)
|
|
||||||
{
|
|
||||||
lastpos = neu_pos;
|
|
||||||
}
|
|
||||||
|
|
||||||
string zw = filename.substr(lastpos + 1, filename.size() - lastpos);
|
|
||||||
|
|
||||||
return zw;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
string toUpper(string in)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < in.length(); ++i)
|
|
||||||
in[i] = toupper(in[i]);
|
|
||||||
|
|
||||||
return in;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
#include <string>
|
|
||||||
#include <fstream>
|
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
std::string FormatFileName(std::string input);
|
|
||||||
void FindReplace(std::string& line, std::string& oldString, std::string& newString);
|
|
||||||
|
|
||||||
void CopyFile(string input, string output);
|
|
||||||
|
|
||||||
size_t findDelimiterPos(string input, string delimiter);
|
|
||||||
//string trim(string istring);
|
|
||||||
string trim(string istring, string adddelimiter = "");
|
|
||||||
bool ctype_space(const char c, string adddelimiter);
|
|
||||||
|
|
||||||
string getFileType(string filename);
|
|
||||||
|
|
||||||
string toUpper(string in);
|
|
||||||
|
|
||||||
|
|
||||||
@@ -167,3 +167,9 @@ string toUpper(string in)
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CPU Temp
|
||||||
|
extern "C" uint8_t temprature_sens_read();
|
||||||
|
float temperatureRead()
|
||||||
|
{
|
||||||
|
return (temprature_sens_read() - 32) / 1.8;
|
||||||
|
}
|
||||||
|
|||||||
@@ -19,4 +19,4 @@ string getFileType(string filename);
|
|||||||
|
|
||||||
string toUpper(string in);
|
string toUpper(string in);
|
||||||
|
|
||||||
|
float temperatureRead();
|
||||||
|
|||||||
@@ -391,11 +391,11 @@ CImageBasis::CImageBasis(std::string _image)
|
|||||||
channels = 3;
|
channels = 3;
|
||||||
externalImage = false;
|
externalImage = false;
|
||||||
filename = _image;
|
filename = _image;
|
||||||
long freebefore = esp_get_free_heap_size();
|
// long freebefore = esp_get_free_heap_size();
|
||||||
|
|
||||||
rgb_image = stbi_load(_image.c_str(), &width, &height, &bpp, channels);
|
rgb_image = stbi_load(_image.c_str(), &width, &height, &bpp, channels);
|
||||||
if (rgb_image == NULL)
|
// if (rgb_image == NULL)
|
||||||
LogFile.WriteToFile("Image Load failed:" + _image + " FreeHeapSize before: " + to_string(freebefore) + " after: " + to_string(esp_get_free_heap_size()));
|
// LogFile.WriteToFile("Image Load failed:" + _image + " FreeHeapSize before: " + to_string(freebefore) + " after: " + to_string(esp_get_free_heap_size()));
|
||||||
// printf("CImageBasis after load\n");
|
// printf("CImageBasis after load\n");
|
||||||
// printf("w %d, h %d, b %d, c %d", this->width, this->height, this->bpp, this->channels);
|
// printf("w %d, h %d, b %d, c %d", this->width, this->height, this->bpp, this->channels);
|
||||||
}
|
}
|
||||||
@@ -528,8 +528,6 @@ void CAlignAndCutImage::CutAndSave(std::string _template1, int x1, int y1, int d
|
|||||||
int memsize = dx * dy * this->channels;
|
int memsize = dx * dy * this->channels;
|
||||||
uint8_t* odata = (unsigned char*)GET_MEMORY(memsize);
|
uint8_t* odata = (unsigned char*)GET_MEMORY(memsize);
|
||||||
|
|
||||||
|
|
||||||
int x_source, y_source;
|
|
||||||
stbi_uc* p_target;
|
stbi_uc* p_target;
|
||||||
stbi_uc* p_source;
|
stbi_uc* p_source;
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ void ClassLogFile::WriteToDedicatedFile(std::string _fn, std::string info, bool
|
|||||||
FILE* pFile;
|
FILE* pFile;
|
||||||
std::string zwtime;
|
std::string zwtime;
|
||||||
|
|
||||||
|
if (!doLogFile){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
pFile = fopen(_fn.c_str(), "a+");
|
pFile = fopen(_fn.c_str(), "a+");
|
||||||
|
|
||||||
if (_time)
|
if (_time)
|
||||||
@@ -30,6 +34,11 @@ void ClassLogFile::WriteToDedicatedFile(std::string _fn, std::string info, bool
|
|||||||
fclose(pFile);
|
fclose(pFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClassLogFile::SwitchOnOff(bool _doLogFile){
|
||||||
|
doLogFile = _doLogFile;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
void ClassLogFile::WriteToFile(std::string info, bool _time)
|
void ClassLogFile::WriteToFile(std::string info, bool _time)
|
||||||
{
|
{
|
||||||
WriteToDedicatedFile(logfile, info, _time);
|
WriteToDedicatedFile(logfile, info, _time);
|
||||||
@@ -37,5 +46,6 @@ void ClassLogFile::WriteToFile(std::string info, bool _time)
|
|||||||
|
|
||||||
ClassLogFile::ClassLogFile(std::string _logfile)
|
ClassLogFile::ClassLogFile(std::string _logfile)
|
||||||
{
|
{
|
||||||
logfile = _logfile;
|
logfile = _logfile;
|
||||||
|
doLogFile = true;
|
||||||
}
|
}
|
||||||
@@ -6,9 +6,12 @@ class ClassLogFile
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::string logfile;
|
std::string logfile;
|
||||||
|
bool doLogFile;
|
||||||
public:
|
public:
|
||||||
ClassLogFile(std::string _logfile);
|
ClassLogFile(std::string _logfile);
|
||||||
|
|
||||||
|
void SwitchOnOff(bool _doLogFile);
|
||||||
|
|
||||||
void WriteToFile(std::string info, bool _time = true);
|
void WriteToFile(std::string info, bool _time = true);
|
||||||
void WriteToDedicatedFile(std::string _fn, std::string info, bool _time = true);
|
void WriteToDedicatedFile(std::string _fn, std::string info, bool _time = true);
|
||||||
};
|
};
|
||||||
|
|||||||
82
code/lib/jomjol_mqtt/interface_mqtt.cpp
Normal file
82
code/lib/jomjol_mqtt/interface_mqtt.cpp
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
#include "interface_mqtt.h"
|
||||||
|
|
||||||
|
|
||||||
|
#include "esp_log.h"
|
||||||
|
#include "mqtt_client.h"
|
||||||
|
#include "ClassLogFile.h"
|
||||||
|
|
||||||
|
static const char *TAG = "interface_mqtt";
|
||||||
|
|
||||||
|
bool debugdetail = true;
|
||||||
|
|
||||||
|
// #define CONFIG_BROKER_URL "mqtt://192.168.178.43:1883"
|
||||||
|
|
||||||
|
esp_mqtt_event_id_t esp_mmqtt_ID = MQTT_EVENT_ANY;
|
||||||
|
|
||||||
|
bool mqtt_connected = false;
|
||||||
|
esp_mqtt_client_handle_t client = NULL;
|
||||||
|
|
||||||
|
void MQTTPublish(std::string _key, std::string _content){
|
||||||
|
if (client && mqtt_connected) {
|
||||||
|
int msg_id;
|
||||||
|
std::string zw;
|
||||||
|
msg_id = esp_mqtt_client_publish(client, _key.c_str(), _content.c_str(), 0, 1, 0);
|
||||||
|
zw = "sent publish successful in MQTTPublish, msg_id=" + std::to_string(msg_id) + ", " + _key + ", " + _content;
|
||||||
|
if (debugdetail) LogFile.WriteToFile(zw);
|
||||||
|
ESP_LOGI(TAG, "sent publish successful in MQTTPublish, msg_id=%d, %s, %s", msg_id, _key.c_str(), _content.c_str());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ESP_LOGI(TAG, "Problem with Publish, client=%d, mqtt_connected %d", (int) client, (int) mqtt_connected);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static esp_err_t mqtt_event_handler_cb(esp_mqtt_event_handle_t event)
|
||||||
|
{
|
||||||
|
switch (event->event_id) {
|
||||||
|
case MQTT_EVENT_CONNECTED:
|
||||||
|
ESP_LOGI(TAG, "MQTT_EVENT_CONNECTED");
|
||||||
|
mqtt_connected = true;
|
||||||
|
break;
|
||||||
|
case MQTT_EVENT_DISCONNECTED:
|
||||||
|
ESP_LOGI(TAG, "MQTT_EVENT_DISCONNECTED");
|
||||||
|
break;
|
||||||
|
case MQTT_EVENT_PUBLISHED:
|
||||||
|
ESP_LOGI(TAG, "MQTT_EVENT_PUBLISHED, msg_id=%d", event->msg_id);
|
||||||
|
break;
|
||||||
|
case MQTT_EVENT_DATA:
|
||||||
|
ESP_LOGI(TAG, "MQTT_EVENT_DATA");
|
||||||
|
printf("TOPIC=%.*s\r\n", event->topic_len, event->topic);
|
||||||
|
printf("DATA=%.*s\r\n", event->data_len, event->data);
|
||||||
|
break;
|
||||||
|
case MQTT_EVENT_ERROR:
|
||||||
|
ESP_LOGI(TAG, "MQTT_EVENT_ERROR");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ESP_LOGI(TAG, "Other event id:%d", event->event_id);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return ESP_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void mqtt_event_handler(void *handler_args, esp_event_base_t base, int32_t event_id, void *event_data) {
|
||||||
|
ESP_LOGD(TAG, "Event dispatched from event loop base=%s, event_id=%d", base, event_id);
|
||||||
|
mqtt_event_handler_cb((esp_mqtt_event_handle_t) event_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MQTTInit(std::string _mqttURI, std::string _clientid, std::string _user, std::string _password){
|
||||||
|
esp_mqtt_client_config_t mqtt_cfg = {
|
||||||
|
.uri = _mqttURI.c_str(),
|
||||||
|
.client_id = _clientid.c_str(),
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_user.length() && _password.length()){
|
||||||
|
mqtt_cfg.username = _user.c_str();
|
||||||
|
mqtt_cfg.password = _password.c_str();
|
||||||
|
printf("Connect to MQTT: %s, %s", mqtt_cfg.username, mqtt_cfg.password);
|
||||||
|
};
|
||||||
|
|
||||||
|
client = esp_mqtt_client_init(&mqtt_cfg);
|
||||||
|
esp_mqtt_client_register_event(client, esp_mmqtt_ID, mqtt_event_handler, client);
|
||||||
|
esp_mqtt_client_start(client);
|
||||||
|
}
|
||||||
4
code/lib/jomjol_mqtt/interface_mqtt.h
Normal file
4
code/lib/jomjol_mqtt/interface_mqtt.h
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#include <string>
|
||||||
|
|
||||||
|
void MQTTInit(std::string _mqttURI, std::string _clientid, std::string _user = "", std::string _password = "");
|
||||||
|
void MQTTPublish(std::string _key, std::string _content);
|
||||||
@@ -2,8 +2,12 @@
|
|||||||
|
|
||||||
#include "bitmap_image.hpp"
|
#include "bitmap_image.hpp"
|
||||||
|
|
||||||
|
#include "ClassLogFile.h"
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
bool debugdetailtflite = false;
|
||||||
|
|
||||||
float CTfLiteClass::GetOutputValue(int nr)
|
float CTfLiteClass::GetOutputValue(int nr)
|
||||||
{
|
{
|
||||||
TfLiteTensor* output2 = this->interpreter->output(0);
|
TfLiteTensor* output2 = this->interpreter->output(0);
|
||||||
@@ -109,7 +113,11 @@ void CTfLiteClass::Invoke()
|
|||||||
|
|
||||||
bool CTfLiteClass::LoadInputImage(std::string _fn)
|
bool CTfLiteClass::LoadInputImage(std::string _fn)
|
||||||
{
|
{
|
||||||
|
std::string zw = "ClassFlowAnalog::doNeuralNetwork nach Load Image: " + _fn;
|
||||||
|
// LogFile.WriteToFile(zw);
|
||||||
bitmap_image image(_fn);
|
bitmap_image image(_fn);
|
||||||
|
if (debugdetailtflite) LogFile.WriteToFile(zw);
|
||||||
|
|
||||||
unsigned int w = image.width();
|
unsigned int w = image.width();
|
||||||
unsigned int h = image.height();
|
unsigned int h = image.height();
|
||||||
unsigned char red, green, blue;
|
unsigned char red, green, blue;
|
||||||
@@ -135,6 +143,9 @@ bool CTfLiteClass::LoadInputImage(std::string _fn)
|
|||||||
// printf("BMP: %f %f %f\n", (float) red, (float) green, (float) blue);
|
// printf("BMP: %f %f %f\n", (float) red, (float) green, (float) blue);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (debugdetailtflite) LogFile.WriteToFile("Nach dem Laden in input");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ board_build.embed_files =
|
|||||||
;board_build.partitions = partitions_singleapp.csv
|
;board_build.partitions = partitions_singleapp.csv
|
||||||
board_build.partitions = partition.csv
|
board_build.partitions = partition.csv
|
||||||
|
|
||||||
lib_deps = jomjol_helper, connect_wlan, conversions, driver, sensors, jomjol_image_proc, jomjol_controlcamera, jomjol_flowcontroll, jomjol_tfliteclass, tfmicro, jomjol_fileserver_ota, jomjol_time_sntp, jomjol_logfile
|
lib_deps = jomjol_helper, connect_wlan, conversions, driver, sensors, jomjol_image_proc, jomjol_controlcamera, jomjol_flowcontroll, jomjol_tfliteclass, tfmicro, jomjol_fileserver_ota, jomjol_time_sntp, jomjol_logfile, jomjol_mqtt
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
|
|
||||||
debug_tool = esp-prog
|
debug_tool = esp-prog
|
||||||
|
|||||||
514
code/sdkconfig
514
code/sdkconfig
@@ -2,18 +2,44 @@
|
|||||||
# Automatically generated file. DO NOT EDIT.
|
# Automatically generated file. DO NOT EDIT.
|
||||||
# Espressif IoT Development Framework (ESP-IDF) Project Configuration
|
# Espressif IoT Development Framework (ESP-IDF) Project Configuration
|
||||||
#
|
#
|
||||||
CONFIG_IDF_TARGET_ESP32=y
|
CONFIG_IDF_CMAKE=y
|
||||||
CONFIG_IDF_TARGET="esp32"
|
CONFIG_IDF_TARGET="esp32"
|
||||||
|
CONFIG_IDF_TARGET_ESP32=y
|
||||||
CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000
|
CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000
|
||||||
|
|
||||||
#
|
#
|
||||||
# SDK tool configuration
|
# SDK tool configuration
|
||||||
#
|
#
|
||||||
CONFIG_SDK_TOOLPREFIX="xtensa-esp32-elf-"
|
CONFIG_SDK_TOOLPREFIX="xtensa-esp32-elf-"
|
||||||
|
# CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set
|
||||||
|
# end of SDK tool configuration
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build type
|
||||||
|
#
|
||||||
|
CONFIG_APP_BUILD_TYPE_APP_2NDBOOT=y
|
||||||
|
# CONFIG_APP_BUILD_TYPE_ELF_RAM is not set
|
||||||
|
CONFIG_APP_BUILD_GENERATE_BINARIES=y
|
||||||
|
CONFIG_APP_BUILD_BOOTLOADER=y
|
||||||
|
CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y
|
||||||
|
# end of Build type
|
||||||
|
|
||||||
|
#
|
||||||
|
# Application manager
|
||||||
|
#
|
||||||
CONFIG_APP_COMPILE_TIME_DATE=y
|
CONFIG_APP_COMPILE_TIME_DATE=y
|
||||||
# CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set
|
# CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set
|
||||||
# CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set
|
# CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set
|
||||||
CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16
|
CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16
|
||||||
|
# end of Application manager
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bootloader config
|
||||||
|
#
|
||||||
|
CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y
|
||||||
|
# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set
|
||||||
|
# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set
|
||||||
|
# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set
|
||||||
# CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set
|
# CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set
|
||||||
# CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set
|
# CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set
|
||||||
# CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set
|
# CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set
|
||||||
@@ -29,9 +55,22 @@ CONFIG_BOOTLOADER_WDT_ENABLE=y
|
|||||||
# CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set
|
# CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set
|
||||||
CONFIG_BOOTLOADER_WDT_TIME_MS=9000
|
CONFIG_BOOTLOADER_WDT_TIME_MS=9000
|
||||||
# CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set
|
# CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set
|
||||||
|
# CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not set
|
||||||
|
CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0
|
||||||
|
# CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set
|
||||||
|
# end of Bootloader config
|
||||||
|
|
||||||
|
#
|
||||||
|
# Security features
|
||||||
|
#
|
||||||
# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set
|
# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set
|
||||||
# CONFIG_SECURE_BOOT_ENABLED is not set
|
# CONFIG_SECURE_BOOT is not set
|
||||||
# CONFIG_SECURE_FLASH_ENC_ENABLED is not set
|
# CONFIG_SECURE_FLASH_ENC_ENABLED is not set
|
||||||
|
# end of Security features
|
||||||
|
|
||||||
|
#
|
||||||
|
# Serial flasher config
|
||||||
|
#
|
||||||
CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200
|
CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200
|
||||||
# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set
|
# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set
|
||||||
# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set
|
# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set
|
||||||
@@ -65,6 +104,11 @@ CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y
|
|||||||
# CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set
|
# CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set
|
||||||
CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200
|
CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200
|
||||||
CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
|
CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
|
||||||
|
# end of Serial flasher config
|
||||||
|
|
||||||
|
#
|
||||||
|
# Partition Table
|
||||||
|
#
|
||||||
CONFIG_PARTITION_TABLE_SINGLE_APP=y
|
CONFIG_PARTITION_TABLE_SINGLE_APP=y
|
||||||
# CONFIG_PARTITION_TABLE_TWO_OTA is not set
|
# CONFIG_PARTITION_TABLE_TWO_OTA is not set
|
||||||
# CONFIG_PARTITION_TABLE_CUSTOM is not set
|
# CONFIG_PARTITION_TABLE_CUSTOM is not set
|
||||||
@@ -72,51 +116,129 @@ CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
|
|||||||
CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv"
|
CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv"
|
||||||
CONFIG_PARTITION_TABLE_OFFSET=0x8000
|
CONFIG_PARTITION_TABLE_OFFSET=0x8000
|
||||||
CONFIG_PARTITION_TABLE_MD5=y
|
CONFIG_PARTITION_TABLE_MD5=y
|
||||||
|
# end of Partition Table
|
||||||
|
|
||||||
|
#
|
||||||
|
# Example Connection Configuration
|
||||||
|
#
|
||||||
CONFIG_EXAMPLE_CONNECT_WIFI=y
|
CONFIG_EXAMPLE_CONNECT_WIFI=y
|
||||||
# CONFIG_EXAMPLE_CONNECT_ETHERNET is not set
|
# CONFIG_EXAMPLE_CONNECT_ETHERNET is not set
|
||||||
CONFIG_EXAMPLE_WIFI_SSID="SSID"
|
CONFIG_EXAMPLE_WIFI_SSID="myssid"
|
||||||
CONFIG_EXAMPLE_WIFI_PASSWORD="passwd"
|
CONFIG_EXAMPLE_WIFI_PASSWORD="mypassword"
|
||||||
CONFIG_EXAMPLE_CONNECT_IPV6=y
|
CONFIG_EXAMPLE_CONNECT_IPV6=y
|
||||||
CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y
|
# end of Example Connection Configuration
|
||||||
# CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set
|
|
||||||
|
#
|
||||||
|
# Compiler options
|
||||||
|
#
|
||||||
|
CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y
|
||||||
|
# CONFIG_COMPILER_OPTIMIZATION_SIZE is not set
|
||||||
|
# CONFIG_COMPILER_OPTIMIZATION_PERF is not set
|
||||||
|
# CONFIG_COMPILER_OPTIMIZATION_NONE is not set
|
||||||
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y
|
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y
|
||||||
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set
|
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set
|
||||||
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set
|
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set
|
||||||
# CONFIG_COMPILER_CXX_EXCEPTIONS is not set
|
# CONFIG_COMPILER_CXX_EXCEPTIONS is not set
|
||||||
|
# CONFIG_COMPILER_CXX_RTTI is not set
|
||||||
CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y
|
CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y
|
||||||
# CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set
|
# CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set
|
||||||
# CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set
|
# CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set
|
||||||
# CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set
|
# CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set
|
||||||
# CONFIG_COMPILER_STACK_CHECK is not set
|
|
||||||
# CONFIG_COMPILER_WARN_WRITE_STRINGS is not set
|
# CONFIG_COMPILER_WARN_WRITE_STRINGS is not set
|
||||||
# CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set
|
# CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set
|
||||||
# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set
|
# end of Compiler options
|
||||||
CONFIG_ESP32_APPTRACE_DEST_NONE=y
|
|
||||||
# CONFIG_ESP32_APPTRACE_ENABLE is not set
|
#
|
||||||
CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y
|
# Component config
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Application Level Tracing
|
||||||
|
#
|
||||||
|
# CONFIG_APPTRACE_DEST_TRAX is not set
|
||||||
|
CONFIG_APPTRACE_DEST_NONE=y
|
||||||
|
CONFIG_APPTRACE_LOCK_ENABLE=y
|
||||||
|
# end of Application Level Tracing
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bluetooth
|
||||||
|
#
|
||||||
# CONFIG_BT_ENABLED is not set
|
# CONFIG_BT_ENABLED is not set
|
||||||
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
|
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0
|
||||||
# CONFIG_BTDM_CTRL_AUTO_LATENCY_EFF is not set
|
|
||||||
CONFIG_BTDM_CTRL_BLE_MAX_CONN_EFF=0
|
CONFIG_BTDM_CTRL_BLE_MAX_CONN_EFF=0
|
||||||
CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN_EFF=0
|
CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN_EFF=0
|
||||||
CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF=0
|
CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF=0
|
||||||
CONFIG_BTDM_CTRL_PINNED_TO_CORE=0
|
CONFIG_BTDM_CTRL_PINNED_TO_CORE=0
|
||||||
CONFIG_BTDM_BLE_SLEEP_CLOCK_ACCURACY_INDEX_EFF=1
|
CONFIG_BTDM_BLE_SLEEP_CLOCK_ACCURACY_INDEX_EFF=1
|
||||||
CONFIG_BT_RESERVE_DRAM=0
|
CONFIG_BT_RESERVE_DRAM=0
|
||||||
|
# end of Bluetooth
|
||||||
|
|
||||||
# CONFIG_BLE_MESH is not set
|
# CONFIG_BLE_MESH is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# CoAP Configuration
|
||||||
|
#
|
||||||
|
CONFIG_COAP_MBEDTLS_PSK=y
|
||||||
|
# CONFIG_COAP_MBEDTLS_PKI is not set
|
||||||
|
# CONFIG_COAP_MBEDTLS_DEBUG is not set
|
||||||
|
CONFIG_COAP_LOG_DEFAULT_LEVEL=0
|
||||||
|
# end of CoAP Configuration
|
||||||
|
|
||||||
|
#
|
||||||
|
# Driver configurations
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# ADC configuration
|
||||||
|
#
|
||||||
# CONFIG_ADC_FORCE_XPD_FSM is not set
|
# CONFIG_ADC_FORCE_XPD_FSM is not set
|
||||||
CONFIG_ADC_DISABLE_DAC=y
|
CONFIG_ADC_DISABLE_DAC=y
|
||||||
|
# end of ADC configuration
|
||||||
|
|
||||||
|
#
|
||||||
|
# SPI configuration
|
||||||
|
#
|
||||||
# CONFIG_SPI_MASTER_IN_IRAM is not set
|
# CONFIG_SPI_MASTER_IN_IRAM is not set
|
||||||
CONFIG_SPI_MASTER_ISR_IN_IRAM=y
|
CONFIG_SPI_MASTER_ISR_IN_IRAM=y
|
||||||
# CONFIG_SPI_SLAVE_IN_IRAM is not set
|
# CONFIG_SPI_SLAVE_IN_IRAM is not set
|
||||||
CONFIG_SPI_SLAVE_ISR_IN_IRAM=y
|
CONFIG_SPI_SLAVE_ISR_IN_IRAM=y
|
||||||
|
# end of SPI configuration
|
||||||
|
|
||||||
|
#
|
||||||
|
# UART configuration
|
||||||
|
#
|
||||||
|
# CONFIG_UART_ISR_IN_IRAM is not set
|
||||||
|
# end of UART configuration
|
||||||
|
|
||||||
|
#
|
||||||
|
# RTCIO configuration
|
||||||
|
#
|
||||||
|
CONFIG_RTCIO_SUPPORT_RTC_GPIO_DESC=y
|
||||||
|
# end of RTCIO configuration
|
||||||
|
# end of Driver configurations
|
||||||
|
|
||||||
|
#
|
||||||
|
# eFuse Bit Manager
|
||||||
|
#
|
||||||
# CONFIG_EFUSE_CUSTOM_TABLE is not set
|
# CONFIG_EFUSE_CUSTOM_TABLE is not set
|
||||||
# CONFIG_EFUSE_VIRTUAL is not set
|
# CONFIG_EFUSE_VIRTUAL is not set
|
||||||
# CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE is not set
|
# CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE is not set
|
||||||
CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y
|
CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y
|
||||||
# CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT is not set
|
# CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT is not set
|
||||||
CONFIG_EFUSE_MAX_BLK_LEN=192
|
CONFIG_EFUSE_MAX_BLK_LEN=192
|
||||||
|
# end of eFuse Bit Manager
|
||||||
|
|
||||||
|
#
|
||||||
|
# ESP-TLS
|
||||||
|
#
|
||||||
|
CONFIG_ESP_TLS_USING_MBEDTLS=y
|
||||||
# CONFIG_ESP_TLS_SERVER is not set
|
# CONFIG_ESP_TLS_SERVER is not set
|
||||||
|
# CONFIG_ESP_TLS_PSK_VERIFICATION is not set
|
||||||
|
# end of ESP-TLS
|
||||||
|
|
||||||
|
#
|
||||||
|
# ESP32-specific
|
||||||
|
#
|
||||||
CONFIG_ESP32_REV_MIN_0=y
|
CONFIG_ESP32_REV_MIN_0=y
|
||||||
# CONFIG_ESP32_REV_MIN_1 is not set
|
# CONFIG_ESP32_REV_MIN_1 is not set
|
||||||
# CONFIG_ESP32_REV_MIN_2 is not set
|
# CONFIG_ESP32_REV_MIN_2 is not set
|
||||||
@@ -128,34 +250,64 @@ CONFIG_ESP32_DEFAULT_CPU_FREQ_160=y
|
|||||||
# CONFIG_ESP32_DEFAULT_CPU_FREQ_240 is not set
|
# CONFIG_ESP32_DEFAULT_CPU_FREQ_240 is not set
|
||||||
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=160
|
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=160
|
||||||
CONFIG_ESP32_SPIRAM_SUPPORT=y
|
CONFIG_ESP32_SPIRAM_SUPPORT=y
|
||||||
CONFIG_SPIRAM_BOOT_INIT=y
|
|
||||||
# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set
|
#
|
||||||
# CONFIG_SPIRAM_USE_MEMMAP is not set
|
# SPI RAM config
|
||||||
# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set
|
#
|
||||||
CONFIG_SPIRAM_USE_MALLOC=y
|
|
||||||
CONFIG_SPIRAM_TYPE_AUTO=y
|
CONFIG_SPIRAM_TYPE_AUTO=y
|
||||||
# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set
|
# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set
|
||||||
# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set
|
# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set
|
||||||
CONFIG_SPIRAM_SIZE=-1
|
CONFIG_SPIRAM_SIZE=-1
|
||||||
CONFIG_SPIRAM_SPEED_40M=y
|
CONFIG_SPIRAM_SPEED_40M=y
|
||||||
|
CONFIG_SPIRAM=y
|
||||||
|
CONFIG_SPIRAM_BOOT_INIT=y
|
||||||
|
# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set
|
||||||
|
# CONFIG_SPIRAM_USE_MEMMAP is not set
|
||||||
|
# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set
|
||||||
|
CONFIG_SPIRAM_USE_MALLOC=y
|
||||||
CONFIG_SPIRAM_MEMTEST=y
|
CONFIG_SPIRAM_MEMTEST=y
|
||||||
CONFIG_SPIRAM_CACHE_WORKAROUND=y
|
|
||||||
CONFIG_SPIRAM_BANKSWITCH_ENABLE=y
|
|
||||||
CONFIG_SPIRAM_BANKSWITCH_RESERVE=8
|
|
||||||
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=16384
|
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=16384
|
||||||
# CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP is not set
|
# CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP is not set
|
||||||
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=32768
|
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=32768
|
||||||
# CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY is not set
|
|
||||||
# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set
|
# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set
|
||||||
|
CONFIG_SPIRAM_CACHE_WORKAROUND=y
|
||||||
|
|
||||||
|
#
|
||||||
|
# SPIRAM cache workaround debugging
|
||||||
|
#
|
||||||
|
CONFIG_SPIRAM_CACHE_WORKAROUND_STRATEGY_MEMW=y
|
||||||
|
# CONFIG_SPIRAM_CACHE_WORKAROUND_STRATEGY_DUPLDST is not set
|
||||||
|
# CONFIG_SPIRAM_CACHE_WORKAROUND_STRATEGY_NOPS is not set
|
||||||
|
# end of SPIRAM cache workaround debugging
|
||||||
|
|
||||||
|
CONFIG_SPIRAM_BANKSWITCH_ENABLE=y
|
||||||
|
CONFIG_SPIRAM_BANKSWITCH_RESERVE=8
|
||||||
|
# CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# PSRAM clock and cs IO for ESP32-DOWD
|
||||||
|
#
|
||||||
CONFIG_D0WD_PSRAM_CLK_IO=17
|
CONFIG_D0WD_PSRAM_CLK_IO=17
|
||||||
CONFIG_D0WD_PSRAM_CS_IO=16
|
CONFIG_D0WD_PSRAM_CS_IO=16
|
||||||
|
# end of PSRAM clock and cs IO for ESP32-DOWD
|
||||||
|
|
||||||
|
#
|
||||||
|
# PSRAM clock and cs IO for ESP32-D2WD
|
||||||
|
#
|
||||||
CONFIG_D2WD_PSRAM_CLK_IO=9
|
CONFIG_D2WD_PSRAM_CLK_IO=9
|
||||||
CONFIG_D2WD_PSRAM_CS_IO=10
|
CONFIG_D2WD_PSRAM_CS_IO=10
|
||||||
|
# end of PSRAM clock and cs IO for ESP32-D2WD
|
||||||
|
|
||||||
|
#
|
||||||
|
# PSRAM clock and cs IO for ESP32-PICO
|
||||||
|
#
|
||||||
CONFIG_PICO_PSRAM_CS_IO=10
|
CONFIG_PICO_PSRAM_CS_IO=10
|
||||||
|
# end of PSRAM clock and cs IO for ESP32-PICO
|
||||||
|
|
||||||
CONFIG_SPIRAM_SPIWP_SD3_PIN=7
|
CONFIG_SPIRAM_SPIWP_SD3_PIN=7
|
||||||
# CONFIG_SPIRAM_2T_MODE is not set
|
# CONFIG_SPIRAM_2T_MODE is not set
|
||||||
# CONFIG_ESP32_MEMMAP_TRACEMEM is not set
|
# end of SPI RAM config
|
||||||
# CONFIG_ESP32_MEMMAP_TRACEMEM_TWOBANKS is not set
|
|
||||||
# CONFIG_ESP32_TRAX is not set
|
# CONFIG_ESP32_TRAX is not set
|
||||||
CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0x0
|
CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0x0
|
||||||
# CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_TWO is not set
|
# CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_TWO is not set
|
||||||
@@ -168,7 +320,6 @@ CONFIG_ESP32_PANIC_PRINT_REBOOT=y
|
|||||||
# CONFIG_ESP32_PANIC_SILENT_REBOOT is not set
|
# CONFIG_ESP32_PANIC_SILENT_REBOOT is not set
|
||||||
# CONFIG_ESP32_PANIC_GDBSTUB is not set
|
# CONFIG_ESP32_PANIC_GDBSTUB is not set
|
||||||
CONFIG_ESP32_DEBUG_OCDAWARE=y
|
CONFIG_ESP32_DEBUG_OCDAWARE=y
|
||||||
CONFIG_ESP32_DEBUG_STUBS_ENABLE=y
|
|
||||||
CONFIG_ESP32_BROWNOUT_DET=y
|
CONFIG_ESP32_BROWNOUT_DET=y
|
||||||
CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_0=y
|
CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_0=y
|
||||||
# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_1 is not set
|
# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_1 is not set
|
||||||
@@ -189,7 +340,6 @@ CONFIG_ESP32_RTC_CLK_SRC_INT_RC=y
|
|||||||
# CONFIG_ESP32_RTC_CLK_SRC_EXT_OSC is not set
|
# CONFIG_ESP32_RTC_CLK_SRC_EXT_OSC is not set
|
||||||
# CONFIG_ESP32_RTC_CLK_SRC_INT_8MD256 is not set
|
# CONFIG_ESP32_RTC_CLK_SRC_INT_8MD256 is not set
|
||||||
CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024
|
CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024
|
||||||
CONFIG_ESP32_RTC_XTAL_CAL_RETRY=1
|
|
||||||
CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000
|
CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000
|
||||||
CONFIG_ESP32_XTAL_FREQ_40=y
|
CONFIG_ESP32_XTAL_FREQ_40=y
|
||||||
# CONFIG_ESP32_XTAL_FREQ_26 is not set
|
# CONFIG_ESP32_XTAL_FREQ_26 is not set
|
||||||
@@ -200,17 +350,34 @@ CONFIG_ESP32_XTAL_FREQ=40
|
|||||||
# CONFIG_ESP32_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set
|
# CONFIG_ESP32_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set
|
||||||
# CONFIG_ESP32_USE_FIXED_STATIC_RAM_SIZE is not set
|
# CONFIG_ESP32_USE_FIXED_STATIC_RAM_SIZE is not set
|
||||||
CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5
|
CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5
|
||||||
|
# end of ESP32-specific
|
||||||
|
|
||||||
|
#
|
||||||
|
# Power Management
|
||||||
|
#
|
||||||
# CONFIG_PM_ENABLE is not set
|
# CONFIG_PM_ENABLE is not set
|
||||||
|
# end of Power Management
|
||||||
|
|
||||||
|
#
|
||||||
|
# ADC-Calibration
|
||||||
|
#
|
||||||
CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y
|
CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y
|
||||||
CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y
|
CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y
|
||||||
CONFIG_ADC_CAL_LUT_ENABLE=y
|
CONFIG_ADC_CAL_LUT_ENABLE=y
|
||||||
|
# end of ADC-Calibration
|
||||||
|
|
||||||
|
#
|
||||||
|
# Common ESP-related
|
||||||
|
#
|
||||||
# CONFIG_ESP_TIMER_PROFILING is not set
|
# CONFIG_ESP_TIMER_PROFILING is not set
|
||||||
CONFIG_ESP_ERR_TO_NAME_LOOKUP=y
|
CONFIG_ESP_ERR_TO_NAME_LOOKUP=y
|
||||||
CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32
|
CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32
|
||||||
CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304
|
CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304
|
||||||
CONFIG_ESP_MAIN_TASK_STACK_SIZE=3584
|
CONFIG_ESP_MAIN_TASK_STACK_SIZE=3584
|
||||||
CONFIG_ESP_IPC_TASK_STACK_SIZE=1024
|
CONFIG_ESP_IPC_TASK_STACK_SIZE=1024
|
||||||
|
CONFIG_ESP_IPC_USES_CALLERS_PRIORITY=y
|
||||||
CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584
|
CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584
|
||||||
|
CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048
|
||||||
CONFIG_ESP_CONSOLE_UART_DEFAULT=y
|
CONFIG_ESP_CONSOLE_UART_DEFAULT=y
|
||||||
# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set
|
# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set
|
||||||
# CONFIG_ESP_CONSOLE_UART_NONE is not set
|
# CONFIG_ESP_CONSOLE_UART_NONE is not set
|
||||||
@@ -224,6 +391,13 @@ CONFIG_ESP_TASK_WDT=y
|
|||||||
CONFIG_ESP_TASK_WDT_TIMEOUT_S=3
|
CONFIG_ESP_TASK_WDT_TIMEOUT_S=3
|
||||||
CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=y
|
CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=y
|
||||||
CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=y
|
CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=y
|
||||||
|
# CONFIG_ESP_PANIC_HANDLER_IRAM is not set
|
||||||
|
# end of Common ESP-related
|
||||||
|
|
||||||
|
#
|
||||||
|
# Ethernet
|
||||||
|
#
|
||||||
|
CONFIG_ETH_ENABLED=y
|
||||||
CONFIG_ETH_USE_ESP32_EMAC=y
|
CONFIG_ETH_USE_ESP32_EMAC=y
|
||||||
CONFIG_ETH_PHY_INTERFACE_RMII=y
|
CONFIG_ETH_PHY_INTERFACE_RMII=y
|
||||||
# CONFIG_ETH_PHY_INTERFACE_MII is not set
|
# CONFIG_ETH_PHY_INTERFACE_MII is not set
|
||||||
@@ -235,18 +409,63 @@ CONFIG_ETH_DMA_RX_BUFFER_NUM=10
|
|||||||
CONFIG_ETH_DMA_TX_BUFFER_NUM=10
|
CONFIG_ETH_DMA_TX_BUFFER_NUM=10
|
||||||
CONFIG_ETH_USE_SPI_ETHERNET=y
|
CONFIG_ETH_USE_SPI_ETHERNET=y
|
||||||
CONFIG_ETH_SPI_ETHERNET_DM9051=y
|
CONFIG_ETH_SPI_ETHERNET_DM9051=y
|
||||||
|
# CONFIG_ETH_USE_OPENETH is not set
|
||||||
|
# end of Ethernet
|
||||||
|
|
||||||
|
#
|
||||||
|
# Event Loop Library
|
||||||
|
#
|
||||||
# CONFIG_ESP_EVENT_LOOP_PROFILING is not set
|
# CONFIG_ESP_EVENT_LOOP_PROFILING is not set
|
||||||
CONFIG_ESP_EVENT_POST_FROM_ISR=y
|
CONFIG_ESP_EVENT_POST_FROM_ISR=y
|
||||||
CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y
|
CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y
|
||||||
|
# end of Event Loop Library
|
||||||
|
|
||||||
|
#
|
||||||
|
# GDB Stub
|
||||||
|
#
|
||||||
|
# end of GDB Stub
|
||||||
|
|
||||||
|
#
|
||||||
|
# ESP HTTP client
|
||||||
|
#
|
||||||
CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y
|
CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y
|
||||||
# CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set
|
# CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set
|
||||||
CONFIG_HTTPD_MAX_REQ_HDR_LEN=512
|
# end of ESP HTTP client
|
||||||
CONFIG_HTTPD_MAX_URI_LEN=512
|
|
||||||
|
#
|
||||||
|
# HTTP Server
|
||||||
|
#
|
||||||
|
CONFIG_HTTPD_MAX_REQ_HDR_LEN=1024
|
||||||
|
CONFIG_HTTPD_MAX_URI_LEN=1024
|
||||||
CONFIG_HTTPD_ERR_RESP_NO_DELAY=y
|
CONFIG_HTTPD_ERR_RESP_NO_DELAY=y
|
||||||
CONFIG_HTTPD_PURGE_BUF_LEN=32
|
CONFIG_HTTPD_PURGE_BUF_LEN=32
|
||||||
# CONFIG_HTTPD_LOG_PURGE_DATA is not set
|
# CONFIG_HTTPD_LOG_PURGE_DATA is not set
|
||||||
|
# end of HTTP Server
|
||||||
|
|
||||||
|
#
|
||||||
|
# ESP HTTPS OTA
|
||||||
|
#
|
||||||
# CONFIG_OTA_ALLOW_HTTP is not set
|
# CONFIG_OTA_ALLOW_HTTP is not set
|
||||||
|
# end of ESP HTTPS OTA
|
||||||
|
|
||||||
|
#
|
||||||
|
# ESP HTTPS server
|
||||||
|
#
|
||||||
# CONFIG_ESP_HTTPS_SERVER_ENABLE is not set
|
# CONFIG_ESP_HTTPS_SERVER_ENABLE is not set
|
||||||
|
# end of ESP HTTPS server
|
||||||
|
|
||||||
|
#
|
||||||
|
# ESP NETIF Adapter
|
||||||
|
#
|
||||||
|
CONFIG_ESP_NETIF_IP_LOST_TIMER_INTERVAL=120
|
||||||
|
CONFIG_ESP_NETIF_TCPIP_LWIP=y
|
||||||
|
# CONFIG_ESP_NETIF_LOOPBACK is not set
|
||||||
|
CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER=y
|
||||||
|
# end of ESP NETIF Adapter
|
||||||
|
|
||||||
|
#
|
||||||
|
# Wi-Fi
|
||||||
|
#
|
||||||
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10
|
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10
|
||||||
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32
|
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32
|
||||||
CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=y
|
CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=y
|
||||||
@@ -266,14 +485,28 @@ CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32
|
|||||||
CONFIG_ESP32_WIFI_IRAM_OPT=y
|
CONFIG_ESP32_WIFI_IRAM_OPT=y
|
||||||
CONFIG_ESP32_WIFI_RX_IRAM_OPT=y
|
CONFIG_ESP32_WIFI_RX_IRAM_OPT=y
|
||||||
CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y
|
CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y
|
||||||
|
# end of Wi-Fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# PHY
|
||||||
|
#
|
||||||
CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y
|
CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y
|
||||||
# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set
|
# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set
|
||||||
CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20
|
CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20
|
||||||
CONFIG_ESP32_PHY_MAX_TX_POWER=20
|
CONFIG_ESP32_PHY_MAX_TX_POWER=20
|
||||||
|
# end of PHY
|
||||||
|
|
||||||
|
#
|
||||||
|
# Core dump
|
||||||
|
#
|
||||||
# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set
|
# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set
|
||||||
# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set
|
# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set
|
||||||
CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y
|
CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y
|
||||||
# CONFIG_ESP32_ENABLE_COREDUMP is not set
|
# end of Core dump
|
||||||
|
|
||||||
|
#
|
||||||
|
# FAT Filesystem support
|
||||||
|
#
|
||||||
# CONFIG_FATFS_CODEPAGE_DYNAMIC is not set
|
# CONFIG_FATFS_CODEPAGE_DYNAMIC is not set
|
||||||
CONFIG_FATFS_CODEPAGE_437=y
|
CONFIG_FATFS_CODEPAGE_437=y
|
||||||
# CONFIG_FATFS_CODEPAGE_720 is not set
|
# CONFIG_FATFS_CODEPAGE_720 is not set
|
||||||
@@ -308,11 +541,20 @@ CONFIG_FATFS_FS_LOCK=0
|
|||||||
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
|
||||||
|
# end of FAT Filesystem support
|
||||||
|
|
||||||
|
#
|
||||||
|
# Modbus configuration
|
||||||
|
#
|
||||||
|
CONFIG_FMB_COMM_MODE_RTU_EN=y
|
||||||
|
CONFIG_FMB_COMM_MODE_ASCII_EN=y
|
||||||
CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150
|
CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150
|
||||||
CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200
|
CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200
|
||||||
CONFIG_FMB_QUEUE_LENGTH=20
|
CONFIG_FMB_QUEUE_LENGTH=20
|
||||||
CONFIG_FMB_SERIAL_TASK_STACK_SIZE=2048
|
CONFIG_FMB_SERIAL_TASK_STACK_SIZE=2048
|
||||||
CONFIG_FMB_SERIAL_BUF_SIZE=256
|
CONFIG_FMB_SERIAL_BUF_SIZE=256
|
||||||
|
CONFIG_FMB_SERIAL_ASCII_BITS_PER_SYMB=8
|
||||||
|
CONFIG_FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS=1000
|
||||||
CONFIG_FMB_SERIAL_TASK_PRIO=10
|
CONFIG_FMB_SERIAL_TASK_PRIO=10
|
||||||
# CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT is not set
|
# CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT is not set
|
||||||
CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20
|
CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20
|
||||||
@@ -322,6 +564,12 @@ CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20
|
|||||||
CONFIG_FMB_TIMER_PORT_ENABLED=y
|
CONFIG_FMB_TIMER_PORT_ENABLED=y
|
||||||
CONFIG_FMB_TIMER_GROUP=0
|
CONFIG_FMB_TIMER_GROUP=0
|
||||||
CONFIG_FMB_TIMER_INDEX=0
|
CONFIG_FMB_TIMER_INDEX=0
|
||||||
|
# CONFIG_FMB_TIMER_ISR_IN_IRAM is not set
|
||||||
|
# end of Modbus configuration
|
||||||
|
|
||||||
|
#
|
||||||
|
# FreeRTOS
|
||||||
|
#
|
||||||
# CONFIG_FREERTOS_UNICORE is not set
|
# CONFIG_FREERTOS_UNICORE is not set
|
||||||
CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF
|
CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF
|
||||||
CONFIG_FREERTOS_CORETIMER_0=y
|
CONFIG_FREERTOS_CORETIMER_0=y
|
||||||
@@ -353,13 +601,35 @@ CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0
|
|||||||
CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y
|
CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y
|
||||||
CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y
|
CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y
|
||||||
# CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set
|
# CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set
|
||||||
|
CONFIG_FREERTOS_DEBUG_OCDAWARE=y
|
||||||
|
# end of FreeRTOS
|
||||||
|
|
||||||
|
#
|
||||||
|
# Heap memory debugging
|
||||||
|
#
|
||||||
CONFIG_HEAP_POISONING_DISABLED=y
|
CONFIG_HEAP_POISONING_DISABLED=y
|
||||||
# CONFIG_HEAP_POISONING_LIGHT is not set
|
# CONFIG_HEAP_POISONING_LIGHT is not set
|
||||||
# CONFIG_HEAP_POISONING_COMPREHENSIVE is not set
|
# CONFIG_HEAP_POISONING_COMPREHENSIVE is not set
|
||||||
CONFIG_HEAP_TRACING_OFF=y
|
CONFIG_HEAP_TRACING_OFF=y
|
||||||
# CONFIG_HEAP_TRACING_STANDALONE is not set
|
# CONFIG_HEAP_TRACING_STANDALONE is not set
|
||||||
# CONFIG_HEAP_TRACING_TOHOST is not set
|
# CONFIG_HEAP_TRACING_TOHOST is not set
|
||||||
# CONFIG_HEAP_TRACING is not set
|
# end of Heap memory debugging
|
||||||
|
|
||||||
|
#
|
||||||
|
# jsmn
|
||||||
|
#
|
||||||
|
# CONFIG_JSMN_PARENT_LINKS is not set
|
||||||
|
# CONFIG_JSMN_STRICT is not set
|
||||||
|
# end of jsmn
|
||||||
|
|
||||||
|
#
|
||||||
|
# libsodium
|
||||||
|
#
|
||||||
|
# end of libsodium
|
||||||
|
|
||||||
|
#
|
||||||
|
# Log output
|
||||||
|
#
|
||||||
# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set
|
# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set
|
||||||
# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set
|
# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set
|
||||||
# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set
|
# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set
|
||||||
@@ -368,15 +638,25 @@ CONFIG_LOG_DEFAULT_LEVEL_INFO=y
|
|||||||
# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set
|
# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set
|
||||||
CONFIG_LOG_DEFAULT_LEVEL=3
|
CONFIG_LOG_DEFAULT_LEVEL=3
|
||||||
CONFIG_LOG_COLORS=y
|
CONFIG_LOG_COLORS=y
|
||||||
|
CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y
|
||||||
|
# CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set
|
||||||
|
# end of Log output
|
||||||
|
|
||||||
|
#
|
||||||
|
# LWIP
|
||||||
|
#
|
||||||
CONFIG_LWIP_LOCAL_HOSTNAME="espressif"
|
CONFIG_LWIP_LOCAL_HOSTNAME="espressif"
|
||||||
|
CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
|
||||||
# CONFIG_LWIP_L2_TO_L3_COPY is not set
|
# CONFIG_LWIP_L2_TO_L3_COPY is not set
|
||||||
# CONFIG_LWIP_IRAM_OPTIMIZATION is not set
|
# CONFIG_LWIP_IRAM_OPTIMIZATION is not set
|
||||||
CONFIG_LWIP_TIMERS_ONDEMAND=y
|
CONFIG_LWIP_TIMERS_ONDEMAND=y
|
||||||
CONFIG_LWIP_MAX_SOCKETS=10
|
CONFIG_LWIP_MAX_SOCKETS=10
|
||||||
# CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set
|
# CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set
|
||||||
|
# CONFIG_LWIP_SO_LINGER is not set
|
||||||
CONFIG_LWIP_SO_REUSE=y
|
CONFIG_LWIP_SO_REUSE=y
|
||||||
CONFIG_LWIP_SO_REUSE_RXTOALL=y
|
CONFIG_LWIP_SO_REUSE_RXTOALL=y
|
||||||
# CONFIG_LWIP_SO_RCVBUF is not set
|
# CONFIG_LWIP_SO_RCVBUF is not set
|
||||||
|
# CONFIG_LWIP_NETBUF_RECVINFO is not set
|
||||||
CONFIG_LWIP_IP_FRAG=y
|
CONFIG_LWIP_IP_FRAG=y
|
||||||
# CONFIG_LWIP_IP_REASSEMBLY is not set
|
# CONFIG_LWIP_IP_REASSEMBLY is not set
|
||||||
# CONFIG_LWIP_STATS is not set
|
# CONFIG_LWIP_STATS is not set
|
||||||
@@ -386,39 +666,78 @@ CONFIG_LWIP_GARP_TMR_INTERVAL=60
|
|||||||
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32
|
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32
|
||||||
CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y
|
CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y
|
||||||
# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set
|
# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# DHCP server
|
||||||
|
#
|
||||||
CONFIG_LWIP_DHCPS_LEASE_UNIT=60
|
CONFIG_LWIP_DHCPS_LEASE_UNIT=60
|
||||||
CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8
|
CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8
|
||||||
|
# end of DHCP server
|
||||||
|
|
||||||
# CONFIG_LWIP_AUTOIP is not set
|
# CONFIG_LWIP_AUTOIP is not set
|
||||||
# CONFIG_LWIP_IPV6_AUTOCONFIG is not set
|
# CONFIG_LWIP_IPV6_AUTOCONFIG is not set
|
||||||
CONFIG_LWIP_NETIF_LOOPBACK=y
|
CONFIG_LWIP_NETIF_LOOPBACK=y
|
||||||
CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8
|
CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8
|
||||||
|
|
||||||
|
#
|
||||||
|
# TCP
|
||||||
|
#
|
||||||
CONFIG_LWIP_MAX_ACTIVE_TCP=16
|
CONFIG_LWIP_MAX_ACTIVE_TCP=16
|
||||||
CONFIG_LWIP_MAX_LISTENING_TCP=16
|
CONFIG_LWIP_MAX_LISTENING_TCP=16
|
||||||
CONFIG_LWIP_TCP_MAXRTX=12
|
CONFIG_LWIP_TCP_MAXRTX=12
|
||||||
CONFIG_LWIP_TCP_SYNMAXRTX=6
|
CONFIG_LWIP_TCP_SYNMAXRTX=6
|
||||||
CONFIG_LWIP_TCP_MSS=1440
|
CONFIG_LWIP_TCP_MSS=1440
|
||||||
|
CONFIG_LWIP_TCP_TMR_INTERVAL=250
|
||||||
CONFIG_LWIP_TCP_MSL=60000
|
CONFIG_LWIP_TCP_MSL=60000
|
||||||
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
|
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
|
||||||
CONFIG_LWIP_TCP_WND_DEFAULT=5744
|
CONFIG_LWIP_TCP_WND_DEFAULT=5744
|
||||||
CONFIG_LWIP_TCP_RECVMBOX_SIZE=6
|
CONFIG_LWIP_TCP_RECVMBOX_SIZE=6
|
||||||
CONFIG_LWIP_TCP_QUEUE_OOSEQ=y
|
CONFIG_LWIP_TCP_QUEUE_OOSEQ=y
|
||||||
|
# CONFIG_LWIP_TCP_SACK_OUT is not set
|
||||||
# CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set
|
# CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set
|
||||||
CONFIG_LWIP_TCP_OVERSIZE_MSS=y
|
CONFIG_LWIP_TCP_OVERSIZE_MSS=y
|
||||||
# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set
|
# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set
|
||||||
# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set
|
# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set
|
||||||
|
# end of TCP
|
||||||
|
|
||||||
|
#
|
||||||
|
# UDP
|
||||||
|
#
|
||||||
CONFIG_LWIP_MAX_UDP_PCBS=16
|
CONFIG_LWIP_MAX_UDP_PCBS=16
|
||||||
CONFIG_LWIP_UDP_RECVMBOX_SIZE=6
|
CONFIG_LWIP_UDP_RECVMBOX_SIZE=6
|
||||||
|
# end of UDP
|
||||||
|
|
||||||
CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072
|
CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072
|
||||||
CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y
|
CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y
|
||||||
# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set
|
# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set
|
||||||
# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set
|
# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set
|
||||||
CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF
|
CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF
|
||||||
# CONFIG_LWIP_PPP_SUPPORT is not set
|
# CONFIG_LWIP_PPP_SUPPORT is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# ICMP
|
||||||
|
#
|
||||||
# CONFIG_LWIP_MULTICAST_PING is not set
|
# CONFIG_LWIP_MULTICAST_PING is not set
|
||||||
# CONFIG_LWIP_BROADCAST_PING is not set
|
# CONFIG_LWIP_BROADCAST_PING is not set
|
||||||
|
# end of ICMP
|
||||||
|
|
||||||
|
#
|
||||||
|
# LWIP RAW API
|
||||||
|
#
|
||||||
CONFIG_LWIP_MAX_RAW_PCBS=16
|
CONFIG_LWIP_MAX_RAW_PCBS=16
|
||||||
|
# end of LWIP RAW API
|
||||||
|
|
||||||
|
#
|
||||||
|
# SNTP
|
||||||
|
#
|
||||||
CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1
|
CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1
|
||||||
CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000
|
CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000
|
||||||
|
# end of SNTP
|
||||||
|
# end of LWIP
|
||||||
|
|
||||||
|
#
|
||||||
|
# mbedTLS
|
||||||
|
#
|
||||||
CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
|
CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
|
||||||
# CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC is not set
|
# CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC is not set
|
||||||
# CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set
|
# CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set
|
||||||
@@ -441,6 +760,10 @@ CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y
|
|||||||
CONFIG_MBEDTLS_TLS_SERVER=y
|
CONFIG_MBEDTLS_TLS_SERVER=y
|
||||||
CONFIG_MBEDTLS_TLS_CLIENT=y
|
CONFIG_MBEDTLS_TLS_CLIENT=y
|
||||||
CONFIG_MBEDTLS_TLS_ENABLED=y
|
CONFIG_MBEDTLS_TLS_ENABLED=y
|
||||||
|
|
||||||
|
#
|
||||||
|
# TLS Key Exchange Methods
|
||||||
|
#
|
||||||
# CONFIG_MBEDTLS_PSK_MODES is not set
|
# CONFIG_MBEDTLS_PSK_MODES is not set
|
||||||
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y
|
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y
|
||||||
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y
|
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y
|
||||||
@@ -449,6 +772,8 @@ CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y
|
|||||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y
|
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y
|
||||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y
|
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y
|
||||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y
|
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y
|
||||||
|
# end of TLS Key Exchange Methods
|
||||||
|
|
||||||
CONFIG_MBEDTLS_SSL_RENEGOTIATION=y
|
CONFIG_MBEDTLS_SSL_RENEGOTIATION=y
|
||||||
# CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set
|
# CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set
|
||||||
CONFIG_MBEDTLS_SSL_PROTO_TLS1=y
|
CONFIG_MBEDTLS_SSL_PROTO_TLS1=y
|
||||||
@@ -458,6 +783,10 @@ CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y
|
|||||||
CONFIG_MBEDTLS_SSL_ALPN=y
|
CONFIG_MBEDTLS_SSL_ALPN=y
|
||||||
CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y
|
CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y
|
||||||
CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y
|
CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y
|
||||||
|
|
||||||
|
#
|
||||||
|
# Symmetric Ciphers
|
||||||
|
#
|
||||||
CONFIG_MBEDTLS_AES_C=y
|
CONFIG_MBEDTLS_AES_C=y
|
||||||
# CONFIG_MBEDTLS_CAMELLIA_C is not set
|
# CONFIG_MBEDTLS_CAMELLIA_C is not set
|
||||||
# CONFIG_MBEDTLS_DES_C is not set
|
# CONFIG_MBEDTLS_DES_C is not set
|
||||||
@@ -468,11 +797,19 @@ CONFIG_MBEDTLS_RC4_DISABLED=y
|
|||||||
# CONFIG_MBEDTLS_XTEA_C is not set
|
# CONFIG_MBEDTLS_XTEA_C is not set
|
||||||
CONFIG_MBEDTLS_CCM_C=y
|
CONFIG_MBEDTLS_CCM_C=y
|
||||||
CONFIG_MBEDTLS_GCM_C=y
|
CONFIG_MBEDTLS_GCM_C=y
|
||||||
|
# end of Symmetric Ciphers
|
||||||
|
|
||||||
# CONFIG_MBEDTLS_RIPEMD160_C is not set
|
# CONFIG_MBEDTLS_RIPEMD160_C is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Certificates
|
||||||
|
#
|
||||||
CONFIG_MBEDTLS_PEM_PARSE_C=y
|
CONFIG_MBEDTLS_PEM_PARSE_C=y
|
||||||
CONFIG_MBEDTLS_PEM_WRITE_C=y
|
CONFIG_MBEDTLS_PEM_WRITE_C=y
|
||||||
CONFIG_MBEDTLS_X509_CRL_PARSE_C=y
|
CONFIG_MBEDTLS_X509_CRL_PARSE_C=y
|
||||||
CONFIG_MBEDTLS_X509_CSR_PARSE_C=y
|
CONFIG_MBEDTLS_X509_CSR_PARSE_C=y
|
||||||
|
# end of Certificates
|
||||||
|
|
||||||
CONFIG_MBEDTLS_ECP_C=y
|
CONFIG_MBEDTLS_ECP_C=y
|
||||||
CONFIG_MBEDTLS_ECDH_C=y
|
CONFIG_MBEDTLS_ECDH_C=y
|
||||||
CONFIG_MBEDTLS_ECDSA_C=y
|
CONFIG_MBEDTLS_ECDSA_C=y
|
||||||
@@ -489,7 +826,25 @@ CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y
|
|||||||
CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y
|
CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y
|
||||||
CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y
|
CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y
|
||||||
CONFIG_MBEDTLS_ECP_NIST_OPTIM=y
|
CONFIG_MBEDTLS_ECP_NIST_OPTIM=y
|
||||||
|
# CONFIG_MBEDTLS_SECURITY_RISKS is not set
|
||||||
|
# end of mbedTLS
|
||||||
|
|
||||||
|
#
|
||||||
|
# mDNS
|
||||||
|
#
|
||||||
CONFIG_MDNS_MAX_SERVICES=10
|
CONFIG_MDNS_MAX_SERVICES=10
|
||||||
|
CONFIG_MDNS_TASK_PRIORITY=1
|
||||||
|
# CONFIG_MDNS_TASK_AFFINITY_NO_AFFINITY is not set
|
||||||
|
CONFIG_MDNS_TASK_AFFINITY_CPU0=y
|
||||||
|
# CONFIG_MDNS_TASK_AFFINITY_CPU1 is not set
|
||||||
|
CONFIG_MDNS_TASK_AFFINITY=0x0
|
||||||
|
CONFIG_MDNS_SERVICE_ADD_TIMEOUT_MS=2000
|
||||||
|
CONFIG_MDNS_TIMER_PERIOD_MS=100
|
||||||
|
# end of mDNS
|
||||||
|
|
||||||
|
#
|
||||||
|
# ESP-MQTT Configurations
|
||||||
|
#
|
||||||
CONFIG_MQTT_PROTOCOL_311=y
|
CONFIG_MQTT_PROTOCOL_311=y
|
||||||
CONFIG_MQTT_TRANSPORT_SSL=y
|
CONFIG_MQTT_TRANSPORT_SSL=y
|
||||||
CONFIG_MQTT_TRANSPORT_WEBSOCKET=y
|
CONFIG_MQTT_TRANSPORT_WEBSOCKET=y
|
||||||
@@ -497,6 +852,11 @@ CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y
|
|||||||
# CONFIG_MQTT_USE_CUSTOM_CONFIG is not set
|
# CONFIG_MQTT_USE_CUSTOM_CONFIG is not set
|
||||||
# CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED is not set
|
# CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED is not set
|
||||||
# CONFIG_MQTT_CUSTOM_OUTBOX is not set
|
# CONFIG_MQTT_CUSTOM_OUTBOX is not set
|
||||||
|
# end of ESP-MQTT Configurations
|
||||||
|
|
||||||
|
#
|
||||||
|
# Newlib
|
||||||
|
#
|
||||||
CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y
|
CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y
|
||||||
# CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set
|
# CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set
|
||||||
# CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set
|
# CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set
|
||||||
@@ -504,9 +864,24 @@ CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y
|
|||||||
# CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set
|
# CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set
|
||||||
CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y
|
CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y
|
||||||
# CONFIG_NEWLIB_NANO_FORMAT is not set
|
# CONFIG_NEWLIB_NANO_FORMAT is not set
|
||||||
|
# end of Newlib
|
||||||
|
|
||||||
|
#
|
||||||
|
# NVS
|
||||||
|
#
|
||||||
|
# end of NVS
|
||||||
|
|
||||||
|
#
|
||||||
|
# OpenSSL
|
||||||
|
#
|
||||||
# CONFIG_OPENSSL_DEBUG is not set
|
# CONFIG_OPENSSL_DEBUG is not set
|
||||||
# CONFIG_OPENSSL_ASSERT_DO_NOTHING is not set
|
# CONFIG_OPENSSL_ASSERT_DO_NOTHING is not set
|
||||||
CONFIG_OPENSSL_ASSERT_EXIT=y
|
CONFIG_OPENSSL_ASSERT_EXIT=y
|
||||||
|
# end of OpenSSL
|
||||||
|
|
||||||
|
#
|
||||||
|
# PThreads
|
||||||
|
#
|
||||||
CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5
|
CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5
|
||||||
CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072
|
CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072
|
||||||
CONFIG_PTHREAD_STACK_MIN=768
|
CONFIG_PTHREAD_STACK_MIN=768
|
||||||
@@ -515,6 +890,11 @@ CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY=y
|
|||||||
# CONFIG_PTHREAD_DEFAULT_CORE_1 is not set
|
# CONFIG_PTHREAD_DEFAULT_CORE_1 is not set
|
||||||
CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1
|
CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1
|
||||||
CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread"
|
CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread"
|
||||||
|
# end of PThreads
|
||||||
|
|
||||||
|
#
|
||||||
|
# SPI Flash driver
|
||||||
|
#
|
||||||
# CONFIG_SPI_FLASH_VERIFY_WRITE is not set
|
# CONFIG_SPI_FLASH_VERIFY_WRITE is not set
|
||||||
# CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set
|
# CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set
|
||||||
CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y
|
CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y
|
||||||
@@ -522,47 +902,108 @@ CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y
|
|||||||
# CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set
|
# CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set
|
||||||
# CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set
|
# CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set
|
||||||
# CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set
|
# CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set
|
||||||
|
# CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set
|
||||||
|
CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y
|
||||||
|
CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20
|
||||||
|
CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1
|
||||||
|
|
||||||
|
#
|
||||||
|
# Auto-detect flash chips
|
||||||
|
#
|
||||||
CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y
|
CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y
|
||||||
CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y
|
CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y
|
||||||
|
# end of Auto-detect flash chips
|
||||||
|
# end of SPI Flash driver
|
||||||
|
|
||||||
|
#
|
||||||
|
# SPIFFS Configuration
|
||||||
|
#
|
||||||
CONFIG_SPIFFS_MAX_PARTITIONS=3
|
CONFIG_SPIFFS_MAX_PARTITIONS=3
|
||||||
|
|
||||||
|
#
|
||||||
|
# SPIFFS Cache Configuration
|
||||||
|
#
|
||||||
CONFIG_SPIFFS_CACHE=y
|
CONFIG_SPIFFS_CACHE=y
|
||||||
CONFIG_SPIFFS_CACHE_WR=y
|
CONFIG_SPIFFS_CACHE_WR=y
|
||||||
# CONFIG_SPIFFS_CACHE_STATS is not set
|
# CONFIG_SPIFFS_CACHE_STATS is not set
|
||||||
|
# end of SPIFFS Cache Configuration
|
||||||
|
|
||||||
CONFIG_SPIFFS_PAGE_CHECK=y
|
CONFIG_SPIFFS_PAGE_CHECK=y
|
||||||
CONFIG_SPIFFS_GC_MAX_RUNS=10
|
CONFIG_SPIFFS_GC_MAX_RUNS=10
|
||||||
# CONFIG_SPIFFS_GC_STATS is not set
|
# CONFIG_SPIFFS_GC_STATS is not set
|
||||||
CONFIG_SPIFFS_PAGE_SIZE=256
|
CONFIG_SPIFFS_PAGE_SIZE=256
|
||||||
CONFIG_SPIFFS_OBJ_NAME_LEN=32
|
CONFIG_SPIFFS_OBJ_NAME_LEN=32
|
||||||
|
# CONFIG_SPIFFS_FOLLOW_SYMLINKS is not set
|
||||||
CONFIG_SPIFFS_USE_MAGIC=y
|
CONFIG_SPIFFS_USE_MAGIC=y
|
||||||
CONFIG_SPIFFS_USE_MAGIC_LENGTH=y
|
CONFIG_SPIFFS_USE_MAGIC_LENGTH=y
|
||||||
CONFIG_SPIFFS_META_LENGTH=4
|
CONFIG_SPIFFS_META_LENGTH=4
|
||||||
CONFIG_SPIFFS_USE_MTIME=y
|
CONFIG_SPIFFS_USE_MTIME=y
|
||||||
|
|
||||||
|
#
|
||||||
|
# Debug Configuration
|
||||||
|
#
|
||||||
# CONFIG_SPIFFS_DBG is not set
|
# CONFIG_SPIFFS_DBG is not set
|
||||||
# CONFIG_SPIFFS_API_DBG is not set
|
# CONFIG_SPIFFS_API_DBG is not set
|
||||||
# CONFIG_SPIFFS_GC_DBG is not set
|
# CONFIG_SPIFFS_GC_DBG is not set
|
||||||
# CONFIG_SPIFFS_CACHE_DBG is not set
|
# CONFIG_SPIFFS_CACHE_DBG is not set
|
||||||
# CONFIG_SPIFFS_CHECK_DBG is not set
|
# CONFIG_SPIFFS_CHECK_DBG is not set
|
||||||
# CONFIG_SPIFFS_TEST_VISUALISATION is not set
|
# CONFIG_SPIFFS_TEST_VISUALISATION is not set
|
||||||
CONFIG_NETIF_IP_LOST_TIMER_INTERVAL=120
|
# end of Debug Configuration
|
||||||
CONFIG_TCPIP_LWIP=y
|
# end of SPIFFS Configuration
|
||||||
|
|
||||||
|
#
|
||||||
|
# Unity unit testing library
|
||||||
|
#
|
||||||
CONFIG_UNITY_ENABLE_FLOAT=y
|
CONFIG_UNITY_ENABLE_FLOAT=y
|
||||||
CONFIG_UNITY_ENABLE_DOUBLE=y
|
CONFIG_UNITY_ENABLE_DOUBLE=y
|
||||||
# CONFIG_UNITY_ENABLE_COLOR is not set
|
# CONFIG_UNITY_ENABLE_COLOR is not set
|
||||||
CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y
|
CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y
|
||||||
# CONFIG_UNITY_ENABLE_FIXTURE is not set
|
# CONFIG_UNITY_ENABLE_FIXTURE is not set
|
||||||
# CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL is not set
|
# CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL is not set
|
||||||
|
# end of Unity unit testing library
|
||||||
|
|
||||||
|
#
|
||||||
|
# Virtual file system
|
||||||
|
#
|
||||||
CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y
|
CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y
|
||||||
CONFIG_VFS_SUPPORT_TERMIOS=y
|
CONFIG_VFS_SUPPORT_TERMIOS=y
|
||||||
|
|
||||||
|
#
|
||||||
|
# Host File System I/O (Semihosting)
|
||||||
|
#
|
||||||
CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1
|
CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1
|
||||||
CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128
|
CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128
|
||||||
|
# end of Host File System I/O (Semihosting)
|
||||||
|
# end of Virtual file system
|
||||||
|
|
||||||
|
#
|
||||||
|
# Wear Levelling
|
||||||
|
#
|
||||||
# CONFIG_WL_SECTOR_SIZE_512 is not set
|
# CONFIG_WL_SECTOR_SIZE_512 is not set
|
||||||
CONFIG_WL_SECTOR_SIZE_4096=y
|
CONFIG_WL_SECTOR_SIZE_4096=y
|
||||||
CONFIG_WL_SECTOR_SIZE=4096
|
CONFIG_WL_SECTOR_SIZE=4096
|
||||||
|
# end of Wear Levelling
|
||||||
|
|
||||||
|
#
|
||||||
|
# Wi-Fi Provisioning Manager
|
||||||
|
#
|
||||||
CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16
|
CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16
|
||||||
CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30
|
CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30
|
||||||
|
# end of Wi-Fi Provisioning Manager
|
||||||
|
|
||||||
|
#
|
||||||
|
# Supplicant
|
||||||
|
#
|
||||||
CONFIG_WPA_MBEDTLS_CRYPTO=y
|
CONFIG_WPA_MBEDTLS_CRYPTO=y
|
||||||
# CONFIG_WPA_TLS_V12 is not set
|
# CONFIG_WPA_TLS_V12 is not set
|
||||||
|
# end of Supplicant
|
||||||
|
# end of Component config
|
||||||
|
|
||||||
|
#
|
||||||
|
# Compatibility options
|
||||||
|
#
|
||||||
# CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set
|
# CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set
|
||||||
|
# end of Compatibility options
|
||||||
|
|
||||||
# Deprecated options for backward compatibility
|
# Deprecated options for backward compatibility
|
||||||
CONFIG_TOOLPREFIX="xtensa-esp32-elf-"
|
CONFIG_TOOLPREFIX="xtensa-esp32-elf-"
|
||||||
@@ -588,8 +1029,8 @@ CONFIG_MONITOR_BAUD_115200B=y
|
|||||||
# CONFIG_MONITOR_BAUD_OTHER is not set
|
# CONFIG_MONITOR_BAUD_OTHER is not set
|
||||||
CONFIG_MONITOR_BAUD_OTHER_VAL=115200
|
CONFIG_MONITOR_BAUD_OTHER_VAL=115200
|
||||||
CONFIG_MONITOR_BAUD=115200
|
CONFIG_MONITOR_BAUD=115200
|
||||||
CONFIG_OPTIMIZATION_LEVEL_DEBUG=y
|
CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y
|
||||||
# CONFIG_OPTIMIZATION_LEVEL_RELEASE is not set
|
# CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set
|
||||||
CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y
|
CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y
|
||||||
# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set
|
# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set
|
||||||
# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set
|
# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set
|
||||||
@@ -598,9 +1039,11 @@ CONFIG_STACK_CHECK_NONE=y
|
|||||||
# CONFIG_STACK_CHECK_NORM is not set
|
# CONFIG_STACK_CHECK_NORM is not set
|
||||||
# CONFIG_STACK_CHECK_STRONG is not set
|
# CONFIG_STACK_CHECK_STRONG is not set
|
||||||
# CONFIG_STACK_CHECK_ALL is not set
|
# CONFIG_STACK_CHECK_ALL is not set
|
||||||
# CONFIG_STACK_CHECK is not set
|
|
||||||
# CONFIG_WARN_WRITE_STRINGS is not set
|
# CONFIG_WARN_WRITE_STRINGS is not set
|
||||||
# CONFIG_DISABLE_GCC8_WARNINGS is not set
|
# CONFIG_DISABLE_GCC8_WARNINGS is not set
|
||||||
|
# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set
|
||||||
|
CONFIG_ESP32_APPTRACE_DEST_NONE=y
|
||||||
|
CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y
|
||||||
CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=0
|
CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=0
|
||||||
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=0
|
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=0
|
||||||
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0
|
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0
|
||||||
@@ -608,8 +1051,6 @@ CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0
|
|||||||
CONFIG_ADC2_DISABLE_DAC=y
|
CONFIG_ADC2_DISABLE_DAC=y
|
||||||
CONFIG_SPIRAM_SUPPORT=y
|
CONFIG_SPIRAM_SUPPORT=y
|
||||||
# CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST is not set
|
# CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST is not set
|
||||||
# CONFIG_MEMMAP_TRACEMEM is not set
|
|
||||||
# CONFIG_MEMMAP_TRACEMEM_TWOBANKS is not set
|
|
||||||
CONFIG_TRACEMEM_RESERVE_DRAM=0x0
|
CONFIG_TRACEMEM_RESERVE_DRAM=0x0
|
||||||
# CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set
|
# CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set
|
||||||
CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y
|
CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y
|
||||||
@@ -709,7 +1150,6 @@ CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread"
|
|||||||
CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y
|
CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y
|
||||||
# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set
|
# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set
|
||||||
# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set
|
# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set
|
||||||
CONFIG_IP_LOST_TIMER_INTERVAL=120
|
|
||||||
CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y
|
CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y
|
||||||
CONFIG_SUPPORT_TERMIOS=y
|
CONFIG_SUPPORT_TERMIOS=y
|
||||||
# End of deprecated options
|
# End of deprecated options
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,61 @@
|
|||||||
# This file was automatically generated for projects
|
# This file was automatically generated for projects
|
||||||
# without default 'CMakeLists.txt' file.
|
# without default 'CMakeLists.txt' file.
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
##################################################################
|
||||||
|
execute_process(COMMAND git log --pretty=format:'%h' -n 1
|
||||||
|
OUTPUT_VARIABLE GIT_REV
|
||||||
|
ERROR_QUIET)
|
||||||
|
|
||||||
|
string(TIMESTAMP BUILD_TIME "%Y-%m-%d %H:%M")
|
||||||
|
|
||||||
|
# Check whether we got any revision (which isn't
|
||||||
|
# always the case, e.g. when someone downloaded a zip
|
||||||
|
# file from Github instead of a checkout)
|
||||||
|
if ("${GIT_REV}" STREQUAL "")
|
||||||
|
set(GIT_REV "N/A")
|
||||||
|
set(GIT_DIFF "")
|
||||||
|
set(GIT_TAG "N/A")
|
||||||
|
set(GIT_BRANCH "N/A")
|
||||||
|
else()
|
||||||
|
execute_process(
|
||||||
|
COMMAND bash -c "git diff --quiet --exit-code || echo +"
|
||||||
|
OUTPUT_VARIABLE GIT_DIFF)
|
||||||
|
execute_process(
|
||||||
|
COMMAND git describe --exact-match --tags
|
||||||
|
OUTPUT_VARIABLE GIT_TAG ERROR_QUIET)
|
||||||
|
execute_process(
|
||||||
|
COMMAND git rev-parse --abbrev-ref HEAD
|
||||||
|
OUTPUT_VARIABLE GIT_BRANCH)
|
||||||
|
|
||||||
|
string(STRIP "${GIT_REV}" GIT_REV)
|
||||||
|
string(SUBSTRING "${GIT_REV}" 1 7 GIT_REV)
|
||||||
|
string(STRIP "${GIT_DIFF}" GIT_DIFF)
|
||||||
|
string(STRIP "${GIT_TAG}" GIT_TAG)
|
||||||
|
string(STRIP "${GIT_BRANCH}" GIT_BRANCH)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(VERSION "const char* GIT_REV=\"${GIT_REV}${GIT_DIFF}\";
|
||||||
|
const char* GIT_TAG=\"${GIT_TAG}\";
|
||||||
|
const char* GIT_BRANCH=\"${GIT_BRANCH}\";
|
||||||
|
const char* BUILD_TIME=\"${BUILD_TIME}\";")
|
||||||
|
|
||||||
|
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/version.cpp)
|
||||||
|
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/version.cpp VERSION_)
|
||||||
|
else()
|
||||||
|
set(VERSION_ "")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT "${VERSION}" STREQUAL "${VERSION_}")
|
||||||
|
file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/version.cpp "${VERSION}")
|
||||||
|
endif()
|
||||||
|
#######################################################################
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
|
||||||
FILE(GLOB_RECURSE app_sources ${CMAKE_SOURCE_DIR}/src/*.*)
|
FILE(GLOB_RECURSE app_sources ${CMAKE_SOURCE_DIR}/src/*.*)
|
||||||
|
|
||||||
# idf_component_register(SRCS ${app_sources})
|
# idf_component_register(SRCS ${app_sources})
|
||||||
|
|
||||||
idf_component_register(SRCS ${app_sources}
|
idf_component_register(SRCS ${app_sources}
|
||||||
INCLUDE_DIRS "."
|
INCLUDE_DIRS ".")
|
||||||
EMBED_FILES "favicon.ico")
|
|
||||||
|
|||||||
24
code/src/gitversion.cmake
Normal file
24
code/src/gitversion.cmake
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# cmake/gitversion.cmake
|
||||||
|
cmake_minimum_required(VERSION 3.0.0)
|
||||||
|
|
||||||
|
message(STATUS "Resolving GIT Version")
|
||||||
|
|
||||||
|
set(_build_version "unknown")
|
||||||
|
|
||||||
|
find_package(Git)
|
||||||
|
if(GIT_FOUND)
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
|
||||||
|
WORKING_DIRECTORY "${local_dir}"
|
||||||
|
OUTPUT_VARIABLE _build_version
|
||||||
|
ERROR_QUIET
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
message( STATUS "GIT hash: ${_build_version}")
|
||||||
|
else()
|
||||||
|
message(STATUS "GIT not found")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
string(TIMESTAMP _time_stamp)
|
||||||
|
|
||||||
|
configure_file(${local_dir}/cmake/gitversion.h.in ${output_dir}/gitversion.h @ONLY)
|
||||||
@@ -6,61 +6,25 @@
|
|||||||
#include "driver/gpio.h"
|
#include "driver/gpio.h"
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
|
// SD-Card ////////////////////
|
||||||
|
#include "nvs_flash.h"
|
||||||
|
#include "esp_vfs_fat.h"
|
||||||
|
#include "sdmmc_cmd.h"
|
||||||
|
#include "driver/sdmmc_host.h"
|
||||||
|
#include "driver/sdmmc_defs.h"
|
||||||
|
///////////////////////////////
|
||||||
|
|
||||||
#include "ClassLogFile.h"
|
#include "ClassLogFile.h"
|
||||||
|
|
||||||
|
|
||||||
//#include "esp_wifi.h"
|
|
||||||
//#include "protocol_examples_common.h"
|
|
||||||
|
|
||||||
#include "connect_wlan.h"
|
#include "connect_wlan.h"
|
||||||
|
|
||||||
#include <esp_http_server.h>
|
|
||||||
|
|
||||||
#include "lwip/err.h"
|
|
||||||
#include "lwip/sockets.h"
|
|
||||||
#include "lwip/sys.h"
|
|
||||||
#include "lwip/netdb.h"
|
|
||||||
#include "lwip/dns.h"
|
|
||||||
|
|
||||||
|
|
||||||
#include <sys/unistd.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include "esp_log.h"
|
|
||||||
#include "esp_system.h"
|
|
||||||
#include "esp_event.h"
|
|
||||||
#include "esp_event_loop.h"
|
|
||||||
#include "nvs_flash.h"
|
|
||||||
#include "esp_err.h"
|
|
||||||
#include "esp_vfs_fat.h"
|
|
||||||
#include "driver/sdmmc_host.h"
|
|
||||||
#include "driver/sdmmc_defs.h"
|
|
||||||
#include "sdmmc_cmd.h"
|
|
||||||
|
|
||||||
#include "server_main.h"
|
|
||||||
#include "server_camera.h"
|
|
||||||
#include "server_tflite.h"
|
#include "server_tflite.h"
|
||||||
#include "server_file.h"
|
#include "server_file.h"
|
||||||
#include "server_ota.h"
|
#include "server_ota.h"
|
||||||
#include "time_sntp.h"
|
#include "time_sntp.h"
|
||||||
#include "ClassControllCamera.h"
|
#include "ClassControllCamera.h"
|
||||||
|
|
||||||
|
|
||||||
#include "freertos/FreeRTOS.h"
|
|
||||||
#include "freertos/task.h"
|
|
||||||
#include "freertos/event_groups.h"
|
|
||||||
|
|
||||||
#include "freertos/FreeRTOS.h"
|
|
||||||
|
|
||||||
// SD-Card
|
|
||||||
#include "nvs_flash.h"
|
|
||||||
#include "esp_vfs_fat.h"
|
|
||||||
#include "sdmmc_cmd.h"
|
|
||||||
|
|
||||||
#include "server_main.h"
|
#include "server_main.h"
|
||||||
#include "server_camera.h"
|
#include "server_camera.h"
|
||||||
#include "ClassControllCamera.h"
|
|
||||||
#include "connect_wlan.h"
|
|
||||||
#include "time_sntp.h"
|
|
||||||
|
|
||||||
static const char *TAGMAIN = "connect_wlan_main";
|
static const char *TAGMAIN = "connect_wlan_main";
|
||||||
|
|
||||||
@@ -106,28 +70,31 @@ extern "C" void app_main()
|
|||||||
{
|
{
|
||||||
printf("Do Reset Camera\n");
|
printf("Do Reset Camera\n");
|
||||||
PowerResetCamera();
|
PowerResetCamera();
|
||||||
// LogFile.WriteToFile("Startsequence 01");
|
|
||||||
Init_NVS_SDCard();
|
Init_NVS_SDCard();
|
||||||
LogFile.WriteToFile("Startsequence 02");
|
// LogFile.WriteToFile("Startsequence 02");
|
||||||
CheckOTAUpdate();
|
CheckOTAUpdate();
|
||||||
LogFile.WriteToFile("Startsequence 03");
|
// LogFile.WriteToFile("Startsequence 03");
|
||||||
std::string ssid = "";
|
std::string ssid = "";
|
||||||
std::string password = "";
|
std::string password = "";
|
||||||
LoadWlanFromFile("/sdcard/wlan.ini", ssid, password);
|
std::string hostname = "";
|
||||||
LogFile.WriteToFile("Startsequence 04");
|
|
||||||
printf("WLan: %s, %s\n", ssid.c_str(), password.c_str());
|
LoadWlanFromFile("/sdcard/wlan.ini", ssid, password, hostname);
|
||||||
|
// LogFile.WriteToFile("Startsequence 04");
|
||||||
|
printf("To use WLan: %s, %s\n", ssid.c_str(), password.c_str());
|
||||||
|
printf("To set Hostename: %s\n", hostname.c_str());
|
||||||
|
|
||||||
initialise_wifi(ssid, password);
|
initialise_wifi(ssid, password, hostname);
|
||||||
LogFile.WriteToFile("Startsequence 05");
|
// LogFile.WriteToFile("Startsequence 05");
|
||||||
|
|
||||||
TickType_t xDelay;
|
TickType_t xDelay;
|
||||||
xDelay = 2000 / portTICK_PERIOD_MS;
|
xDelay = 2000 / portTICK_PERIOD_MS;
|
||||||
printf("Autoflow: sleep for : %ldms\n", (long) xDelay);
|
printf("Autoflow: sleep for : %ldms\n", (long) xDelay);
|
||||||
LogFile.WriteToFile("Startsequence 06");
|
// LogFile.WriteToFile("Startsequence 06");
|
||||||
vTaskDelay( xDelay );
|
vTaskDelay( xDelay );
|
||||||
LogFile.WriteToFile("Startsequence 07");
|
// LogFile.WriteToFile("Startsequence 07");
|
||||||
setup_time();
|
setup_time();
|
||||||
LogFile.WriteToFile("======================== Main Started ================================");
|
LogFile.WriteToFile("============================== Main Started =======================================");
|
||||||
|
LogFile.SwitchOnOff(false);
|
||||||
|
|
||||||
std::string zw = gettimestring("%Y%m%d-%H%M%S");
|
std::string zw = gettimestring("%Y%m%d-%H%M%S");
|
||||||
printf("time %s\n", zw.c_str());
|
printf("time %s\n", zw.c_str());
|
||||||
|
|||||||
@@ -3,9 +3,14 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "server_help.h"
|
#include "server_help.h"
|
||||||
|
#include "ClassLogFile.h"
|
||||||
|
|
||||||
#include "time_sntp.h"
|
#include "time_sntp.h"
|
||||||
|
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
#include "esp_wifi.h"
|
||||||
|
|
||||||
|
|
||||||
httpd_handle_t server = NULL;
|
httpd_handle_t server = NULL;
|
||||||
|
|
||||||
@@ -14,80 +19,81 @@ std::string starttime = "";
|
|||||||
|
|
||||||
|
|
||||||
/* An HTTP GET handler */
|
/* An HTTP GET handler */
|
||||||
esp_err_t hello_get_handler(httpd_req_t *req)
|
esp_err_t info_get_handler(httpd_req_t *req)
|
||||||
{
|
{
|
||||||
char* buf;
|
LogFile.WriteToFile("info_get_handler");
|
||||||
size_t buf_len;
|
char _query[200];
|
||||||
printf("req uri:\n");
|
char _valuechar[30];
|
||||||
printf(req->uri);
|
std::string _task;
|
||||||
printf("\n");
|
|
||||||
|
|
||||||
/* Get header value string length and allocate memory for length + 1,
|
if (httpd_req_get_url_query_str(req, _query, 200) == ESP_OK)
|
||||||
* extra byte for null termination */
|
{
|
||||||
buf_len = httpd_req_get_hdr_value_len(req, "Host") + 1;
|
printf("Query: "); printf(_query); printf("\n");
|
||||||
if (buf_len > 1) {
|
|
||||||
buf = (char*) malloc(buf_len);
|
if (httpd_query_key_value(_query, "type", _valuechar, 30) == ESP_OK)
|
||||||
/* Copy null terminated value string into buffer */
|
{
|
||||||
if (httpd_req_get_hdr_value_str(req, "Host", buf, buf_len) == ESP_OK) {
|
printf("type is found"); printf(_valuechar); printf("\n");
|
||||||
ESP_LOGI(TAG, "Found header => Host: %s", buf);
|
_task = std::string(_valuechar);
|
||||||
}
|
}
|
||||||
free(buf);
|
};
|
||||||
|
|
||||||
|
if (_task.compare("GitBranch") == 0)
|
||||||
|
{
|
||||||
|
std::string zw;
|
||||||
|
zw = std::string(libfive_git_branch());
|
||||||
|
httpd_resp_sendstr_chunk(req, zw.c_str());
|
||||||
|
httpd_resp_sendstr_chunk(req, NULL);
|
||||||
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
buf_len = httpd_req_get_hdr_value_len(req, "Test-Header-2") + 1;
|
|
||||||
if (buf_len > 1) {
|
if (_task.compare("GitTag") == 0)
|
||||||
buf = (char*) malloc(buf_len);
|
{
|
||||||
if (httpd_req_get_hdr_value_str(req, "Test-Header-2", buf, buf_len) == ESP_OK) {
|
std::string zw;
|
||||||
ESP_LOGI(TAG, "Found header => Test-Header-2: %s", buf);
|
zw = std::string(libfive_git_version());
|
||||||
}
|
httpd_resp_sendstr_chunk(req, zw.c_str());
|
||||||
free(buf);
|
httpd_resp_sendstr_chunk(req, NULL);
|
||||||
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
buf_len = httpd_req_get_hdr_value_len(req, "Test-Header-1") + 1;
|
|
||||||
if (buf_len > 1) {
|
|
||||||
buf = (char*) malloc(buf_len);
|
if (_task.compare("GitRevision") == 0)
|
||||||
if (httpd_req_get_hdr_value_str(req, "Test-Header-1", buf, buf_len) == ESP_OK) {
|
{
|
||||||
ESP_LOGI(TAG, "Found header => Test-Header-1: %s", buf);
|
std::string zw;
|
||||||
}
|
zw = std::string(libfive_git_revision());
|
||||||
free(buf);
|
httpd_resp_sendstr_chunk(req, zw.c_str());
|
||||||
|
httpd_resp_sendstr_chunk(req, NULL);
|
||||||
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read URL query string length and allocate memory for length + 1,
|
if (_task.compare("BuildTime") == 0)
|
||||||
* extra byte for null termination */
|
{
|
||||||
buf_len = httpd_req_get_url_query_len(req) + 1;
|
std::string zw;
|
||||||
if (buf_len > 1) {
|
zw = std::string(build_time());
|
||||||
buf = (char*) malloc(buf_len);
|
httpd_resp_sendstr_chunk(req, zw.c_str());
|
||||||
if (httpd_req_get_url_query_str(req, buf, buf_len) == ESP_OK) {
|
httpd_resp_sendstr_chunk(req, NULL);
|
||||||
ESP_LOGI(TAG, "Found URL query => %s", buf);
|
return ESP_OK;
|
||||||
char param[32];
|
|
||||||
/* Get value of expected key from query string */
|
|
||||||
if (httpd_query_key_value(buf, "query1", param, sizeof(param)) == ESP_OK) {
|
|
||||||
ESP_LOGI(TAG, "Found URL query parameter => query1=%s", param);
|
|
||||||
}
|
|
||||||
if (httpd_query_key_value(buf, "query3", param, sizeof(param)) == ESP_OK) {
|
|
||||||
ESP_LOGI(TAG, "Found URL query parameter => query3=%s", param);
|
|
||||||
}
|
|
||||||
if (httpd_query_key_value(buf, "query2", param, sizeof(param)) == ESP_OK) {
|
|
||||||
ESP_LOGI(TAG, "Found URL query parameter => query2=%s", param);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
free(buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set some custom headers */
|
if (_task.compare("GitBaseBranch") == 0)
|
||||||
httpd_resp_set_hdr(req, "Custom-Header-1", "Custom-Value-1");
|
{
|
||||||
httpd_resp_set_hdr(req, "Custom-Header-2", "Custom-Value-2");
|
std::string zw;
|
||||||
|
zw = std::string(git_base_branch());
|
||||||
/* Send response with custom headers and body set as the
|
httpd_resp_sendstr_chunk(req, zw.c_str());
|
||||||
* string passed in user context*/
|
httpd_resp_sendstr_chunk(req, NULL);
|
||||||
const char* resp_str = (const char*) req->user_ctx;
|
return ESP_OK;
|
||||||
httpd_resp_send(req, resp_str, strlen(resp_str));
|
|
||||||
|
|
||||||
/* After sending the HTTP response the old HTTP request
|
|
||||||
* headers are lost. Check if HTTP request headers can be read now. */
|
|
||||||
if (httpd_req_get_hdr_value_len(req, "Host") == 0) {
|
|
||||||
ESP_LOGI(TAG, "Request headers lost");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_task.compare("HTMLVersion") == 0)
|
||||||
|
{
|
||||||
|
std::string zw;
|
||||||
|
zw = std::string(getHTMLversion());
|
||||||
|
httpd_resp_sendstr_chunk(req, zw.c_str());
|
||||||
|
httpd_resp_sendstr_chunk(req, NULL);
|
||||||
|
return ESP_OK;
|
||||||
|
}
|
||||||
|
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,8 +165,6 @@ esp_err_t hello_main_handler(httpd_req_t *req)
|
|||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
esp_err_t img_tmp_handler(httpd_req_t *req)
|
esp_err_t img_tmp_handler(httpd_req_t *req)
|
||||||
{
|
{
|
||||||
char filepath[50];
|
char filepath[50];
|
||||||
@@ -201,10 +205,64 @@ esp_err_t img_tmp_handler(httpd_req_t *req)
|
|||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
esp_err_t sysinfo_handler(httpd_req_t *req)
|
||||||
|
{
|
||||||
|
const char* resp_str;
|
||||||
|
std::string zw;
|
||||||
|
std::string cputemp = std::to_string(temperatureRead());
|
||||||
|
std::string gitversion = libfive_git_version();
|
||||||
|
std::string buildtime = build_time();
|
||||||
|
std::string gitbranch = libfive_git_branch();
|
||||||
|
std::string gitbasebranch = git_base_branch();
|
||||||
|
std::string htmlversion = getHTMLversion();
|
||||||
|
|
||||||
|
tcpip_adapter_ip_info_t ip_info;
|
||||||
|
ESP_ERROR_CHECK(tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_STA, &ip_info));
|
||||||
|
const char *hostname;
|
||||||
|
ESP_ERROR_CHECK(tcpip_adapter_get_hostname(TCPIP_ADAPTER_IF_STA, &hostname));
|
||||||
|
|
||||||
|
zw = "[\
|
||||||
|
{\
|
||||||
|
\"firmware\" : \"" + gitversion + "\",\
|
||||||
|
\"buildtime\" : \"" + buildtime + "\",\
|
||||||
|
\"gitbranch\" : \"" + gitbranch + "\",\
|
||||||
|
\"gitbasebranch\" : \"" + gitbasebranch + "\",\
|
||||||
|
\"html\" : \"" + htmlversion + "\",\
|
||||||
|
\"cputemp\" : \"" + cputemp + "\",\
|
||||||
|
\"hostname\" : \"" + hostname + "\",\
|
||||||
|
\"IPv4\" : \"" + ip4addr_ntoa(&ip_info.ip) + "\"\
|
||||||
|
}\
|
||||||
|
]";
|
||||||
|
|
||||||
|
|
||||||
|
resp_str = zw.c_str();
|
||||||
|
|
||||||
|
httpd_resp_set_type(req, "application/json");
|
||||||
|
httpd_resp_send(req, resp_str, strlen(resp_str));
|
||||||
|
/* Respond with an empty chunk to signal HTTP response completion */
|
||||||
|
httpd_resp_send_chunk(req, NULL, 0);
|
||||||
|
|
||||||
|
return ESP_OK;
|
||||||
|
}
|
||||||
|
|
||||||
void register_server_main_uri(httpd_handle_t server, const char *base_path)
|
void register_server_main_uri(httpd_handle_t server, const char *base_path)
|
||||||
{
|
{
|
||||||
|
httpd_uri_t info_get_handle = {
|
||||||
|
.uri = "/version", // Match all URIs of type /path/to/file
|
||||||
|
.method = HTTP_GET,
|
||||||
|
.handler = info_get_handler,
|
||||||
|
.user_ctx = (void*) base_path // Pass server data as context
|
||||||
|
};
|
||||||
|
httpd_register_uri_handler(server, &info_get_handle);
|
||||||
|
|
||||||
|
httpd_uri_t sysinfo_handle = {
|
||||||
|
.uri = "/sysinfo", // Match all URIs of type /path/to/file
|
||||||
|
.method = HTTP_GET,
|
||||||
|
.handler = sysinfo_handler,
|
||||||
|
.user_ctx = (void*) base_path // Pass server data as context
|
||||||
|
};
|
||||||
|
httpd_register_uri_handler(server, &sysinfo_handle);
|
||||||
|
|
||||||
httpd_uri_t starttime_tmp_handle = {
|
httpd_uri_t starttime_tmp_handle = {
|
||||||
.uri = "/starttime", // Match all URIs of type /path/to/file
|
.uri = "/starttime", // Match all URIs of type /path/to/file
|
||||||
.method = HTTP_GET,
|
.method = HTTP_GET,
|
||||||
@@ -230,6 +288,7 @@ void register_server_main_uri(httpd_handle_t server, const char *base_path)
|
|||||||
.user_ctx = (void*) base_path // Pass server data as context
|
.user_ctx = (void*) base_path // Pass server data as context
|
||||||
};
|
};
|
||||||
httpd_register_uri_handler(server, &main_rest_handle);
|
httpd_register_uri_handler(server, &main_rest_handle);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -260,14 +319,6 @@ httpd_handle_t start_webserver(void)
|
|||||||
// config.uri_match_fn = NULL;
|
// config.uri_match_fn = NULL;
|
||||||
config.uri_match_fn = httpd_uri_match_wildcard;
|
config.uri_match_fn = httpd_uri_match_wildcard;
|
||||||
|
|
||||||
|
|
||||||
httpd_uri_t hll = {};
|
|
||||||
hll.uri = "/hello";
|
|
||||||
hll.method = HTTP_GET;
|
|
||||||
hll.handler = hello_get_handler;
|
|
||||||
hll.user_ctx = (void*) "Hello World!";
|
|
||||||
|
|
||||||
|
|
||||||
starttime = gettimestring("%Y%m%d-%H%M%S");
|
starttime = gettimestring("%Y%m%d-%H%M%S");
|
||||||
|
|
||||||
// Start the httpd server
|
// Start the httpd server
|
||||||
@@ -275,7 +326,6 @@ httpd_handle_t start_webserver(void)
|
|||||||
if (httpd_start(&server, &config) == ESP_OK) {
|
if (httpd_start(&server, &config) == ESP_OK) {
|
||||||
// Set URI handlers
|
// Set URI handlers
|
||||||
ESP_LOGI(TAG, "Registering URI handlers");
|
ESP_LOGI(TAG, "Registering URI handlers");
|
||||||
httpd_register_uri_handler(server, &hll);
|
|
||||||
return server;
|
return server;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -410,7 +410,6 @@ esp_err_t handler_prevalue(httpd_req_t *req)
|
|||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void task_autodoFlow(void *pvParameter)
|
void task_autodoFlow(void *pvParameter)
|
||||||
{
|
{
|
||||||
int64_t fr_start, fr_delta_ms;
|
int64_t fr_start, fr_delta_ms;
|
||||||
@@ -436,7 +435,14 @@ void task_autodoFlow(void *pvParameter)
|
|||||||
doflow();
|
doflow();
|
||||||
}
|
}
|
||||||
|
|
||||||
LogFile.WriteToFile("task_autodoFlow - round done");
|
LogFile.WriteToFile("task_autodoFlow - round done");
|
||||||
|
//CPU Temp
|
||||||
|
float cputmp = temperatureRead();
|
||||||
|
std::stringstream stream;
|
||||||
|
stream << std::fixed << std::setprecision(1) << cputmp;
|
||||||
|
string zwtemp = "CPU Temperature: " + stream.str();
|
||||||
|
LogFile.WriteToFile(zwtemp);
|
||||||
|
printf("CPU Temperature: %.2f\n", cputmp);
|
||||||
fr_delta_ms = (esp_timer_get_time() - fr_start) / 1000;
|
fr_delta_ms = (esp_timer_get_time() - fr_start) / 1000;
|
||||||
const TickType_t xDelay = (auto_intervall - fr_delta_ms) / portTICK_PERIOD_MS;
|
const TickType_t xDelay = (auto_intervall - fr_delta_ms) / portTICK_PERIOD_MS;
|
||||||
printf("Autoflow: sleep for : %ldms\n", (long) xDelay);
|
printf("Autoflow: sleep for : %ldms\n", (long) xDelay);
|
||||||
@@ -484,5 +490,6 @@ void register_server_tflite_uri(httpd_handle_t server)
|
|||||||
camuri.uri = "/wasserzaehler.html";
|
camuri.uri = "/wasserzaehler.html";
|
||||||
camuri.handler = handler_wasserzaehler;
|
camuri.handler = handler_wasserzaehler;
|
||||||
camuri.user_ctx = (void*) "Wasserzaehler";
|
camuri.user_ctx = (void*) "Wasserzaehler";
|
||||||
httpd_register_uri_handler(server, &camuri);
|
httpd_register_uri_handler(server, &camuri);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
4
code/src/version.cpp
Normal file
4
code/src/version.cpp
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
const char* GIT_REV="2614481";
|
||||||
|
const char* GIT_TAG="";
|
||||||
|
const char* GIT_BRANCH="master";
|
||||||
|
const char* BUILD_TIME="2020-10-14 18:40";
|
||||||
62
code/src/version.h
Normal file
62
code/src/version.h
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
// These variables are autogenerated and compiled
|
||||||
|
// into the library by the version.cmake script
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
extern const char* GIT_TAG;
|
||||||
|
extern const char* GIT_REV;
|
||||||
|
extern const char* GIT_BRANCH;
|
||||||
|
extern const char* BUILD_TIME;
|
||||||
|
}
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <string.h>
|
||||||
|
#include "Helper.h"
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
|
const char* GIT_BASE_BRANCH = "master - v3.0.0 - 2020-10-14";
|
||||||
|
|
||||||
|
|
||||||
|
const char* git_base_branch(void)
|
||||||
|
{
|
||||||
|
return GIT_BASE_BRANCH;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const char* build_time(void)
|
||||||
|
{
|
||||||
|
return BUILD_TIME;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* libfive_git_version(void)
|
||||||
|
{
|
||||||
|
return GIT_TAG;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* libfive_git_revision(void)
|
||||||
|
{
|
||||||
|
return GIT_REV;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* libfive_git_branch(void)
|
||||||
|
{
|
||||||
|
return GIT_BRANCH;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string getHTMLversion(void){
|
||||||
|
|
||||||
|
string line = "";
|
||||||
|
|
||||||
|
FILE* pFile;
|
||||||
|
string fn = FormatFileName("/sdcard/html/version.txt");
|
||||||
|
pFile = fopen(fn.c_str(), "r");
|
||||||
|
|
||||||
|
if (pFile == NULL)
|
||||||
|
return std::string("NAN");
|
||||||
|
|
||||||
|
char zw[1024];
|
||||||
|
fgets(zw, 1024, pFile);
|
||||||
|
line = std::string(trim(zw));
|
||||||
|
fclose(pFile);
|
||||||
|
|
||||||
|
return line;
|
||||||
|
}
|
||||||
4
code/version.cpp
Normal file
4
code/version.cpp
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
const char* GIT_REV="2614481";
|
||||||
|
const char* GIT_TAG="";
|
||||||
|
const char* GIT_BRANCH="master";
|
||||||
|
const char* BUILD_TIME="2020-10-14 18:40";
|
||||||
BIN
firmware/.DS_Store
vendored
Normal file
BIN
firmware/.DS_Store
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
sd-card/.DS_Store
vendored
Normal file
BIN
sd-card/.DS_Store
vendored
Normal file
Binary file not shown.
Binary file not shown.
@@ -11,9 +11,9 @@ InitalRotate=180
|
|||||||
SearchFieldX = 20
|
SearchFieldX = 20
|
||||||
SearchFieldY = 20
|
SearchFieldY = 20
|
||||||
|
|
||||||
|
|
||||||
[Digits]
|
[Digits]
|
||||||
;Model=/config/dig0622.tfl
|
Model=/config/dig0640s3.tflite
|
||||||
Model=/config/dig0630s3.tflite
|
|
||||||
LogImageLocation = /log/digit
|
LogImageLocation = /log/digit
|
||||||
ModelInputSize 20, 32
|
ModelInputSize 20, 32
|
||||||
digit1, 306, 120, 37, 67
|
digit1, 306, 120, 37, 67
|
||||||
@@ -21,7 +21,6 @@ digit2, 355, 120, 37, 67
|
|||||||
digit3, 404, 120, 37, 67
|
digit3, 404, 120, 37, 67
|
||||||
|
|
||||||
[Analog]
|
[Analog]
|
||||||
;Model=/config/ana0622.tfl
|
|
||||||
Model=/config/ana0630s2.tflite
|
Model=/config/ana0630s2.tflite
|
||||||
LogImageLocation = /log/analog
|
LogImageLocation = /log/analog
|
||||||
ModelInputSize 32, 32
|
ModelInputSize 32, 32
|
||||||
@@ -31,16 +30,26 @@ analog3, 294, 369, 92, 92
|
|||||||
analog4, 168, 326, 92, 92
|
analog4, 168, 326, 92, 92
|
||||||
|
|
||||||
[PostProcessing]
|
[PostProcessing]
|
||||||
|
DecimalShift = 0
|
||||||
PreValueUse = True
|
PreValueUse = True
|
||||||
PreValueAgeStartup = 30
|
PreValueAgeStartup = 30
|
||||||
AllowNegativeRates = False
|
AllowNegativeRates = False
|
||||||
MaxRateValue = 0.1
|
MaxRateValue = 0.1
|
||||||
ErrorMessage = True
|
ErrorMessage = True
|
||||||
CheckDigitIncreaseConsistency = True
|
CheckDigitIncreaseConsistency = False
|
||||||
|
|
||||||
|
;[MQTT]
|
||||||
|
;Uri = mqtt://IP-MQTT-SERVER:1883
|
||||||
|
;Topic = watermeter/readout
|
||||||
|
;ClientID = wasser
|
||||||
|
;user = USERNAME
|
||||||
|
;password = PASSWORD
|
||||||
|
|
||||||
[AutoTimer]
|
[AutoTimer]
|
||||||
AutoStart= True
|
AutoStart= True
|
||||||
Intervall = 4.85
|
Intervall = 4.85
|
||||||
|
|
||||||
|
[Debug]
|
||||||
|
Logfile = False
|
||||||
|
|
||||||
[Ende]
|
[Ende]
|
||||||
Binary file not shown.
Binary file not shown.
BIN
sd-card/config/dig0640s3.tflite
Normal file
BIN
sd-card/config/dig0640s3.tflite
Normal file
Binary file not shown.
@@ -1,101 +1,98 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8"/>
|
<title>Make Alignment</title>
|
||||||
<title>Make Alignment</title>
|
<meta charset="utf-8"/>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
h1 {font-size: 2em;}
|
||||||
|
h2 {font-size: 1.5em; margin-block-start: 0.0em; margin-block-end: 0.2em;}
|
||||||
|
h3 {font-size: 1.2em;}
|
||||||
|
p {font-size: 1em;}
|
||||||
|
|
||||||
|
input[type=number] {
|
||||||
|
width: 100px;
|
||||||
|
margin-right: 10px;
|
||||||
|
padding: 3px 5px;
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=text] {
|
||||||
|
padding: 3px 5px;
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
padding: 3px 5px;
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
font-size: 16px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
padding: 5px 10px;
|
||||||
|
width: 210px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<div class="body-content" style="font-family: arial">
|
<body style="font-family: arial; padding: 0px 10px;">
|
||||||
|
|
||||||
<div id="createrefernce">
|
<h2>Define Alignment Structure in Reference Image</h2>
|
||||||
<div style="padding-left: 30px">
|
|
||||||
<h3>Define Alignment Structure in Reference Image</h3>
|
|
||||||
|
|
||||||
<div style="padding-left: 30px">
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<canvas id="canvas" crossorigin></canvas>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<select id="index" name="reference" onchange="ChangeSelection()">
|
|
||||||
<option value="0" selected>Reference 0</option>
|
|
||||||
<option value="1" >Reference 1</option>
|
|
||||||
</select>
|
|
||||||
Storage path/name: <input type="text" name="name" id="name">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<td>
|
<table>
|
||||||
<table>
|
<tr>
|
||||||
<tr>
|
<td><canvas id="canvas" crossorigin></canvas></td>
|
||||||
<td>
|
</tr>
|
||||||
x: <input type="number" name="refx" id="refx" step=1 onchange="valuemanualchanged()">
|
</table>
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
dx: <input type="number" name="refdx" id="refdx" step=1 onchange="valuemanualchanged()">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
y: <input type="number" name="refy" id="refy" step=1 onchange="valuemanualchanged()">
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
dy: <input type="number" name="refdy" id="refdy" step=1 onchange="valuemanualchanged()">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<input type="button" value="Update Reference" onclick="CutOutReference()">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Original Image
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
Reference Image
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<img id="img_ref_org" src = "/img_tmp/ref_zw_org.jpg">
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<img id="img_ref" src = "/img_tmp/ref_zw.jpg">
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="button" id="enhancecontrast" value="Enhance Contrast" onclick="EnhanceContrast()">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<input type="submit" name="saveroi" onclick="SaveToConfig()" value="Save to Config.ini">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="./gethost.js"></script>
|
<table>
|
||||||
<script type="text/javascript" src="./readconfig.js"></script>
|
<tr>
|
||||||
|
<td>Select Reference:
|
||||||
|
<select id="index" name="reference" onchange="ChangeSelection()">
|
||||||
|
<option value="0" selected>Reference 0</option>
|
||||||
|
<option value="1" >Reference 1</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td colspan="2">Storage Path/Name: <input type="text" name="name" id="name"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding-top: 10px">x: <input type="number" name="refx" id="refx" step=1 onchange="valuemanualchanged()"></td>
|
||||||
|
<td style="padding-top: 10px">dx: <input type="number" name="refdx" id="refdx" step=1 onchange="valuemanualchanged()"></td>
|
||||||
|
<td rowspan="2" style="padding-top: 10px"><input class="button" type="button" value="Update Reference" onclick="CutOutReference()"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>y: <input type="number" name="refy" id="refy" step=1 onchange="valuemanualchanged()"></td>
|
||||||
|
<td>dy: <input type="number" name="refdy" id="refdy" step=1 onchange="valuemanualchanged()"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding-top: 10px">Original Image:</td>
|
||||||
|
<td style="padding-top: 10px">Reference Image:</td>
|
||||||
|
<td rowspan="2"><input class="button" type="button" id="enhancecontrast" value="Enhance Contrast" onclick="EnhanceContrast()"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><img id="img_ref_org" src = "/img_tmp/ref_zw_org.jpg"></td>
|
||||||
|
<td><img id="img_ref" src = "/img_tmp/ref_zw.jpg"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<script language="JavaScript">
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><input class="button" type="submit" name="saveroi" onclick="SaveToConfig()" value="Save to Config.ini"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="./gethost.js"></script>
|
||||||
|
<script type="text/javascript" src="./readconfig.js"></script>
|
||||||
|
|
||||||
|
<script language="JavaScript">
|
||||||
var canvas = document.getElementById('canvas'),
|
var canvas = document.getElementById('canvas'),
|
||||||
ctx = canvas.getContext('2d'),
|
ctx = canvas.getContext('2d'),
|
||||||
imageObj = new Image(),
|
imageObj = new Image(),
|
||||||
@@ -364,7 +361,5 @@ function dataURLtoBlob(dataurl) {
|
|||||||
|
|
||||||
init();
|
init();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,87 +1,108 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<title>Make Alignment</title>
|
<title>Make Analog Alignment</title>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
h1 {font-size: 2em;}
|
||||||
|
h2 {font-size: 1.5em; margin-block-start: 0.0em; margin-block-end: 0.2em;}
|
||||||
|
h3 {font-size: 1.2em;}
|
||||||
|
p {font-size: 1em;}
|
||||||
|
|
||||||
|
input[type=number] {
|
||||||
|
width: 100px;
|
||||||
|
margin-right: 10px;
|
||||||
|
padding: 3px 5px;
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=text] {
|
||||||
|
padding: 3px 5px;
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
padding: 3px 5px;
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
font-size: 16px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
padding: 5px 10px;
|
||||||
|
width: 210px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.move {
|
||||||
|
padding: 4px 4px;
|
||||||
|
width: 100px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
padding: 5px 5px 5px 0px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<div class="body-content" style="font-family: arial">
|
<body style="font-family: arial; padding: 0px 10px;">
|
||||||
|
|
||||||
<div id="createrefernce">
|
|
||||||
<div style="padding-left: 30px">
|
|
||||||
<h3>Edit Analog</h3>
|
|
||||||
|
|
||||||
<div style="padding-left: 30px">
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<canvas id="canvas" crossorigin></canvas>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<input type="submit" id= "newROI" name="newROI" onclick="newROI()" value="New ROI (after current)">
|
|
||||||
<input type="submit" id= "deleteROI" name="deleteROI" onclick="deleteROI()" value="Delete ROI">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<select id="index" name="index" onchange="ChangeSelection()">
|
|
||||||
<option value="0" selected>ROI 0</option>
|
|
||||||
<option value="1" >ROI 1</option>
|
|
||||||
</select>
|
|
||||||
name: <input type="text" name="name" id="name" onchange="onNameChange()">
|
|
||||||
<input type="submit" id="moveNext" onclick="moveNext()" value="move Next">
|
|
||||||
<input type="submit" id="movePrevious" onclick="movePrevious()" value="move Previous">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<td>
|
<h2>Edit Analog</h2>
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
x: <input type="number" name="refx" id="refx" step=1 onchange="valuemanualchanged()">
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
dx: <input type="number" name="refdx" id="refdx" step=1 onchange="valuemanualchangeddx()">
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="checkbox" id="lockAR" name="lockAR" value="1" onclick="changelockAR()" checked>
|
|
||||||
<label for="lockAR"> lock aspect ratio</label><br>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
y: <input type="number" name="refy" id="refy" step=1 onchange="valuemanualchanged()">
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
dy: <input type="number" name="refdy" id="refdy" step=1 onchange="valuemanualchanged()">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<input type="submit" id="saveroi" name="saveroi" onclick="SaveToConfig()" value="Save all to Config.ini">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="./gethost.js"></script>
|
<table>
|
||||||
<script type="text/javascript" src="./readconfig.js"></script>
|
<tr>
|
||||||
|
<td><canvas id="canvas" crossorigin></canvas></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><input class="button" type="submit" id= "newROI" name="newROI" onclick="newROI()" value="New ROI (after current)"></td>
|
||||||
|
<td><input class="button" type="submit" id= "deleteROI" name="deleteROI" onclick="deleteROI()" value="Delete ROI"></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<select id="index" name="index" onchange="ChangeSelection()">
|
||||||
|
<option value="0" selected>ROI 0</option>
|
||||||
|
<option value="1" >ROI 1</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td>Name: <input type="text" name="name" id="name" onchange="onNameChange()" size="13"></td>
|
||||||
|
<td>
|
||||||
|
<input class="move" type="submit" id="moveNext" onclick="moveNext()" value="move Next">
|
||||||
|
<input class="move" type="submit" id="movePrevious" onclick="movePrevious()" value="move Previous">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>x: <input type="number" name="refx" id="refx" step=1 onchange="valuemanualchanged()"></td>
|
||||||
|
<td>dx: <input type="number" name="refdx" id="refdx" step=1 onchange="valuemanualchangeddx()"></td>
|
||||||
|
<td rowspan="2"><label for="lockAR"> Lock aspect ratio: </label><input type="checkbox" id="lockAR" name="lockAR" value="1" onclick="changelockAR()" checked></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>y: <input type="number" name="refy" id="refy" step=1 onchange="valuemanualchanged()"></td>
|
||||||
|
<td>dy: <input type="number" name="refdy" id="refdy" step=1 onchange="valuemanualchanged()"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><input class="button" type="submit" id="saveroi" name="saveroi" onclick="SaveToConfig()" value="Save all to Config.ini"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<script language="JavaScript">
|
<script type="text/javascript" src="./gethost.js"></script>
|
||||||
|
<script type="text/javascript" src="./readconfig.js"></script>
|
||||||
|
|
||||||
|
<script language="JavaScript">
|
||||||
var canvas = document.getElementById('canvas'),
|
var canvas = document.getElementById('canvas'),
|
||||||
ctx = canvas.getContext('2d'),
|
ctx = canvas.getContext('2d'),
|
||||||
imageObj = new Image(),
|
imageObj = new Image(),
|
||||||
@@ -391,8 +412,6 @@ function ParseIni(_basepath) {
|
|||||||
|
|
||||||
|
|
||||||
init();
|
init();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,26 +1,49 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8"/>
|
||||||
|
<title>Check</title>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
h1 {font-size: 2em;}
|
||||||
|
h2 {font-size: 1.5em; margin-block-start: 0.0em; margin-block-end: 0.2em;}
|
||||||
|
h3 {font-size: 1.2em;}
|
||||||
|
p {font-size: 1em;}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
padding: 5px 10px;
|
||||||
|
width: 210px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
<body style="font-family: arial">
|
<body style="font-family: arial">
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr><td>Result:</td></tr>
|
<tr><td colspan="2">Result:</td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<iframe name="maincontent" id ="maincontent" width="800px" height="800px"></iframe>
|
<iframe name="maincontent" id ="maincontent" width="700px" height="700px"></iframe>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td style="padding-left: 15px;">
|
||||||
<p>
|
<p>
|
||||||
<input type="submit" id="take" onclick="doTake()" value="1. Take Picture">
|
<input class="button" type="submit" id="take" onclick="doTake()" value="1. Take Picture">
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<input class="button" type="submit" id="align" onclick="doAlign()" value="2. Align Image"><br>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<input type="submit" id="align" onclick="doAlign()" value="2. Align Image"><br>
|
|
||||||
Takes up to 2 Minutes!
|
Takes up to 2 Minutes!
|
||||||
</p>
|
</p>
|
||||||
Digits and Analog recognition not yet implemented.
|
Digits and Analog recognition not yet implemented.
|
||||||
<p>
|
<p>
|
||||||
<input type="submit" id="digits" onclick="doDigits()" value="3a. Analyse Digits">
|
<input class="button" type="submit" id="digits" onclick="doDigits()" value="3a. Analyse Digits">
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<input type="submit" id="analog" onclick="doAnalog()" value="3b Analyse Analog">
|
<input class="button" type="submit" id="analog" onclick="doAnalog()" value="3b Analyse Analog">
|
||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -1,16 +1,43 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<body style="font-family: arial">
|
<head>
|
||||||
|
<title>Edit Config</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
|
||||||
|
<style>
|
||||||
|
h1 {font-size: 2em;}
|
||||||
|
h2 {font-size: 1.5em; margin-block-start: 0.0em; margin-block-end: 0.2em;}
|
||||||
|
h3 {font-size: 1.2em;}
|
||||||
|
p {font-size: 1em;}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
padding: 5px 20px;
|
||||||
|
width: 211px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body style="font-family: arial; padding: 0px 10px;">
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr><td>Config.ini:</td></tr>
|
<tr><td><h2>Config.ini:</h2></td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<textarea id="inputTextToSave" cols="100" rows="40"></textarea>
|
<textarea id="inputTextToSave" cols="100" rows="33"></textarea>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><button onclick="saveTextAsFile()">Update Config.ini</button></td>
|
<td><button class="button" onclick="saveTextAsFile()">Update Config.ini</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate updates</button></td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<script type="text/javascript" src="./gethost.js"></script>
|
<script type="text/javascript" src="./gethost.js"></script>
|
||||||
@@ -35,6 +62,17 @@ function saveTextAsFile()
|
|||||||
FileSendContent(textToSave, "/config/config.ini", basepath);
|
FileSendContent(textToSave, "/config/config.ini", basepath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function doReboot() {
|
||||||
|
if (confirm("Are you sure you want to reboot the ESP32?")) {
|
||||||
|
var stringota = "/reboot";
|
||||||
|
window.location = stringota;
|
||||||
|
window.location.href = stringota;
|
||||||
|
window.location.assign(stringota);
|
||||||
|
window.location.replace(stringota);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
LoadConfigNeu();
|
LoadConfigNeu();
|
||||||
|
|
||||||
|
|||||||
@@ -1,87 +1,108 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<title>Make Alignment</title>
|
<title>Make Digital Alignment</title>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
h1 {font-size: 2em;}
|
||||||
|
h2 {font-size: 1.5em; margin-block-start: 0.0em; margin-block-end: 0.2em;}
|
||||||
|
h3 {font-size: 1.2em;}
|
||||||
|
p {font-size: 1em;}
|
||||||
|
|
||||||
|
input[type=number] {
|
||||||
|
width: 100px;
|
||||||
|
margin-right: 10px;
|
||||||
|
padding: 3px 5px;
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type=text] {
|
||||||
|
padding: 3px 5px;
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
padding: 3px 5px;
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
font-size: 16px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
padding: 5px 10px;
|
||||||
|
width: 210px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.move {
|
||||||
|
padding: 4px 4px;
|
||||||
|
width: 100px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
padding: 5px 5px 5px 0px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<div class="body-content" style="font-family: arial">
|
<body style="font-family: arial; padding: 0px 10px;">
|
||||||
|
|
||||||
<div id="createrefernce">
|
|
||||||
<div style="padding-left: 30px">
|
|
||||||
<h3>Edit Digits</h3>
|
|
||||||
|
|
||||||
<div style="padding-left: 30px">
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<canvas id="canvas" crossorigin></canvas>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<input type="submit" id="newROI" name="newROI" onclick="newROI()" value="New ROI (after current)">
|
|
||||||
<input type="submit" id="deleteROI" name="deleteROI" onclick="deleteROI()" value="Delete ROI">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<select id="index" name="index" onchange="ChangeSelection()">
|
|
||||||
<option value="0" selected>ROI 0</option>
|
|
||||||
<option value="1" >ROI 1</option>
|
|
||||||
</select>
|
|
||||||
name: <input type="text" name="name" id="name" onchange="onNameChange()">
|
|
||||||
<input type="submit" id="moveNext" onclick="moveNext()" value="move Next">
|
|
||||||
<input type="submit" id="movePrevious" onclick="movePrevious()" value="move Previous">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<td>
|
<h2>Edit Digits</h2>
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
x: <input type="number" name="refx" id="refx" step=1 onchange="valuemanualchanged()">
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
dx: <input type="number" name="refdx" id="refdx" step=1 onchange="valuemanualchangeddx()">
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="checkbox" id="lockAR" name="lockAR" value="1" onclick="changelockAR()" checked>
|
|
||||||
<label for="lockAR"> lock aspect ratio</label><br>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
y: <input type="number" name="refy" id="refy" step=1 onchange="valuemanualchanged()">
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
dy: <input type="number" name="refdy" id="refdy" step=1 onchange="valuemanualchanged()">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<input type="submit" id="saveroi" name="saveroi" onclick="SaveToConfig()" value="Save all to Config.ini">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="./gethost.js"></script>
|
<table>
|
||||||
<script type="text/javascript" src="./readconfig.js"></script>
|
<tr>
|
||||||
|
<canvas id="canvas" crossorigin></canvas>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><input class="button" type="submit" id="newROI" name="newROI" onclick="newROI()" value="New ROI (after current)"></td>
|
||||||
|
<td><input class="button" type="submit" id="deleteROI" name="deleteROI" onclick="deleteROI()" value="Delete ROI"></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<select id="index" name="index" onchange="ChangeSelection()">
|
||||||
|
<option value="0" selected>ROI 0</option>
|
||||||
|
<option value="1" >ROI 1</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td>Name: <input type="text" name="name" id="name" onchange="onNameChange()" size="13"></td>
|
||||||
|
<td>
|
||||||
|
<input class="move" type="submit" id="moveNext" onclick="moveNext()" value="move Next">
|
||||||
|
<input class="move" type="submit" id="movePrevious" onclick="movePrevious()" value="move Previous">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>x: <input type="number" name="refx" id="refx" step=1 onchange="valuemanualchanged()"></td>
|
||||||
|
<td>dx: <input type="number" name="refdx" id="refdx" step=1 onchange="valuemanualchangeddx()"></td>
|
||||||
|
<td rowspan="2"><label for="lockAR"> Lock aspect ratio </label><input type="checkbox" id="lockAR" name="lockAR" value="1" onclick="changelockAR()" checked></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>y: <input type="number" name="refy" id="refy" step=1 onchange="valuemanualchanged()"></td>
|
||||||
|
<td>dy: <input type="number" name="refdy" id="refdy" step=1 onchange="valuemanualchanged()"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><input class="button" type="submit" id="saveroi" name="saveroi" onclick="SaveToConfig()" value="Save all to Config.ini"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<script language="JavaScript">
|
<script type="text/javascript" src="./gethost.js"></script>
|
||||||
|
<script type="text/javascript" src="./readconfig.js"></script>
|
||||||
|
|
||||||
|
<script language="JavaScript">
|
||||||
var canvas = document.getElementById('canvas'),
|
var canvas = document.getElementById('canvas'),
|
||||||
ctx = canvas.getContext('2d'),
|
ctx = canvas.getContext('2d'),
|
||||||
imageObj = new Image(),
|
imageObj = new Image(),
|
||||||
@@ -390,8 +411,7 @@ function ParseIni(_basepath) {
|
|||||||
|
|
||||||
|
|
||||||
init();
|
init();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,75 +1,69 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8"/>
|
<title>Make Reference</title>
|
||||||
<title>Make refernce</title>
|
<meta charset="utf-8"/>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
h1 {font-size: 2em;}
|
||||||
|
h2 {font-size: 1.5em; margin-block-start: 0.0em; margin-block-end: 0.2em;}
|
||||||
|
h3 {font-size: 1.2em;}
|
||||||
|
p {font-size: 1em;}
|
||||||
|
|
||||||
|
input[type=number] {
|
||||||
|
width: 100px;
|
||||||
|
margin-right: 10px;
|
||||||
|
padding: 3px 5px;
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
padding: 5px 10px;
|
||||||
|
width: 210px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="font-family: arial">
|
<body style="font-family: arial; padding: 0px 10px;">
|
||||||
<h3>Create Reference out of Raw Image</h3>
|
<h2>Create Reference out of Raw Image</h2>
|
||||||
<div style="padding-left: 30px">
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td><input class="button" type="button" value="Show Actual Reference" onclick="showReference()"></td>
|
||||||
<input type="button" value="Show actual Reference" onclick="showReference()">
|
<td><input class="button" type="button" value="Create New Reference" onclick="loadRawImage()"></td>
|
||||||
</td>
|
<td><input class="button" type="submit" id="take" onclick="doTake()" value="New Raw Image (raw.jpg)"></td>
|
||||||
<td>
|
</tr>
|
||||||
<input type="button" value="Create new Reference" onclick="loadRawImage()">
|
<tr>
|
||||||
</td>
|
<td style="padding-top: 10px"><label for="mirror">Mirror Image:</label></td>
|
||||||
</tr>
|
<td style="padding-top: 10px"><input type="checkbox" id="mirror" name="mirror" value="1" onchange="drawRotated()"></td>
|
||||||
<tr>
|
</tr>
|
||||||
<td>
|
<tr>
|
||||||
|
<td><label for="mirror">Pre-rotate Angle:</label></td>
|
||||||
|
<td><input type="number" id="prerotateangle" name="prerotateangle" value=0 min="-360" max="360" onchange="drawRotated()">Degrees</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><label for="mirror">Fine Alignment:</label></td>
|
||||||
|
<td><input type="number" id="finerotate" name="finerotate" value=0.0 min="-1" max="1" step="0.2" onchange="drawRotated()">Degrees</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td><canvas id="canvas"></canvas></td>
|
||||||
<input type="submit" id="take" onclick="doTake()" value="Make new raw image (raw.jpg)">
|
</tr>
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<td><input class="button" type="button" id="updatereferenceimage" value="Update Reference Image" onclick="SaveReference()"></td>
|
||||||
<tr>
|
</tr>
|
||||||
<td>
|
</table>
|
||||||
<label for="mirror">Mirror image</label>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="checkbox" id="mirror" name="mirror" value="1" onchange="drawRotated()">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Pre-rotate Angle
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="number" id="prerotateangle" name="prerotateangle" value=0 min="-360" max="360" onchange="drawRotated()">°
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
Fine Alignment
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input type="number" id="finerotate" name="finerotate" value=0.0 min="-1" max="1" step="0.2" onchange="drawRotated()">°
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<canvas id="canvas"></canvas>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<input type="button" id="updatereferenceimage" value="Update Reference Image" onclick="SaveReference()">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="./gethost.js"></script>
|
<script type="text/javascript" src="./gethost.js"></script>
|
||||||
<script type="text/javascript" src="./readconfig.js"></script>
|
<script type="text/javascript" src="./readconfig.js"></script>
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html style="width: fit-content">
|
||||||
<head>
|
<head>
|
||||||
<style>
|
<title>jomjol - AI on the edge</title>
|
||||||
.h_iframe iframe {width:995px;height:700px;}
|
<meta charset="utf-8">
|
||||||
.h_iframe {width:995px;height:700px;}
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
h1 {font-size: 2em;}
|
<style>
|
||||||
h2 {font-size: 1.5em;}
|
.h_iframe iframe {width:995px;height:605px;}
|
||||||
|
.h_iframe {width:995px;height:605px;}
|
||||||
|
|
||||||
|
h1 {font-size: 2em; margin-block-end: 0.3em;}
|
||||||
|
h2 {font-size: 1.5em;margin-block-start: 0.3em;}
|
||||||
|
h3 {font-size: 1.2em;}
|
||||||
p {font-size: 1em;}
|
p {font-size: 1em;}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
@@ -80,18 +85,20 @@ li.dropdown {
|
|||||||
<a href="index_configure.html">Edit Configuration</a>
|
<a href="index_configure.html">Edit Configuration</a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#"onclick="document.getElementById('maincontent').src = '/wasserzaehler.html?full';">Watermeter</a></li>
|
<li><a href="#"onclick="document.getElementById('maincontent').src = '/wasserzaehler.html?full';">Recognition</a></li>
|
||||||
<li><a href="#"onclick="document.getElementById('maincontent').src = '/fileserver/';">File Server</a></li>
|
<li><a href="#"onclick="document.getElementById('maincontent').src = '/fileserver/';">File Server</a></li>
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<a href="javascript:void(0)" class="dropbtn">System</a>
|
<a href="javascript:void(0)" class="dropbtn">System</a>
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<a href="#"onclick="document.getElementById('maincontent').src = '/ota_page.html';">OTA Update</a>
|
<a href="#"onclick="document.getElementById('maincontent').src = '/ota_page.html';">OTA Update</a>
|
||||||
|
<a href="#"onclick="document.getElementById('maincontent').src = '/fileserver/log.txt';">Log Viewer</a>
|
||||||
<a href="#"onclick="document.getElementById('maincontent').src = '/reboot_page.html';">Reboot</a>
|
<a href="#"onclick="document.getElementById('maincontent').src = '/reboot_page.html';">Reboot</a>
|
||||||
|
<a href="#"onclick="document.getElementById('maincontent').src = '/info.html';">Info</a>
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
<p>
|
<p>
|
||||||
<div class="h_iframe">
|
<div class="h_iframe">
|
||||||
<iframe width="1020px" height="650px" name="maincontent" id ="maincontent" src="/wasserzaehler_roi.html" title="fileserver" allowfullscreen></iframe>
|
<iframe name="maincontent" id ="maincontent" src="/wasserzaehler_roi.html" title="fileserver" allowfullscreen></iframe>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -1,77 +1,74 @@
|
|||||||
<html><head>
|
<!DOCTYPE html>
|
||||||
<title>jomjol - AI on the edge</title>
|
<html>
|
||||||
<meta charset="utf-8">
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<title>jomjol - AI on the edge</title>
|
||||||
<style>
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.h_iframe iframe {width:995px;height:765px;}
|
||||||
|
.h_iframe {width:995px;height:765px;}
|
||||||
|
|
||||||
.h_iframe iframe {width:995px;height:760px;}
|
h1 {font-size: 2em; margin-block-end: 0.3em;}
|
||||||
.h_iframe {width:995px;height:760px;}
|
h2 {font-size: 1.5em;margin-block-start: 0.3em;}
|
||||||
|
h3 {font-size: 1.2em;}
|
||||||
|
p {font-size: 1em;}
|
||||||
|
|
||||||
h1 {font-size: 2em;}
|
ul {
|
||||||
h2 {font-size: 1.5em;}
|
list-style-type: none;
|
||||||
p {font-size: 1em;}
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #333;
|
||||||
|
width:1000px;
|
||||||
|
}
|
||||||
|
|
||||||
ul {
|
li {
|
||||||
list-style-type: none;
|
float: left;
|
||||||
margin: 0;
|
font-family: arial;
|
||||||
padding: 0;
|
font-size: 18px;
|
||||||
overflow: hidden;
|
}
|
||||||
background-color: #333;
|
|
||||||
width:1000px;
|
|
||||||
}
|
|
||||||
|
|
||||||
li {
|
li a, .dropbtn {
|
||||||
float: left;
|
display: inline-block;
|
||||||
font-family: arial;
|
color: white;
|
||||||
font-size: 18px;
|
text-align: center;
|
||||||
}
|
padding: 14px 16px;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
li a, .dropbtn {
|
li a:hover, .dropdown:hover .dropbtn {
|
||||||
display: inline-block;
|
background-color: red;
|
||||||
color: white;
|
}
|
||||||
text-align: center;
|
|
||||||
padding: 14px 16px;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
li a:hover, .dropdown:hover .dropbtn {
|
li.dropdown {
|
||||||
background-color: red;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
li.dropdown {
|
.dropdown-content {
|
||||||
display: inline-block;
|
display: none;
|
||||||
}
|
position: absolute;
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
min-width: 160px;
|
||||||
|
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
||||||
|
z-index: 1;
|
||||||
|
font-family: arial;
|
||||||
|
}
|
||||||
|
|
||||||
.dropdown-content {
|
.dropdown-content a {
|
||||||
display: none;
|
color: black;
|
||||||
position: absolute;
|
padding: 12px 16px;
|
||||||
background-color: #f9f9f9;
|
text-decoration: none;
|
||||||
min-width: 160px;
|
display: block;
|
||||||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
text-align: left;
|
||||||
z-index: 1;
|
}
|
||||||
font-family: arial;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-content a {
|
.dropdown-content a:hover {background-color: #f1f1f1;}
|
||||||
color: black;
|
|
||||||
padding: 12px 16px;
|
|
||||||
text-decoration: none;
|
|
||||||
display: block;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-content a:hover {background-color: #f1f1f1;}
|
.dropdown:hover .dropdown-content {
|
||||||
|
display: block;
|
||||||
.dropdown:hover .dropdown-content {
|
}
|
||||||
display: block;
|
</style>
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script type="text/javascript">
|
|
||||||
//<![CDATA[
|
|
||||||
//]]>
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="font-family: arial">
|
<body style="font-family: arial">
|
||||||
|
|
||||||
|
|||||||
90
sd-card/html/info.html
Normal file
90
sd-card/html/info.html
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Set PreValue</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
|
||||||
|
<style>
|
||||||
|
h1 {font-size: 2em;}
|
||||||
|
h2 {font-size: 1.5em;}
|
||||||
|
h3 {font-size: 1.2em;}
|
||||||
|
p {font-size: 1em;}
|
||||||
|
|
||||||
|
div {
|
||||||
|
width: 250px;
|
||||||
|
padding: 10px 5px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
font-family: arial;
|
||||||
|
font-size: 16px;
|
||||||
|
max-height: 35px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<body style="font-family: arial; padding: 0px 10px;">
|
||||||
|
<h3>Version Info</h3>
|
||||||
|
|
||||||
|
<table style="font-family: arial">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Git-Branch:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div id="gitbranch">
|
||||||
|
<object data="/version?type=GitBranch"></object>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Git-Base-Branch:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<object data="/version?type=GitBaseBranch"></object>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Git-Version:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<object data="/version?type=GitVersion"></object>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Build Time:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<object data="/version?type=BuildTime"></object>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
HTML Version:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<object data="/version?type=HTMLVersion"></object>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
2
sd-card/html/jquery-3.5.1.min.js
vendored
Normal file
2
sd-card/html/jquery-3.5.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -1,15 +1,33 @@
|
|||||||
<html><head>
|
<!DOCTYPE html>
|
||||||
<title>jomjol - AI on the edge</title>
|
<html>
|
||||||
<meta charset="utf-8">
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<title>OTA Update</title>
|
||||||
<script type="text/javascript">
|
<meta charset="utf-8">
|
||||||
//<![CDATA[
|
|
||||||
//]]>
|
<style>
|
||||||
|
h1 {font-size: 2em;}
|
||||||
|
h2 {font-size: 1.5em;}
|
||||||
|
h3 {font-size: 1.2em;}
|
||||||
|
p {font-size: 1em;}
|
||||||
|
|
||||||
|
input[type=number] {
|
||||||
|
width: 138px;
|
||||||
|
padding: 10px 5px;
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
padding: 10px 20px;
|
||||||
|
width: 211px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
</script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="font-family: arial">
|
<body style="font-family: arial; padding: 0px 10px;">
|
||||||
<h3>It is strongly recommended to update firmware and content of /html directory on SD-card at the same time!</h3>
|
<h3>It is strongly recommended to update firmware and content of /html directory on SD-card at the same time!</h3>
|
||||||
<h2>1. Firmware Update</h2>
|
<h2>1. Firmware Update</h2>
|
||||||
<table class="fixed" border="0">
|
<table class="fixed" border="0">
|
||||||
@@ -17,8 +35,8 @@
|
|||||||
<td>
|
<td>
|
||||||
<table border="0">
|
<table border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td style="width: 230px">
|
||||||
<label for="newfile">Select the firmware file</label>
|
<label for="newfile">Select the firmware file:</label>
|
||||||
</td>
|
</td>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<input id="newfile" type="file" onchange="setpath()" style="width:100%;">
|
<input id="newfile" type="file" onchange="setpath()" style="width:100%;">
|
||||||
@@ -26,7 +44,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<label for="filepath">Set path on server</label>
|
<label for="filepath">Set path on server:</label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input id="filepath" type="text" style="width:100%;" readonly>
|
<input id="filepath" type="text" style="width:100%;" readonly>
|
||||||
@@ -40,19 +58,28 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<button id="doUpdate" type="button" onclick="doUpdate()">Flash the firmware</button> (Takes about 60s)
|
<table border="0">
|
||||||
|
<tr>
|
||||||
|
<td style="width: 230px">
|
||||||
|
<button class="button" id="doUpdate" type="button" onclick="doUpdate()">Flash the firmware</button>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
(Takes about 60s)
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2>2. Update /html directory</h2>
|
<h2>2. Update "/html" directory</h2>
|
||||||
<table class="fixed" border="0">
|
<table class="fixed" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<table border="0">
|
<table border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td style="width: 230px">
|
||||||
<label for="newfilehtml">Select the zipped /html content</label>
|
<label for="newfilehtml">Select the zipped /html content:</label>
|
||||||
</td>
|
</td>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<input id="newfilehtml" type="file" onchange="setpathhtml()" style="width:100%;">
|
<input id="newfilehtml" type="file" onchange="setpathhtml()" style="width:100%;">
|
||||||
@@ -60,7 +87,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<label for="filepathhtml">Set path on server</label>
|
<label for="filepathhtml">Set path on server:</label>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input id="filepathhtml" type="text" style="width:100%;" readonly>
|
<input id="filepathhtml" type="text" style="width:100%;" readonly>
|
||||||
@@ -74,7 +101,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<button id="doUpdatehtml" type="button" onclick="doUpdatehtml()">Update "/html" directory</button>
|
<button class="button" id="doUpdatehtml" type="button" onclick="doUpdatehtml()">Update "/html" directory</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -82,7 +109,7 @@
|
|||||||
<table class="fixed" border="0">
|
<table class="fixed" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<button id="reboot" type="button" onclick="doReboot()">Reboot to activate updates</button>
|
<button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate updates</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -317,6 +344,5 @@ function uploadhtml() {
|
|||||||
init();
|
init();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
</body></html>
|
|
||||||
@@ -1,72 +1,48 @@
|
|||||||
<html><head>
|
<!DOCTYPE html>
|
||||||
<title>jomjol - AI on the edge</title>
|
<html>
|
||||||
<meta charset="utf-8">
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<title>Set PreValue</title>
|
||||||
<script type="text/javascript">
|
<meta charset="utf-8">
|
||||||
//<![CDATA[
|
|
||||||
//]]>
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
h1 {font-size: 2em;}
|
h1 {font-size: 2em;}
|
||||||
h2 {font-size: 1.5em;}
|
h2 {font-size: 1.5em;}
|
||||||
|
h3 {font-size: 1.2em;}
|
||||||
p {font-size: 1em;}
|
p {font-size: 1em;}
|
||||||
</style>
|
|
||||||
|
|
||||||
<script>
|
div {
|
||||||
function includeHTML() {
|
width: 200px;
|
||||||
var z, i, elmnt, file, xhttp;
|
padding: 10px 5px;
|
||||||
/* Loop through a collection of all HTML elements: */
|
display: inline-block;
|
||||||
z = document.getElementsByTagName("*");
|
border: 1px solid #ccc;
|
||||||
for (i = 0; i < z.length; i++) {
|
font-size: 16px;
|
||||||
elmnt = z[i];
|
max-height: 35px;
|
||||||
/*search for elements with a certain atrribute:*/
|
|
||||||
file = elmnt.getAttribute("w3-include-html");
|
|
||||||
if (file) {
|
|
||||||
/* Make an HTTP request using the attribute value as the file name: */
|
|
||||||
xhttp = new XMLHttpRequest();
|
|
||||||
xhttp.onreadystatechange = function() {
|
|
||||||
if (this.readyState == 4) {
|
|
||||||
if (this.status == 200) {elmnt.innerHTML = this.responseText;}
|
|
||||||
if (this.status == 404) {elmnt.innerHTML = "Page not found.";}
|
|
||||||
/* Remove the attribute, and call this function once more: */
|
|
||||||
elmnt.removeAttribute("w3-include-html");
|
|
||||||
includeHTML();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
xhttp.open("GET", file, true);
|
|
||||||
xhttp.send();
|
|
||||||
/* Exit the function: */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input[type=number] {
|
||||||
|
width: 125px;
|
||||||
|
padding: 10px 5px;
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
padding: 10px 20px;
|
||||||
|
width: 211px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<script src="/jquery-3.5.1.min.js"></script>
|
||||||
|
<script>
|
||||||
|
$ (document).ready(function() {
|
||||||
|
$("#prevalue").load("/setPreValue.html");
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<body style="font-family: arial">
|
|
||||||
<table style="width:100%">
|
|
||||||
<tr>
|
|
||||||
<h2>Current Value:</h2><p>
|
|
||||||
<div w3-include-html="/setPreValue.html"></div>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<h2>Set Value:</h2><p>
|
|
||||||
Input (Format = 123.456):<p>
|
|
||||||
PreValue:
|
|
||||||
<input type="number" id="myInput" name="myInput"
|
|
||||||
pattern="[0-9]+([\.,][0-9]+)?" step="0.001"
|
|
||||||
title="This should be a number with up to 4 decimal places.">
|
|
||||||
<button type="button" onclick="setprevalue()">Set PreValue</button>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<h2>Result:</h2><p>
|
|
||||||
<div id="result"> </div>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function setprevalue() {
|
function setprevalue() {
|
||||||
var inputVal = document.getElementById("myInput").value;
|
var inputVal = document.getElementById("myInput").value;
|
||||||
@@ -77,8 +53,29 @@ function setprevalue() {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<body style="font-family: arial; padding: 0px 10px;">
|
||||||
includeHTML();
|
<h3>Set the previous value for consistency check and substitution for NaN</h3>
|
||||||
</script>
|
|
||||||
|
<table style="width:100%">
|
||||||
|
<tr>
|
||||||
|
<h2>Current Value:</h2><p>
|
||||||
|
<div id="prevalue"></div>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<h2>Set Value:</h2><p>
|
||||||
|
Input (Format = 123.456):<p>
|
||||||
|
PreValue:
|
||||||
|
<input type="number" id="myInput" name="myInput"
|
||||||
|
pattern="[0-9]+([\.,][0-9]+)?" step="0.001"
|
||||||
|
title="This should be a number with up to 4 decimal places.">
|
||||||
|
<p></p>
|
||||||
|
<button class="button" type="button" onclick="setprevalue()">Set PreValue</button>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<h2>Result:</h2><p>
|
||||||
|
<div id="result" readonly></div>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
</body></html>
|
</body></html>
|
||||||
@@ -1,22 +1,32 @@
|
|||||||
<html><head>
|
<!DOCTYPE html>
|
||||||
<title>jomjol - AI on the edge</title>
|
<html>
|
||||||
<meta charset="utf-8">
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<title>Reboot</title>
|
||||||
<script type="text/javascript">
|
<meta charset="utf-8">
|
||||||
//<![CDATA[
|
|
||||||
//]]>
|
<style>
|
||||||
|
h1 {font-size: 2em;}
|
||||||
|
h2 {font-size: 1.5em;}
|
||||||
|
h3 {font-size: 1.2em;}
|
||||||
|
p {font-size: 1em;}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
padding: 10px 20px;
|
||||||
|
width: 211px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
</script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="font-family: arial">
|
<body style="font-family: arial; padding: 0px 10px;">
|
||||||
|
|
||||||
<h2>Do you really want to reboot your system now?</h2>
|
<h3>Do you really want to reboot your ESP32 now?</h3>
|
||||||
|
|
||||||
<table class="fixed" border="0">
|
<table class="fixed" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<button id="reboot" type="button" onclick="doReboot()">Yes, please reboot now</button>
|
<button class="button" id="reboot" type="button" onclick="doReboot()">Yes, please reboot</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -33,4 +43,5 @@ function doReboot() {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body></html>
|
</body>
|
||||||
|
</html>
|
||||||
1
sd-card/html/version.txt
Normal file
1
sd-card/html/version.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
1.0.0
|
||||||
@@ -1,93 +1,107 @@
|
|||||||
<html><head>
|
<!DOCTYPE html>
|
||||||
<title>jomjol - AI on the edge</title>
|
<html>
|
||||||
<meta charset="utf-8">
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<title>Overview</title>
|
||||||
<style type="text/css" media="screen">
|
<meta charset="utf-8">
|
||||||
.tg {border-collapse:collapse;border-spacing:0;width:100%;color: darkslategray;border: inset;}
|
|
||||||
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
|
<style>
|
||||||
.tg th{font-family:Arial, sans-serif;font-size:24px;font-weight:bold;text-align:left;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
|
.tg {border-collapse:collapse;border-spacing:0;width:100%;color: darkslategray;border: inset;height:585px;}
|
||||||
.tg .tg-hfl5{font-size:20px;font-family:Arial, Helvetica, sans-serif !important;border: inset;}
|
.tg td{font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
|
||||||
</style>
|
.tg th{height: 55px;font-size:24px;font-weight:bold;text-align:left;padding:0px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;background-color:#f0f0f0}
|
||||||
|
.tg .tg-1{width:77%;font-size:20px;font-family:Arial, Helvetica, sans-serif !important;border: inset;}
|
||||||
|
.tg .tg-2{font-size:20px;font-family:Arial, Helvetica, sans-serif !important;border: inset;}
|
||||||
|
.tg .tg-3{height: 15px;font-size:14px;font-family:Arial, Helvetica, sans-serif !important;border: inset;}
|
||||||
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
<script src="/jquery-3.5.1.min.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function includeHTML() {
|
function addZero(i) {
|
||||||
var z, i, elmnt, file, xhttp;
|
if (i < 10) {
|
||||||
/* Loop through a collection of all HTML elements: */
|
i = "0" + i;
|
||||||
z = document.getElementsByTagName("*");
|
}
|
||||||
for (i = 0; i < z.length; i++) {
|
return i;
|
||||||
elmnt = z[i];
|
}
|
||||||
/*search for elements with a certain atrribute:*/
|
|
||||||
file = elmnt.getAttribute("w3-include-html");
|
$ (document).ready(function() {
|
||||||
if (file) {
|
var d = new Date();
|
||||||
/* Make an HTTP request using the attribute value as the file name: */
|
var h = addZero(d.getHours());
|
||||||
xhttp = new XMLHttpRequest();
|
var m = addZero(d.getMinutes());
|
||||||
xhttp.onreadystatechange = function() {
|
var s = addZero(d.getSeconds());
|
||||||
if (this.readyState == 4) {
|
|
||||||
if (this.status == 200) {elmnt.innerHTML = this.responseText;}
|
$('#img').html('<img src="/img_tmp/alg_roi.jpg" style="width:100%; max-height:555px;"></img>');
|
||||||
if (this.status == 404) {elmnt.innerHTML = "Page not found.";}
|
$("#raw").load("/wasserzaehler.html?rawvalue=true");
|
||||||
/* Remove the attribute, and call this function once more: */
|
$("#corrected").load("/wasserzaehler.html");
|
||||||
elmnt.removeAttribute("w3-include-html");
|
$("#checked").load("/setPreValue.html");
|
||||||
includeHTML();
|
$("#start").load("/starttime");
|
||||||
}
|
$('#timestamp').html("Last Page Refresh:" + (h + ":" + m + ":" + s));
|
||||||
}
|
refresh();
|
||||||
xhttp.open("GET", file, true);
|
});
|
||||||
xhttp.send();
|
|
||||||
/* Exit the function: */
|
function refresh() {
|
||||||
return;
|
setTimeout (function() {
|
||||||
}
|
var time = new Date();
|
||||||
|
var timestamp = new Date().getTime();
|
||||||
|
var d = new Date();
|
||||||
|
var h = addZero(d.getHours());
|
||||||
|
var m = addZero(d.getMinutes());
|
||||||
|
var s = addZero(d.getSeconds());
|
||||||
|
// reassign the url to be like alg_roi.jpg?timestamp=456784512 based on timestamp
|
||||||
|
$('#img').html('<img src="/img_tmp/alg_roi.jpg?timestamp='+ timestamp +'" style="width:100%; max-height:555px;"></img>');
|
||||||
|
$("#raw").load("/wasserzaehler.html?rawvalue=true");
|
||||||
|
$("#corrected").load("/wasserzaehler.html");
|
||||||
|
$("#checked").load("/setPreValue.html");
|
||||||
|
$("#start").load("/starttime");
|
||||||
|
$('#timestamp').html("Last Page Refresh:" + (h + ":" + m + ":" + s));
|
||||||
|
refresh();
|
||||||
|
}, 300000);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<body style="font-family: arial">
|
<body style="font-family: arial">
|
||||||
|
|
||||||
<table class="tg">
|
<table class="tg">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tg-hfl5" rowspan="8"><img src="/img_tmp/alg_roi.jpg" alt="ROI-Image"></td>
|
<td class="tg-1" rowspan="9"><div id="img"></div></td>
|
||||||
<th class="th">
|
<th class="th">Raw Value:</th>
|
||||||
Raw Value:
|
|
||||||
</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tg-hfl5">
|
<td class="tg-2">
|
||||||
<div w3-include-html="/wasserzaehler.html?rawvalue=true"></div>
|
<div id="raw"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="th">
|
<th class="th">Corrected Value:</th>
|
||||||
Corrected Value:
|
|
||||||
</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tg-hfl5">
|
<td class="tg-2">
|
||||||
<div w3-include-html="/wasserzaehler.html"></div>
|
<div id="corrected"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="th">
|
<th class="th">Checked Value:</th>
|
||||||
Checked Value:
|
|
||||||
</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tg-hfl5">
|
<td class="tg-2">
|
||||||
<div w3-include-html="/setPreValue.html"></div>
|
<div id="checked"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="th">
|
<th class="th">Start Time:</th>
|
||||||
Start Time:
|
|
||||||
</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tg-hfl5">
|
<td class="tg-2">
|
||||||
<div w3-include-html="/starttime"></div>
|
<div id="start"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="tg-3">
|
||||||
|
<div id="timestamp"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<script>
|
</body>
|
||||||
includeHTML();
|
</html>
|
||||||
</script>
|
|
||||||
|
|
||||||
</body></html>
|
|
||||||
@@ -1,2 +1,4 @@
|
|||||||
ssid = "SSID"
|
ssid = "SSID"
|
||||||
password = "PASSWORD"
|
password = "PASSWORD"
|
||||||
|
hostname = "watermeter"
|
||||||
|
;hostname is optional
|
||||||
Reference in New Issue
Block a user