iPerlCommunicationForm : Serious bug fix !!! ver. 2.26.1717
This commit is contained in:
parent
d3c62e353c
commit
c2826cbd27
@ -2338,8 +2338,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
}
|
||||
}
|
||||
|
||||
Byte q2CorrRL = 0;
|
||||
Byte q2CorrLR = 0;
|
||||
int q2CorrRL = 0;
|
||||
int q2CorrLR = 0;
|
||||
///
|
||||
if (q2CorrType == Q2CorrType.Standard || q2CorrType == Q2CorrType.Standard_incl_05 || q2CorrType == Q2CorrType.UpdateBothQ2FactorsTestRLDir)
|
||||
{
|
||||
@ -2352,8 +2352,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
return CommErr.None;
|
||||
}
|
||||
|
||||
q2CorrRL = (byte)((int)Math.Round(1.1 * q2Correction) & 0x000000FF);
|
||||
q2CorrLR = (byte)((int)Math.Round(0.5 * q2Correction) & 0x000000FF);
|
||||
q2CorrRL = (int)Math.Round(1.1 * q2Correction);
|
||||
q2CorrLR = (int)Math.Round(0.5 * q2Correction);
|
||||
}
|
||||
else if (q2CorrType == Q2CorrType.Dewa || q2CorrType == Q2CorrType.Dewa_incl_05)
|
||||
{
|
||||
@ -2367,8 +2367,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
}
|
||||
|
||||
/// Use the same correction factor in both directions
|
||||
q2CorrRL = (byte)((int)Math.Round(1.0 * q2Correction2) & 0x000000FF);
|
||||
q2CorrLR = (byte)((int)Math.Round(1.0 * q2Correction2) & 0x000000FF);
|
||||
q2CorrRL = (int)Math.Round(1.0 * q2Correction2);
|
||||
q2CorrLR = (int)Math.Round(1.0 * q2Correction2);
|
||||
}
|
||||
else if (q2CorrType == Q2CorrType.Greece || q2CorrType == Q2CorrType.Greece_incl_05 || q2CorrType == Q2CorrType.UpdateBothQ2FactorsTestLRDir)
|
||||
{
|
||||
@ -2381,8 +2381,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
return CommErr.None;
|
||||
}
|
||||
|
||||
q2CorrRL = (byte)((int)Math.Round(2.0 * q2Correction2) & 0x000000FF);
|
||||
q2CorrLR = (byte)((int)Math.Round(1.0 * q2Correction2) & 0x000000FF);
|
||||
q2CorrRL = (int)Math.Round(2.0 * q2Correction2);
|
||||
q2CorrLR = (int)Math.Round(1.0 * q2Correction2);
|
||||
}
|
||||
else if (q2CorrType == Q2CorrType.RL || q2CorrType == Q2CorrType.RL_incl_05 || q2CorrType == Q2CorrType.ConditionalUpdateRL) /// RL only
|
||||
{
|
||||
@ -2392,7 +2392,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
return CommErr.None;
|
||||
}
|
||||
|
||||
q2CorrRL = (byte)((int)Math.Round(q2Correction) & 0x000000FF);
|
||||
q2CorrRL = (int)Math.Round(q2Correction);
|
||||
}
|
||||
else if (q2CorrType == Q2CorrType.LR || q2CorrType == Q2CorrType.LR_incl_05 || q2CorrType == Q2CorrType.ConditionalUpdateLR) /// LR only
|
||||
{
|
||||
@ -2402,12 +2402,12 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
return CommErr.None;
|
||||
}
|
||||
|
||||
q2CorrLR = (byte)((int)Math.Round(q2Correction2) & 0x000000FF);
|
||||
q2CorrLR = (int)Math.Round(q2Correction2);
|
||||
}
|
||||
else if ((q2CorrType == Q2CorrType.Update) || (q2CorrType == Q2CorrType.ConditionalUpdate))
|
||||
{
|
||||
q2CorrRL = (byte)((int)Math.Round(q2Correction) & 0x000000FF);
|
||||
q2CorrLR = (byte)((int)Math.Round(q2Correction2) & 0x000000FF);
|
||||
q2CorrRL = (int)Math.Round(q2Correction);
|
||||
q2CorrLR = (int)Math.Round(q2Correction2);
|
||||
}
|
||||
|
||||
|
||||
@ -2423,7 +2423,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
///
|
||||
/// Write R-L Q2 correction factor only
|
||||
///
|
||||
byte[] wrData = new byte[1] { q2CorrRL };
|
||||
byte[] wrData = new byte[1] { (byte)q2CorrRL };
|
||||
for (int j = 0; j < cfg.MaxCommRetries; j++)
|
||||
{
|
||||
if (0 == WriteRequestPort(threadId, ihead, MessageID.MetrologyMemory, Q2CorrFactorsAddrRL, wrData.Length, wrData, cfg.CommTimeout))
|
||||
@ -2442,7 +2442,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
///
|
||||
/// Write L-R Q2 correction factor only
|
||||
///
|
||||
byte[] wrData = new byte[1] { q2CorrLR };
|
||||
byte[] wrData = new byte[1] { (byte)q2CorrLR };
|
||||
for (int j = 0; j < cfg.MaxCommRetries; j++)
|
||||
{
|
||||
if (0 == WriteRequestPort(threadId, ihead, MessageID.MetrologyMemory, Q2CorrFactorsAddrLR, wrData.Length, wrData, cfg.CommTimeout))
|
||||
@ -2461,7 +2461,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
///
|
||||
/// Write both Q2 correction factors
|
||||
///
|
||||
byte[] wrData = new byte[2] { q2CorrLR, q2CorrRL };
|
||||
byte[] wrData = new byte[2] { (byte)q2CorrLR, (byte)q2CorrRL };
|
||||
for (int j = 0; j < cfg.MaxCommRetries; j++)
|
||||
{
|
||||
if (0 == WriteRequestPort(threadId, ihead, MessageID.MetrologyMemory, Q2CorrFactorsAddr, wrData.Length, wrData, cfg.CommTimeout))
|
||||
@ -2514,15 +2514,15 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
{
|
||||
if (q2CorrType == Q2CorrType.RL)
|
||||
{
|
||||
resultStr = string.Format("Q2 correction: RL={0}", (SByte)q2CorrRL);
|
||||
resultStr = string.Format("Q2 correction: RL={0}", q2CorrRL);
|
||||
}
|
||||
else if (q2CorrType == Q2CorrType.LR)
|
||||
{
|
||||
resultStr = string.Format("Q2 correction: LR={0}", (SByte)q2CorrLR);
|
||||
resultStr = string.Format("Q2 correction: LR={0}", q2CorrLR);
|
||||
}
|
||||
else
|
||||
{
|
||||
resultStr = string.Format("Q2 correction: RL={0}, LR={1}", (SByte)q2CorrRL, (SByte)q2CorrLR);
|
||||
resultStr = string.Format("Q2 correction: RL={0}, LR={1}", q2CorrRL, q2CorrLR);
|
||||
}
|
||||
|
||||
rfidDataLogger.WarnFormat("{0}: {1}", ihead.Name, resultStr);
|
||||
|
||||
@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.26.1712.0")]
|
||||
[assembly: AssemblyFileVersion("2.26.1712.0")]
|
||||
[assembly: AssemblyVersion("2.26.1717.0")]
|
||||
[assembly: AssemblyFileVersion("2.26.1717.0")]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user