diff --git a/Config/Entities/MeasurementCorrection.cs b/Config/Entities/MeasurementCorrection.cs index e2df3b972..11ea46195 100644 --- a/Config/Entities/MeasurementCorrection.cs +++ b/Config/Entities/MeasurementCorrection.cs @@ -53,10 +53,9 @@ namespace Config.Entities return corrections[0].Correction; } - int count = corrections.Count; - for (int i = 1; i < count; i++) + for (int i = 1; i < corrections.Count; i++) { - if (rawValue < corrections[0].Measurement) + if (rawValue < corrections[i].Measurement) { double d1 = rawValue - corrections[i - 1].Measurement; double d2 = corrections[i].Measurement - rawValue; @@ -75,7 +74,7 @@ namespace Config.Entities } /// rawValue is above the highest value in the correction table - return corrections[count - 1].Correction; + return corrections[corrections.Count - 1].Correction; } } } diff --git a/Results/WMeterRsltItemSpec.cs b/Results/WMeterRsltItemSpec.cs index c4696ad0b..48a97373a 100644 --- a/Results/WMeterRsltItemSpec.cs +++ b/Results/WMeterRsltItemSpec.cs @@ -222,7 +222,7 @@ namespace Results AllItems.Add(new WMeterRsltItemSpec(ItemID.ConstMaster, string.Format("k MID ()"), "Const. of the reference flow meter", Quantity.PulsePerLtr, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", ((w.GetTestRslt(t).ConstMaster < float.Epsilon) ? 0 : (1 / w.GetTestRslt(t).ConstMaster))))); AllItems.Add(new WMeterRsltItemSpec(ItemID.ConstMasterRaw, string.Format("k MID raw ()"),"Const. of the ref. flow meter uncorrected", Quantity.PulsePerLtr, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", ((w.GetTestRslt(t).ConstMasterRaw < float.Epsilon) ? 0 : (1 / w.GetTestRslt(t).ConstMasterRaw))))); - AllItems.Add(new WMeterRsltItemSpec(ItemID.ConstMasterCorr,string.Format("k MID corr ()"), "Const. of the ref. flow meter corrected", Quantity.PulsePerLtr, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", ((w.GetTestRslt(t).ConstMasterRaw < float.Epsilon) ? 0 : (1 / w.GetTestRslt(t).ConstMasterCorr))))); + AllItems.Add(new WMeterRsltItemSpec(ItemID.ConstMasterCorr,string.Format("k MID corr ()"), "Const. of the ref. flow meter corrected", Quantity.PulsePerLtr, ItemCategory.TestResult, (w, t, u, f, p) => (w.GetTestRslt(t) == null) ? "" : FormatDbl(u, f, p, "V4", ((w.GetTestRslt(t).ConstMasterCorr < float.Epsilon) ? 0 : (1 / w.GetTestRslt(t).ConstMasterCorr))))); /// /// Temperature diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index 36b1d0318..924b9dc8d 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("3.1.1852.0")] -[assembly: AssemblyFileVersion("3.1.1852.0")] +[assembly: AssemblyVersion("3.1.1853.0")] +[assembly: AssemblyFileVersion("3.1.1853.0")]