Sfoglia il codice sorgente

Update digital CNN, bug fixing

jomjol 5 anni fa
parent
commit
becb886ab7

+ 4 - 3
README.md

@@ -28,9 +28,10 @@ A 3d-printable housing can be found here: https://www.thingiverse.com/thing:4571
 ##### Rolling - (2020-12-29)
 
 * Parameter `TimerServer` added to `config.ini`
-  
-* Bug fixing: edit digits: log images could not be enabled (html-page update)
-  
+* Update digital CNN to v7.2.1 (additional digital images trained)
+* Bug fixing: 
+  * edit digits: log images could not be enabled (html-page update)
+  * PreValue: no reboot necessary to use / take newly set pre-values
 
 2020-12-27
 

+ 1 - 1
code/components/jomjol_flowcontroll/ClassFlowMQTT.cpp

@@ -101,7 +101,7 @@ bool ClassFlowMQTT::ReadParameter(FILE* pfile, string& aktparamgraph)
 
     if ((uri.length() > 0) && (topic.length() > 0)) 
     {
-        MQTTInit(uri, clientname, user, password);
+        MQTTInit(uri, clientname, user, password, topicError, 60);
     }
    
     return true;

+ 2 - 0
code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp

@@ -108,6 +108,8 @@ void ClassFlowPostProcessing::SavePreValue(float value, string zwtime)
         zwtime = std::string(buffer);
     }
 
+    PreValue = value;
+
     fputs(zwtime.c_str(), pFile);
     fputs("\n", pFile);
     fputs(to_string(value).c_str(), pFile);

+ 10 - 1
code/components/jomjol_mqtt/interface_mqtt.cpp

@@ -64,10 +64,19 @@ static void mqtt_event_handler(void *handler_args, esp_event_base_t base, int32_
     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){
+void MQTTInit(std::string _mqttURI, std::string _clientid, std::string _user, std::string _password, std::string _LWTContext, int _keepalive){
+    std::string _zwmessage = "connection lost";
+
+    int _lzw = _LWTContext.length();
+
     esp_mqtt_client_config_t mqtt_cfg = {
         .uri = _mqttURI.c_str(),
         .client_id = _clientid.c_str(),
+//        .lwt_topic = _LWTContext.c_str(),
+        .lwt_topic = "wasserzaehler/connection",
+        .lwt_msg = _zwmessage.c_str(),
+        .lwt_msg_len = _lzw,
+        .keepalive = _keepalive
     };
 
     if (_user.length() && _password.length()){

+ 4 - 1
code/components/jomjol_mqtt/interface_mqtt.h

@@ -1,4 +1,7 @@
 #include <string>
 
-void MQTTInit(std::string _mqttURI, std::string _clientid, std::string _user = "", std::string _password = "");
+void MQTTInit(std::string _mqttURI, std::string _clientid, std::string _user, std::string _password, std::string _LWTContext, int _keepalive);
+
+//void MQTTInit(std::string _mqttURI, std::string _clientid, std::string _user = "", std::string _password = "");
+
 void MQTTPublish(std::string _key, std::string _content);

+ 3 - 3
code/main/version.cpp

@@ -1,4 +1,4 @@
-const char* GIT_REV="6e521f0";
+const char* GIT_REV="3502ac9";
 const char* GIT_TAG="";
-const char* GIT_BRANCH="rolling-reduce-sd-use";
-const char* BUILD_TIME="2020-12-28 15:38";
+const char* GIT_BRANCH="rolling";
+const char* BUILD_TIME="2020-12-29 21:49";

+ 3 - 3
code/version.cpp

@@ -1,4 +1,4 @@
-const char* GIT_REV="6e521f0";
+const char* GIT_REV="3502ac9";
 const char* GIT_TAG="";
-const char* GIT_BRANCH="rolling-reduce-sd-use";
-const char* BUILD_TIME="2020-12-28 15:38";
+const char* GIT_BRANCH="rolling";
+const char* BUILD_TIME="2020-12-29 21:49";

BIN
firmware/bootloader.bin


BIN
firmware/firmware.bin


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

@@ -14,7 +14,7 @@ SearchFieldY = 20
 
 
 [Digits]
-Model = /config/dig0720s1.tflite
+Model = /config/dig0721s1.tflite
 ;LogImageLocation = /log/digit
 ;LogfileRetentionInDays = 3
 ModelInputSize = 20 32

BIN
sd-card/config/dig0720s1.tflite


BIN
sd-card/config/dig0721s1.tflite


+ 0 - 0
sd-card/log/digit/1/leer.txt


+ 0 - 0
sd-card/log/digit/10/leer.txt


+ 0 - 0
sd-card/log/digit/2/leer.txt


+ 0 - 0
sd-card/log/digit/3/leer.txt


+ 0 - 0
sd-card/log/digit/4/leer.txt


+ 0 - 0
sd-card/log/digit/5/leer.txt


+ 0 - 0
sd-card/log/digit/6/leer.txt


+ 0 - 0
sd-card/log/digit/7/leer.txt


+ 0 - 0
sd-card/log/digit/8/leer.txt


+ 0 - 0
sd-card/log/digit/9/leer.txt


+ 0 - 0
sd-card/log/digit/0/leer.txt → sd-card/log/digit/leer.txt