Bladeren bron

Rolling 20210830

jomjol 4 jaren geleden
bovenliggende
commit
b7b70299f7

+ 5 - 0
README.md

@@ -47,6 +47,11 @@ In other cases you can contact the developer via email: <img src="https://raw.gi
 
 
 
+##### Rolling (2021-08-30)
+
+* dedicated NaN-test case
+* based on v8.2.0
+
 ##### 8.2.0 - Multi Meter Support (2021-08-24)
 
 * Improve server responsiveness

+ 20 - 6
code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp

@@ -233,19 +233,15 @@ void ClassFlowPostProcessing::SavePreValue()
 
 ClassFlowPostProcessing::ClassFlowPostProcessing(std::vector<ClassFlow*>* lfc)
 {
-//    FlowRateAct = 0;
     PreValueUse = false;
     PreValueAgeStartup = 30;
     ErrorMessage = false;
     ListFlowControll = NULL;
-//    PreValueOkay = false;
-//    DecimalShift = 0;    
-//    ErrorMessageText = "";
-//    timeStamp = "";
     FilePreValue = FormatFileName("/sdcard/config/prevalue.ini");
     ListFlowControll = lfc;
     flowMakeImage = NULL;
     UpdatePreValueINI = false;
+    IgnoreLeadingNaN = false;
 
     for (int i = 0; i < ListFlowControll->size(); ++i)
     {
@@ -384,6 +380,13 @@ bool ClassFlowPostProcessing::ReadParameter(FILE* pfile, string& aktparamgraph)
             if (toUpper(zerlegt[1]) == "TRUE")
                 ErrorMessage = true;
         }
+        if ((toUpper(_param) == "IGNORELEADINGNAN") && (zerlegt.size() > 1))
+        {
+            if (toUpper(zerlegt[1]) == "TRUE")
+                IgnoreLeadingNaN = true;
+        }
+
+        
         if ((toUpper(_param) == "PREVALUEAGESTARTUP") && (zerlegt.size() > 1))
         {
             PreValueAgeStartup = std::stoi(zerlegt[1]);
@@ -563,7 +566,18 @@ bool ClassFlowPostProcessing::doFlow(string zwtime)
         if (NUMBERS[j]->analog_roi)
             NUMBERS[j]->ReturnRawValue = NUMBERS[j]->ReturnRawValue + flowAnalog->getReadout(j); 
 
-        NUMBERS[j]->ReturnRawValue = ShiftDecimal(NUMBERS[j]->ReturnRawValue, NUMBERS[j]->DecimalShift);   
+        NUMBERS[j]->ReturnRawValue = ShiftDecimal(NUMBERS[j]->ReturnRawValue, NUMBERS[j]->DecimalShift);  
+
+
+///////////////// SPEZIALFALL für User Gustl ///////////////////////////////////////////////////////
+        if (IgnoreLeadingNaN)               
+        {
+            while ((NUMBERS[j]->ReturnValue.length() > 1) && (NUMBERS[j]->ReturnValue[0] == 'N'))
+            {
+                NUMBERS[j]->ReturnValue.erase(0, 1);
+            }
+        } 
+////////////////////////////////////////////////////////////////////////////////////////////////////
 
         rohwert = NUMBERS[j]->ReturnRawValue;
 

+ 1 - 5
code/components/jomjol_flowcontroll/ClassFlowPostProcessing.h

@@ -9,7 +9,6 @@
 
 
 struct NumberPost {
-//    int PreValueAgeStartup; 
     float MaxRateValue;
     bool useMaxRateValue;
     bool ErrorMessage;
@@ -30,14 +29,10 @@ struct NumberPost {
     int AnzahlDigital;
     int DecimalShift;
     int Nachkomma;
-//    ClassFlowAnalog* ANALOG;
-//    ClassFlowDigit* DIGIT;
 
     digit *digit_roi;
     analog *analog_roi;
 
-
-
     string name;
 };
 
@@ -53,6 +48,7 @@ protected:
 
     int PreValueAgeStartup; 
     bool ErrorMessage;
+    bool IgnoreLeadingNaN;          // SPEZIALFALL für User Gustl
 
 
     ClassFlowAnalog* flowAnalog;

+ 3 - 3
code/main/version.cpp

@@ -1,4 +1,4 @@
-const char* GIT_REV="7ae08e5";
+const char* GIT_REV="eb02e0a";
 const char* GIT_TAG="";
-const char* GIT_BRANCH="master";
-const char* BUILD_TIME="2021-08-24 08:35";
+const char* GIT_BRANCH="rolling";
+const char* BUILD_TIME="2021-08-30 21:07";

+ 3 - 3
code/version.cpp

@@ -1,4 +1,4 @@
-const char* GIT_REV="7ae08e5";
+const char* GIT_REV="eb02e0a";
 const char* GIT_TAG="";
-const char* GIT_BRANCH="master";
-const char* BUILD_TIME="2021-08-24 08:35";
+const char* GIT_BRANCH="rolling";
+const char* BUILD_TIME="2021-08-30 21:07";

BIN
firmware/bootloader.bin


BIN
firmware/firmware.bin