From a6a517b6eac8d348a0128b1e10eb99306e81284f Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Mon, 6 Feb 2023 08:48:07 +0100 Subject: [PATCH] Bug fixes : TestRslt.IsStartStop( ), IsRelErrTest( ), IsVolumeMethod( ), ... --- Results/Entities/TestRslt.cs | 12 ++++++------ TBF/Rig/Uni/FlowMeter/FlowMeter.cs | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Results/Entities/TestRslt.cs b/Results/Entities/TestRslt.cs index c3fb7c674..2c80bc3ab 100644 --- a/Results/Entities/TestRslt.cs +++ b/Results/Entities/TestRslt.cs @@ -158,11 +158,11 @@ namespace Results.Entities 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 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 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 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() { @@ -171,9 +171,9 @@ namespace Results.Entities else if (MethodClass.Contains("TestMethods.FlyingStartMassCollectionProlonged.")) return "MS"; else if (MethodClass.Contains("TestMethods.FlyingStartMassCollectionComparative.")) return "MS"; else if (MethodClass.Contains("TestMethods.FlyingStart.")) return "VS"; - else if (MethodClass.Contains("TestMethods.FixedStartMassCollection.")) return "MP"; - else if (MethodClass.Contains("TestMethods.FixedStartTankCollection.")) return "VP"; - else if (MethodClass.Contains("TestMethods.FixedStart.")) return "VP"; + else if (MethodClass.Contains("TestMethods.StandingStartMassCollection.")) return "MP"; + else if (MethodClass.Contains("TestMethods.StandingStartTankCollection.")) return "VP"; + else if (MethodClass.Contains("TestMethods.StandingStart.")) return "VP"; else return string.Empty; } diff --git a/TBF/Rig/Uni/FlowMeter/FlowMeter.cs b/TBF/Rig/Uni/FlowMeter/FlowMeter.cs index dfbea8cc7..e24d75ac2 100644 --- a/TBF/Rig/Uni/FlowMeter/FlowMeter.cs +++ b/TBF/Rig/Uni/FlowMeter/FlowMeter.cs @@ -103,6 +103,8 @@ namespace TBF.Rig.Uni.FlowMeter public double LtrPerPulseCorrected(double flow, float temperature) { + if (flow == 0) return LtrPerPulse; + /// Apply correction int rng = GetRange(temperature, temperature); double correctedFlow = (measurementCorrections == null || rng < 0) ? flow : CorrectedFlow(flow, rng);