diff --git a/FeatureRequest.md b/FeatureRequest.md
index 03953fbf..c28745b5 100644
--- a/FeatureRequest.md
+++ b/FeatureRequest.md
@@ -11,6 +11,12 @@
____
+#### #8 MQTT configurable readout intervall
+
+Make the readout intervall configurable via MQTT.
+
+* Change the mqtt part to receive and process input and not only sending
+
#### #7 Extended Error Handling
Check different types of error (e.g. tflite not availabe) and generate an error on the html page.
diff --git a/README.md b/README.md
index 4321fe52..5ed3264a 100644
--- a/README.md
+++ b/README.md
@@ -47,6 +47,11 @@ In other cases you can contact the developer via email: -1)
- {
_digit = _decsep.substr(0, _pospunkt);
- }
else
- {
_digit = "default";
- }
for (int j = 0; j < NUMBERS.size(); ++j)
{
@@ -271,6 +267,32 @@ void ClassFlowPostProcessing::handleDecimalSeparator(string _decsep, string _val
}
}
+void ClassFlowPostProcessing::handleMaxRateValue(string _decsep, string _value)
+{
+ string _digit, _decpos;
+ int _pospunkt = _decsep.find_first_of(".");
+// printf("Name: %s, Pospunkt: %d\n", _decsep.c_str(), _pospunkt);
+ if (_pospunkt > -1)
+ _digit = _decsep.substr(0, _pospunkt);
+ else
+ _digit = "default";
+
+ for (int j = 0; j < NUMBERS.size(); ++j)
+ {
+ if (_digit == "default") // erstmal auf default setzen (falls sonst nichts gesetzt)
+ {
+ NUMBERS[j]->useMaxRateValue = true;
+ NUMBERS[j]->MaxRateValue = stof(_value);
+ }
+
+ if (NUMBERS[j]->name == _digit)
+ {
+ NUMBERS[j]->useMaxRateValue = true;
+ NUMBERS[j]->MaxRateValue = stof(_value);
+ }
+ }
+}
+
bool ClassFlowPostProcessing::ReadParameter(FILE* pfile, string& aktparamgraph)
{
@@ -299,43 +321,39 @@ bool ClassFlowPostProcessing::ReadParameter(FILE* pfile, string& aktparamgraph)
{
handleDecimalSeparator(zerlegt[0], zerlegt[1]);
}
+ if ((toUpper(_param) == "MAXRATEVALUE") && (zerlegt.size() > 1))
+ {
+ handleDecimalSeparator(zerlegt[0], zerlegt[1]);
+ }
- if ((toUpper(zerlegt[0]) == "PREVALUEUSE") && (zerlegt.size() > 1))
+ if ((toUpper(_param) == "PREVALUEUSE") && (zerlegt.size() > 1))
{
if (toUpper(zerlegt[1]) == "TRUE")
{
PreValueUse = true;
}
}
- if ((toUpper(zerlegt[0]) == "CHECKDIGITINCREASECONSISTENCY") && (zerlegt.size() > 1))
+ if ((toUpper(_param) == "CHECKDIGITINCREASECONSISTENCY") && (zerlegt.size() > 1))
{
if (toUpper(zerlegt[1]) == "TRUE")
for (_n = 0; _n < NUMBERS.size(); ++_n)
NUMBERS[_n]->checkDigitIncreaseConsistency = true;
}
- if ((toUpper(zerlegt[0]) == "ALLOWNEGATIVERATES") && (zerlegt.size() > 1))
+ if ((toUpper(_param) == "ALLOWNEGATIVERATES") && (zerlegt.size() > 1))
{
if (toUpper(zerlegt[1]) == "TRUE")
for (_n = 0; _n < NUMBERS.size(); ++_n)
NUMBERS[_n]->AllowNegativeRates = true;
}
- if ((toUpper(zerlegt[0]) == "ERRORMESSAGE") && (zerlegt.size() > 1))
+ if ((toUpper(_param) == "ERRORMESSAGE") && (zerlegt.size() > 1))
{
if (toUpper(zerlegt[1]) == "TRUE")
ErrorMessage = true;
}
- if ((toUpper(zerlegt[0]) == "PREVALUEAGESTARTUP") && (zerlegt.size() > 1))
+ if ((toUpper(_param) == "PREVALUEAGESTARTUP") && (zerlegt.size() > 1))
{
PreValueAgeStartup = std::stoi(zerlegt[1]);
}
- if ((toUpper(zerlegt[0]) == "MAXRATEVALUE") && (zerlegt.size() > 1))
- {
- for (_n = 0; _n < NUMBERS.size(); ++_n)
- {
- NUMBERS[_n]->useMaxRateValue = true;
- NUMBERS[_n]->MaxRateValue = std::stof(zerlegt[1]);
- }
- }
}
if (PreValueUse) {
diff --git a/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.h b/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.h
index 30cd4da9..48a5510e 100644
--- a/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.h
+++ b/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.h
@@ -53,15 +53,8 @@ protected:
bool PreValueUse;
int PreValueAgeStartup;
-// bool AllowNegativeRates;
-// float MaxRateValue;
-// bool useMaxRateValue;
bool ErrorMessage;
- // bool PreValueOkay;
-// bool checkDigitIncreaseConsistency;
-// int DecimalShift;
-// time_t lastvalue;
-// float FlowRateAct; // m3 / min
+
ClassFlowAnalog* flowAnalog;
ClassFlowDigit* flowDigit;
@@ -80,6 +73,7 @@ protected:
void InitNUMBERS();
void handleDecimalSeparator(string _decsep, string _value);
+ void handleMaxRateValue(string _decsep, string _value);
public:
diff --git a/code/main/version.cpp b/code/main/version.cpp
index 9f656470..ae5cc279 100644
--- a/code/main/version.cpp
+++ b/code/main/version.cpp
@@ -1,4 +1,4 @@
-const char* GIT_REV="45154cb";
+const char* GIT_REV="f243f4b";
const char* GIT_TAG="";
const char* GIT_BRANCH="rolling";
-const char* BUILD_TIME="2021-07-01 19:03";
\ No newline at end of file
+const char* BUILD_TIME="2021-07-04 06:46";
\ No newline at end of file
diff --git a/code/version.cpp b/code/version.cpp
index 9f656470..ae5cc279 100644
--- a/code/version.cpp
+++ b/code/version.cpp
@@ -1,4 +1,4 @@
-const char* GIT_REV="45154cb";
+const char* GIT_REV="f243f4b";
const char* GIT_TAG="";
const char* GIT_BRANCH="rolling";
-const char* BUILD_TIME="2021-07-01 19:03";
\ No newline at end of file
+const char* BUILD_TIME="2021-07-04 06:46";
\ No newline at end of file
diff --git a/firmware/bootloader.bin b/firmware/bootloader.bin
index 1bbf3c6c..feded967 100644
Binary files a/firmware/bootloader.bin and b/firmware/bootloader.bin differ
diff --git a/firmware/firmware.bin b/firmware/firmware.bin
index cd6e5789..b44f28b7 100644
Binary files a/firmware/firmware.bin and b/firmware/firmware.bin differ
diff --git a/firmware/html.zip b/firmware/html.zip
index a907ca0b..ce2ce090 100644
Binary files a/firmware/html.zip and b/firmware/html.zip differ
diff --git a/sd-card/html/edit_config_param.html b/sd-card/html/edit_config_param.html
index 8fd92d23..b05d5b37 100644
--- a/sd-card/html/edit_config_param.html
+++ b/sd-card/html/edit_config_param.html
@@ -410,20 +410,6 @@ textarea {
Set on "false" to ensure, that only positive changes are accepted (typically for counter)
-