diff --git a/README.md b/README.md index d794ee2d..05857edc 100644 --- a/README.md +++ b/README.md @@ -25,10 +25,11 @@ A 3d-printable housing can be found here: https://www.thingiverse.com/thing:4571 **General remark:** Beside the `firmware.bin`, typically also the content of `/html` needs to be updated! -##### Rolling - (2020-12-02) +##### 4.1.1 Configuration editor - (2020-12-02) * Bug fixing: internal improvement of file handling (reduce not responding) -* based on v4.1.0 + + ##### 4.1.0 Configuration editor - (2020-11-30) diff --git a/code/components/jomjol_flowcontroll/ClassFlowMQTT.cpp b/code/components/jomjol_flowcontroll/ClassFlowMQTT.cpp index 4d6a9fb1..e96de968 100644 --- a/code/components/jomjol_flowcontroll/ClassFlowMQTT.cpp +++ b/code/components/jomjol_flowcontroll/ClassFlowMQTT.cpp @@ -126,7 +126,6 @@ bool ClassFlowMQTT::doFlow(string zwtime) } OldValue = result; - - + return true; } diff --git a/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp b/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp index a19f0fe5..a4dbbfad 100644 --- a/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp +++ b/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp @@ -4,6 +4,7 @@ #include "ClassFlowAnalog.h" #include "ClassFlowDigit.h" #include "ClassFlowMakeImage.h" +#include "ClassLogFile.h" #include #include @@ -42,6 +43,7 @@ bool ClassFlowPostProcessing::LoadPreValue(void) zwtime = trim(std::string(zw)); fgets(zw, 1024, pFile); + fclose(pFile); printf("%s", zw); zwvalue = trim(std::string(zw)); PreValue = stof(zwvalue.c_str()); @@ -103,17 +105,15 @@ void ClassFlowPostProcessing::SavePreValue(float value, string zwtime) timeinfo = localtime(&rawtime); strftime(buffer, 80, "%Y-%m-%d_%H-%M-%S", timeinfo); - zwtime = std::string(buffer); } -fputs(zwtime.c_str(), pFile); -fputs("\n", pFile); + fputs(zwtime.c_str(), pFile); + fputs("\n", pFile); + fputs(to_string(value).c_str(), pFile); + fputs("\n", pFile); -fputs(to_string(value).c_str(), pFile); -fputs("\n", pFile); - -fclose(pFile); + fclose(pFile); } @@ -269,6 +269,7 @@ bool ClassFlowPostProcessing::doFlow(string zwtime) ErrorMessageText = ""; + for (int i = 0; i < ListFlowControll->size(); ++i) { if (((*ListFlowControll)[i])->name().compare("ClassFlowMakeImage") == 0) @@ -312,6 +313,7 @@ bool ClassFlowPostProcessing::doFlow(string zwtime) ReturnRawValue = ShiftDecimal(ReturnRawValue, DecimalShift); + if (!PreValueUse || !PreValueOkay) { ReturnValue = ReturnRawValue; @@ -336,7 +338,6 @@ bool ClassFlowPostProcessing::doFlow(string zwtime) zw = ErsetzteN(ReturnRawValue); - Value = std::stof(zw); if (checkDigitIncreaseConsistency) { @@ -367,10 +368,10 @@ bool ClassFlowPostProcessing::doFlow(string zwtime) if (ErrorMessageText.length() == 0) { PreValue = Value; + SavePreValue(Value, zwtime); + } - - return true; } diff --git a/code/src/version.cpp b/code/src/version.cpp index b82515d8..65b16071 100644 --- a/code/src/version.cpp +++ b/code/src/version.cpp @@ -1,4 +1,4 @@ -const char* GIT_REV="ed3226e"; +const char* GIT_REV="f6f3e23"; const char* GIT_TAG=""; const char* GIT_BRANCH="rolling"; -const char* BUILD_TIME="2020-12-02 07:33"; \ No newline at end of file +const char* BUILD_TIME="2020-12-02 21:50"; \ No newline at end of file diff --git a/code/version.cpp b/code/version.cpp index b82515d8..65b16071 100644 --- a/code/version.cpp +++ b/code/version.cpp @@ -1,4 +1,4 @@ -const char* GIT_REV="ed3226e"; +const char* GIT_REV="f6f3e23"; const char* GIT_TAG=""; const char* GIT_BRANCH="rolling"; -const char* BUILD_TIME="2020-12-02 07:33"; \ No newline at end of file +const char* BUILD_TIME="2020-12-02 21:50"; \ No newline at end of file diff --git a/firmware/bootloader.bin b/firmware/bootloader.bin index 4c2ab6e7..169b9832 100644 Binary files a/firmware/bootloader.bin and b/firmware/bootloader.bin differ diff --git a/firmware/firmware.bin b/firmware/firmware.bin index a13ddcf0..d9bc878e 100644 Binary files a/firmware/firmware.bin and b/firmware/firmware.bin differ diff --git a/firmware/html.zip b/firmware/html.zip index 69081c7c..a81df042 100644 Binary files a/firmware/html.zip and b/firmware/html.zip differ