diff --git a/README.md b/README.md index 8102bd08..ea422e06 100644 --- a/README.md +++ b/README.md @@ -44,12 +44,24 @@ In other cases you can contact the developer via email: 0) { + if (resulterror.length() == 0) + { + resulterror = " "; + } MQTTPublish(topicError, resulterror); } diff --git a/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp b/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp index 18afcc11..e9119239 100644 --- a/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp +++ b/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp @@ -63,7 +63,7 @@ bool ClassFlowPostProcessing::LoadPreValue(void) int yy, month, dd, hh, mm, ss; struct tm whenStart; - sscanf(zwtime.c_str(), "%d-%d-%d_%d-%d-%d", &yy, &month, &dd, &hh, &mm, &ss); + sscanf(zwtime.c_str(), "%d-%d-%dT%d:%d:%d", &yy, &month, &dd, &hh, &mm, &ss); whenStart.tm_year = yy - 1900; whenStart.tm_mon = month - 1; whenStart.tm_mday = dd; @@ -121,7 +121,7 @@ void ClassFlowPostProcessing::SavePreValue(float value, string zwtime) time(&rawtime); timeinfo = localtime(&rawtime); - strftime(buffer, 80, "%Y-%m-%d_%H-%M-%S", timeinfo); + strftime(buffer, 80, "%Y-%m-%dT%H:%M:%S", timeinfo); timeStamp = std::string(buffer); } else @@ -305,7 +305,7 @@ bool ClassFlowPostProcessing::doFlow(string zwtime) timeinfo = localtime(&imagetime); char strftime_buf[64]; - strftime(strftime_buf, sizeof(strftime_buf), "%Y-%m-%d_%H-%M-%S", timeinfo); + strftime(strftime_buf, sizeof(strftime_buf), "%Y-%m-%dT%H:%M:%S", timeinfo); zwtime = std::string(strftime_buf); @@ -367,14 +367,6 @@ bool ClassFlowPostProcessing::doFlow(string zwtime) zwvalue = RundeOutput(Value, AnzahlAnalog - DecimalShift); - time_t currenttime; - time(¤ttime); - localtime(¤ttime); - double difference = difftime(currenttime, lastvalue); // in Sekunden - difference /= 60; // in Minuten - - FlowRateAct = (Value - PreValue) / difference; - if ((!AllowNegativeRates) && (Value < PreValue)) { ErrorMessageText = ErrorMessageText + "Negative Rate - Returned old value - read value: " + zwvalue + " - raw value: " + ReturnRawValue + " - checked value: " + std::to_string(Value) + " "; @@ -389,6 +381,7 @@ bool ClassFlowPostProcessing::doFlow(string zwtime) zwvalue = RundeOutput(Value, AnzahlAnalog - DecimalShift); } + ReturnValueNoError = zwvalue; ReturnValue = zwvalue; if (ErrorMessage && (ErrorMessageText.length() > 0)) @@ -396,10 +389,15 @@ bool ClassFlowPostProcessing::doFlow(string zwtime) if (ErrorMessageText.length() == 0) { + time_t currenttime; + time(¤ttime); + localtime(¤ttime); + double difference = difftime(currenttime, lastvalue); // in Sekunden + difference /= 60; // in Minuten + FlowRateAct = (Value - PreValue) / difference; + PreValue = Value; - SavePreValue(Value, zwtime); - } return true; } diff --git a/code/components/jomjol_logfile/ClassLogFile.cpp b/code/components/jomjol_logfile/ClassLogFile.cpp index f8fbb3fc..71825ca7 100644 --- a/code/components/jomjol_logfile/ClassLogFile.cpp +++ b/code/components/jomjol_logfile/ClassLogFile.cpp @@ -77,7 +77,7 @@ void ClassLogFile::WriteToDedicatedFile(std::string _fn, std::string info, bool time(&rawtime); timeinfo = localtime(&rawtime); - strftime(buffer, 80, "%Y-%m-%d_%H-%M-%S", timeinfo); + strftime(buffer, 80, "%Y-%m-%dT%H:%M:%S", timeinfo); zwtime = std::string(buffer); info = zwtime + ": " + info; diff --git a/code/main/version.cpp b/code/main/version.cpp index 68c969ab..418b16b0 100644 --- a/code/main/version.cpp +++ b/code/main/version.cpp @@ -1,4 +1,4 @@ -const char* GIT_REV="016f408"; +const char* GIT_REV="67d0bf6"; const char* GIT_TAG=""; const char* GIT_BRANCH="rolling"; -const char* BUILD_TIME="2021-05-06 21:42"; \ No newline at end of file +const char* BUILD_TIME="2021-05-07 21:30"; \ No newline at end of file diff --git a/code/main/version.h b/code/main/version.h index 965b1014..dd6bd96b 100644 --- a/code/main/version.h +++ b/code/main/version.h @@ -13,7 +13,7 @@ extern "C" #include "Helper.h" #include -const char* GIT_BASE_BRANCH = "master - v6.7.1 - 2020-05-01"; +const char* GIT_BASE_BRANCH = "master - v6.7.2 - 2020-05-01"; const char* git_base_branch(void) diff --git a/code/version.cpp b/code/version.cpp index 68c969ab..418b16b0 100644 --- a/code/version.cpp +++ b/code/version.cpp @@ -1,4 +1,4 @@ -const char* GIT_REV="016f408"; +const char* GIT_REV="67d0bf6"; const char* GIT_TAG=""; const char* GIT_BRANCH="rolling"; -const char* BUILD_TIME="2021-05-06 21:42"; \ No newline at end of file +const char* BUILD_TIME="2021-05-07 21:30"; \ No newline at end of file diff --git a/firmware/bootloader.bin b/firmware/bootloader.bin index 069a8b89..1535fe65 100644 Binary files a/firmware/bootloader.bin and b/firmware/bootloader.bin differ diff --git a/firmware/firmware.bin b/firmware/firmware.bin index 30c53a89..d48987ba 100644 Binary files a/firmware/firmware.bin and b/firmware/firmware.bin differ diff --git a/sd-card/config/config.ini b/sd-card/config/config.ini index 4603df2f..66b30810 100644 --- a/sd-card/config/config.ini +++ b/sd-card/config/config.ini @@ -18,7 +18,7 @@ InitialMirror= false AlignmentAlgo = Default [Digits] -Model = /config/dig0840s1q.tflite +Model = /config/dig0850s1q.tflite ;LogImageLocation = /log/digit ;LogfileRetentionInDays = 3 ModelInputSize = 20 32 diff --git a/sd-card/config/dig0850s1q.tflite b/sd-card/config/dig0850s1q.tflite new file mode 100644 index 00000000..aab43750 Binary files /dev/null and b/sd-card/config/dig0850s1q.tflite differ