Q2 corr.: Correction inside range -0.5 .. 0.5 %
This commit is contained in:
@@ -2223,12 +2223,12 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
Byte q2CorrRL = 0;
|
||||
Byte q2CorrLR = 0;
|
||||
///
|
||||
if (q2CorrType == Q2CorrType.Standard)
|
||||
if (q2CorrType == Q2CorrType.Standard || q2CorrType == Q2CorrType.Standard_incl_05)
|
||||
{
|
||||
///
|
||||
/// Standard process
|
||||
///
|
||||
if (Math.Abs(q2adjResult.Error - ihead.CalibTargetQ2) <= 0.5)
|
||||
if (q2CorrType == Q2CorrType.Standard && Math.Abs(q2adjResult.Error - ihead.CalibTargetQ2) <= 0.5)
|
||||
{
|
||||
resultStr = string.Format("Q2 correction = 0 (writing bypassed)");
|
||||
return CommErr.None;
|
||||
@@ -2237,12 +2237,12 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
q2CorrRL = (byte)((int)Math.Round(1.1 * q2Correction) & 0x000000FF);
|
||||
q2CorrLR = (byte)((int)Math.Round(0.5 * q2Correction) & 0x000000FF);
|
||||
}
|
||||
else if (q2CorrType == Q2CorrType.Dewa)
|
||||
else if (q2CorrType == Q2CorrType.Dewa || q2CorrType == Q2CorrType.Dewa_incl_05)
|
||||
{
|
||||
///
|
||||
/// Process for DEWA
|
||||
///
|
||||
if (Math.Abs(q2adjResult.Error - ihead.CalibTargetQ2) <= 0.5)
|
||||
if (q2CorrType == Q2CorrType.Dewa && Math.Abs(q2adjResult.Error - ihead.CalibTargetQ2) <= 0.5)
|
||||
{
|
||||
resultStr = string.Format("Q2 correction = 0 (writing bypassed)");
|
||||
return CommErr.None;
|
||||
@@ -2252,23 +2252,23 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
q2CorrRL = (byte)((int)Math.Round(1.1 * q2Correction) & 0x000000FF);
|
||||
q2CorrLR = (byte)((int)Math.Round(1.1 * q2Correction) & 0x000000FF);
|
||||
}
|
||||
else if (q2CorrType == Q2CorrType.Greece)
|
||||
else if (q2CorrType == Q2CorrType.Greece || q2CorrType == Q2CorrType.Greece_incl_05)
|
||||
{
|
||||
///
|
||||
/// Process for Greece
|
||||
///
|
||||
if (Math.Abs(q2adjResult.Error - ihead.CalibTargetQ2) <= 0.5)
|
||||
if (q2CorrType == Q2CorrType.Greece && Math.Abs(q2adjResult.Error - ihead.CalibTargetQ2) <= 0.5)
|
||||
{
|
||||
resultStr = string.Format("Q2 correction = 0 (writing bypassed)");
|
||||
return CommErr.None;
|
||||
}
|
||||
|
||||
q2CorrRL = (byte)((int)Math.Round(2.2 * q2Correction) & 0x000000FF);
|
||||
q2CorrRL = (byte)((int)Math.Round(2.0 * q2Correction) & 0x000000FF);
|
||||
q2CorrLR = (byte)((int)Math.Round(1.1 * q2Correction) & 0x000000FF);
|
||||
}
|
||||
else if (q2CorrType == Q2CorrType.RL) /// SUEZ
|
||||
else if (q2CorrType == Q2CorrType.RL || q2CorrType == Q2CorrType.RL_incl_05) /// SUEZ RL only
|
||||
{
|
||||
if (Math.Abs(q2adjResult.Error - ihead.CalibTargetQ2) <= 0.5)
|
||||
if (q2CorrType == Q2CorrType.RL && Math.Abs(q2adjResult.Error - ihead.CalibTargetQ2) <= 0.5)
|
||||
{
|
||||
resultStr = string.Format("Q2 correction = 0 (writing bypassed)");
|
||||
return CommErr.None;
|
||||
@@ -2276,9 +2276,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
|
||||
q2CorrRL = (byte)((int)Math.Round(q2Correction) & 0x000000FF);
|
||||
}
|
||||
else if (q2CorrType == Q2CorrType.LR) /// SUEZ
|
||||
else if (q2CorrType == Q2CorrType.LR || q2CorrType == Q2CorrType.LR_incl_05) /// SUEZ LR only
|
||||
{
|
||||
if (Math.Abs(q2adjResult.Error - ihead.CalibTargetQ2) <= 0.5)
|
||||
if (q2CorrType == Q2CorrType.LR && Math.Abs(q2adjResult.Error - ihead.CalibTargetQ2) <= 0.5)
|
||||
{
|
||||
resultStr = string.Format("Q2 correction = 0 (writing bypassed)");
|
||||
return CommErr.None;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2017-2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2017-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -16,6 +16,11 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
Greece,
|
||||
RL,
|
||||
LR,
|
||||
Standard_incl_05,
|
||||
Dewa_incl_05,
|
||||
Greece_incl_05,
|
||||
RL_incl_05,
|
||||
LR_incl_05,
|
||||
Update,
|
||||
ConditionalUpdate,
|
||||
Count,
|
||||
|
||||
Reference in New Issue
Block a user