Bug fixes : TestRslt.IsStartStop( ), IsRelErrTest( ), IsVolumeMethod( ), ...

This commit is contained in:
Milan Hanajik
2023-02-06 08:54:53 +01:00
parent 07f36f2945
commit a6a517b6ea
2 changed files with 8 additions and 6 deletions
+6 -6
View File
@@ -158,11 +158,11 @@ namespace Results.Entities
public virtual string Scale() { return (Components != null && Components.Scale != null) ? Components.Scale : string.Empty; } public virtual string Scale() { return (Components != null && Components.Scale != null) ? Components.Scale : string.Empty; }
public virtual string Diverter() { return (Components != null && Components.Diverter != null) ? Components.Diverter : string.Empty; } public virtual string Diverter() { return (Components != null && Components.Diverter != null) ? Components.Diverter : string.Empty; }
public virtual string RegValve() { return (Components != null && Components.RegValve != null) ? Components.RegValve : string.Empty; } public virtual string RegValve() { return (Components != null && Components.RegValve != null) ? Components.RegValve : string.Empty; }
public virtual bool IsRelErrTest() { return (MethodClass != null) ? (MethodClass.Contains("FixedStart") || MethodClass.Contains("FlyingStart") || MethodClass.Contains("CombinedWithDetection") || MethodClass.Contains("DiverterTest") || MethodClass.Contains("ManualEntry")) : true; } public virtual bool IsRelErrTest() { return (MethodClass != null) ? (MethodClass.Contains("StandingStart") || MethodClass.Contains("FlyingStart") || MethodClass.Contains("CombinedWithDetection") || MethodClass.Contains("DiverterTest") || MethodClass.Contains("ManualEntry")) : true; }
public virtual bool IsPMaxTest() { return (MethodClass != null) ? (MethodClass.Contains("PMaxTest") || MethodClass.Contains("LeakTest") || TestData.Method.ToLower().Contains("pmax")) : true; } public virtual bool IsPMaxTest() { return (MethodClass != null) ? (MethodClass.Contains("PMaxTest") || MethodClass.Contains("LeakTest") || TestData.Method.ToLower().Contains("pmax")) : true; }
public virtual bool IsStartStop() { return (MethodClass != null) ? MethodClass.Contains("FixedStart") : true; } public virtual bool IsStartStop() { return (MethodClass != null) ? MethodClass.Contains("StandingStart") : true; }
public virtual bool IsDiverter() { return (MethodClass != null) ? ((MethodClass.Contains("FlyingStart") && MethodClass.Contains("MassColl")) || MethodClass.Contains("DiverterTest")) : true; } public virtual bool IsDiverter() { return (MethodClass != null) ? ((MethodClass.Contains("FlyingStart") && MethodClass.Contains("MassColl")) || MethodClass.Contains("DiverterTest")) : true; }
public virtual bool IsVolumeMethod() { return (MethodClass != null) ? (MethodClass.Contains("TestMethods.FixedStart.") || MethodClass.Contains("TestMethods.FlyingStart.")) : false; } public virtual bool IsVolumeMethod() { return (MethodClass != null) ? (MethodClass.Contains("TestMethods.StandingStart.") || MethodClass.Contains("TestMethods.FlyingStart.")) : false; }
public virtual string MethodElde() public virtual string MethodElde()
{ {
@@ -171,9 +171,9 @@ namespace Results.Entities
else if (MethodClass.Contains("TestMethods.FlyingStartMassCollectionProlonged.")) return "MS"; else if (MethodClass.Contains("TestMethods.FlyingStartMassCollectionProlonged.")) return "MS";
else if (MethodClass.Contains("TestMethods.FlyingStartMassCollectionComparative.")) return "MS"; else if (MethodClass.Contains("TestMethods.FlyingStartMassCollectionComparative.")) return "MS";
else if (MethodClass.Contains("TestMethods.FlyingStart.")) return "VS"; else if (MethodClass.Contains("TestMethods.FlyingStart.")) return "VS";
else if (MethodClass.Contains("TestMethods.FixedStartMassCollection.")) return "MP"; else if (MethodClass.Contains("TestMethods.StandingStartMassCollection.")) return "MP";
else if (MethodClass.Contains("TestMethods.FixedStartTankCollection.")) return "VP"; else if (MethodClass.Contains("TestMethods.StandingStartTankCollection.")) return "VP";
else if (MethodClass.Contains("TestMethods.FixedStart.")) return "VP"; else if (MethodClass.Contains("TestMethods.StandingStart.")) return "VP";
else return string.Empty; else return string.Empty;
} }
+2
View File
@@ -103,6 +103,8 @@ namespace TBF.Rig.Uni.FlowMeter
public double LtrPerPulseCorrected(double flow, float temperature) public double LtrPerPulseCorrected(double flow, float temperature)
{ {
if (flow == 0) return LtrPerPulse;
/// Apply correction /// Apply correction
int rng = GetRange(temperature, temperature); int rng = GetRange(temperature, temperature);
double correctedFlow = (measurementCorrections == null || rng < 0) ? flow : CorrectedFlow(flow, rng); double correctedFlow = (measurementCorrections == null || rng < 0) ? flow : CorrectedFlow(flow, rng);