From c4ca299ce2e309f8e2c3e8d91d95f609ccd99e6e Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Thu, 29 Jul 2021 12:02:49 +0200 Subject: [PATCH] iPerlCommunication activity 'WriteDefaultQ2Corrections' modified. --- .../iPerlCommunicationForm.cs | 36 ++++++++++++++++++- .../iPerlCommunicationSeq.cs | 6 +--- .../iPerlCommunication/iPerlHead/IperlHead.cs | 1 + 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs index f9790f13c..0e17ee2d5 100644 --- a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs +++ b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs @@ -1865,7 +1865,41 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication } else { - return WriteQ2Corrections(threadId, ihead, wm, ref resultStr, 0, 0); + int q2corrRL; + int q2corrLR; + switch (ihead.MeterType) + { + case MeterType.DN15: + q2corrRL = cfg.DfltQ2c_15_rl; + q2corrLR = cfg.DfltQ2c_15_lr; + break; + case MeterType.DN20: + q2corrRL = cfg.DfltQ2c_20_rl; + q2corrLR = cfg.DfltQ2c_20_lr; + break; + case MeterType.DN25: + q2corrRL = cfg.DfltQ2c_25_63_rl; + q2corrLR = cfg.DfltQ2c_25_63_lr; + break; + case MeterType.DN25_Q3_10: + q2corrRL = cfg.DfltQ2c_25_10_rl; + q2corrLR = cfg.DfltQ2c_25_10_lr; + break; + case MeterType.DN32: + q2corrRL = cfg.DfltQ2c_32_rl; + q2corrLR = cfg.DfltQ2c_32_lr; + break; + case MeterType.DN40: + q2corrRL = cfg.DfltQ2c_40_rl; + q2corrLR = cfg.DfltQ2c_40_lr; + break; + default: + q2corrRL = 0; + q2corrLR = 0; + break; + } + + return WriteQ2Corrections(threadId, ihead, wm, ref resultStr, q2corrLR, q2corrRL); } } diff --git a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs index 8dd00c1f8..f82c5ce8d 100644 --- a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs +++ b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs @@ -82,10 +82,6 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication { IsQ2PreCorrectionCalculated = GetQ2PreCorrectionsOrBackups(cfg, wmType, out CalculatedQ2PreCorrectionLR, out CalculatedQ2PreCorrectionRL); } - else - { - - } /// Generate test results Results.Entities.TestRslt tstRslt = BatchRslts.GetTestRslt(test.Name, 0); @@ -101,7 +97,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication { if (mtr.TestRslt == tstRslt) { - mtr.Passed = IsQ2PreCorrectionCalculated; + mtr.Passed = !cfg.UseWebService || IsQ2PreCorrectionCalculated; mtr.TestDone = true; break; } diff --git a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs index 60b7ced0d..e31c03b7c 100644 --- a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs +++ b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlHead/IperlHead.cs @@ -38,6 +38,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead public int RfidComPortNr { get { return iperlHeadCfg.RfidComPortNr; } } public int MuxBoardNrOrGroup14 { get { return iperlHeadCfg.MuxBoardNr; } } public int Group { get { return iperlHeadCfg.Group; } } + public iPerlHead.MeterType MeterType { get { return iperlHeadCfg.MeterType; } } public int Position {