jomjol 4 سال پیش
والد
کامیت
24b46158de

+ 8 - 0
FeatureRequest.md

@@ -11,6 +11,14 @@
 
 ____
 
+#### #17 Direct InfluxDB connection
+
+* https://github.com/jomjol/AI-on-the-edge-device/issues/534
+* Direct interface to a InfluxDB data base
+* Integrate InfluxDB interface in firmware
+* Adapt html web page for configuration
+
+
 #### #16 Serial Communication
 
 * https://github.com/jomjol/AI-on-the-edge-device/issues/512

+ 7 - 5
README.md

@@ -52,19 +52,21 @@ In other cases you can contact the developer via email: <img src="https://raw.gi
 
 ------
 
-##### Rolling (2022-01-04)
 
-- Reduce ESP32 frequency to 160MHz
 
-Rolling (2022-01-03)
+##### 10.1.0 - Stability Increase (2022-01-09)
+
+- Reduce ESP32 frequency to 160MHz
 
 - Update tflite (new source: https://github.com/espressif/tflite-micro-esp-examples)
+
+- Update analog neural network (ana-s3-q-20220105.tflite)
+
 - Update digital neural network (dig-s1-q-20220102.tflite)
+
 - Increased web-server buffers
 - bug fix: compiler compatibility
 
-
-
 ##### 10.0.2 - Stability Increase (2022-01-01)
 
 - NEW v10.0.2: Corrected JSON error

+ 57 - 0
code/components/jomjol_fileserver_ota/server_file.cpp

@@ -65,6 +65,52 @@ struct file_server_data {
 
 static const char *TAG_FILESERVER = "file_server";
 
+
+#include <iostream>
+#include <sys/types.h>
+#include <dirent.h>
+
+using namespace std;
+
+static esp_err_t get_tflite_file_handler(httpd_req_t *req){
+    DIR *verzeichnis;
+    struct dirent *files;
+
+    std::string _filename, _fileext, _result = "";
+    std::string _delimiter = ".";
+    size_t pos = 0;
+
+    verzeichnis=opendir("/sdcard/config");
+
+    printf("Suche TFLITE in /sdcard/config\n");
+
+    while((files = readdir(verzeichnis)))
+    {
+        _filename = files->d_name;
+        _fileext = _filename;
+        printf("File: %s\t", _filename.c_str());
+
+        while ((pos = _fileext.find(_delimiter))) {
+            _fileext.erase(0, pos + _delimiter.length());
+        }
+
+        printf(" Extension: %s\n", _fileext.c_str());
+
+        if ((_fileext == "tfl") || (_fileext == "tflite"))
+        {
+            _result = _result + _filename + "\t";
+        }
+    }
+    closedir(verzeichnis);
+
+    httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
+    httpd_resp_set_type(req, "text/plain");
+    httpd_resp_sendstr_chunk(req, _result.c_str());
+    httpd_resp_sendstr_chunk(req, NULL);
+    return ESP_OK;
+}
+
+
 /* Handler to redirect incoming GET request for /index.html to /
  * This can be overridden by uploading file with same name */
 // static esp_err_t index_html_get_handler(httpd_req_t *req)
@@ -804,4 +850,15 @@ void register_server_file_uri(httpd_handle_t server, const char *base_path)
     };
     httpd_register_uri_handler(server, &file_delete);
 
+
+    /* URI handler for getting tflite files from server */
+/*
+    httpd_uri_t file_tflite = {
+        .uri       = "/tflite",   // Match all URIs of type /delete/path/to/file
+        .method    = HTTP_GET,
+        .handler   = get_tflite_file_handler,
+        .user_ctx  = server_data    // Pass server data as context
+    };
+    httpd_register_uri_handler(server, &file_tflite);
+*/
 }

+ 1 - 1
code/main/server_main.cpp

@@ -378,7 +378,7 @@ httpd_handle_t start_webserver(void)
     config.server_port        = 80;
     config.ctrl_port          = 32768;
     config.max_open_sockets   = 5;          //20210921 --> vorher 7   
-    config.max_uri_handlers   = 24;                       
+    config.max_uri_handlers   = 30;         // vorher 24             
     config.max_resp_headers   = 8;                        
     config.backlog_conn       = 5;                        
     config.lru_purge_enable   = true;       // dadurch werden alte Verbindungen gekappt, falls neue benögt werden.               

+ 2 - 2
code/main/version.cpp

@@ -1,4 +1,4 @@
-const char* GIT_REV="8dd3a92";
+const char* GIT_REV="63d336b";
 const char* GIT_TAG="";
 const char* GIT_BRANCH="rolling";
-const char* BUILD_TIME="2022-01-04 21:10";
+const char* BUILD_TIME="2022-01-09 09:39";

+ 1 - 1
code/main/version.h

@@ -13,7 +13,7 @@ extern "C"
 #include "Helper.h"
 #include <fstream>
 
-const char* GIT_BASE_BRANCH = "master - v10.0.2 - 2022-01-01";
+const char* GIT_BASE_BRANCH = "master - v10.1.0 - 2022-01-09";
 
 
 const char* git_base_branch(void)

+ 2 - 2
code/version.cpp

@@ -1,4 +1,4 @@
-const char* GIT_REV="8dd3a92";
+const char* GIT_REV="63d336b";
 const char* GIT_TAG="";
 const char* GIT_BRANCH="rolling";
-const char* BUILD_TIME="2022-01-04 21:10";
+const char* BUILD_TIME="2022-01-09 09:39";

BIN
firmware/bootloader.bin


BIN
firmware/dig-s2-q-20220104.tflite


BIN
firmware/firmware.bin


BIN
sd-card/config/ana-s3-q-20220105.tflite


BIN
sd-card/config/ana0700s1lq.tflite


+ 2 - 2
sd-card/config/config.ini

@@ -29,7 +29,7 @@ main.dig2 343 126 30 54
 main.dig3 391 126 30 54
 
 [Analog]
-Model = /config/ana0910s3_longq.tflite
+Model = /config/ana-s3-q-20220105.tflite
 ;LogImageLocation = /log/analog
 ;LogfileRetentionInDays = 3
 ModelInputSize = 32 32
@@ -44,7 +44,7 @@ main.DecimalShift = 0
 PreValueUse = true
 PreValueAgeStartup = 720
 AllowNegativeRates = false
-main.MaxRateValue = 0.1
+main.MaxRateValue = 0.05
 ErrorMessage = true
 CheckDigitIncreaseConsistency = false
 

BIN
sd-card/config/dig-s1-q-20220102.tflite


BIN
sd-card/config/dig-s1-q-20220102.zip