iPerlCommunication, etc: A correct calibration factor is written to iPerl.
This commit is contained in:
+1
@@ -456,6 +456,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
||||
WaterMeters.iPerl.WaterMeter iPerl = (sensPath.RegisterReaders[i] as WaterMeters.iPerl.WaterMeter);
|
||||
tstRslt.Meters[i].VolumeMeter = (float)(iPerl.VolumeLtrEnd - iPerl.VolumeLtrStart);
|
||||
tstRslt.Meters[i].VolumeRef = tstRslt.VolumeCTV * (float)(iPerl.TimestampSecEnd - iPerl.TimestampSecStart) / tstRslt.Time;
|
||||
iPerl.VolumeLtrRef = (double)tstRslt.Meters[i].VolumeRef;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+2
-4
@@ -805,11 +805,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
|
||||
CommErr error = CommErr.Write;
|
||||
|
||||
UInt16 factor = wm.CalibrationFactor; /// Original calibration factor
|
||||
|
||||
/// Write the calculated calibration factor
|
||||
UInt16 newCalFactor = wm.CalculatedCalibrationFactor;
|
||||
byte[] data = new byte[2] { (byte)(newCalFactor & 0x00FF), (byte)((newCalFactor >> 8) & 0x00FF) };
|
||||
UInt16 newCalibFactor = wm.CalculateNewCalibFactor(wm.CalibrationFactor);
|
||||
byte[] data = new byte[2] { (byte)(newCalibFactor & 0x00FF), (byte)((newCalibFactor >> 8) & 0x00FF) };
|
||||
for (int j = 0; j < MaxCommRetries; j++)
|
||||
{
|
||||
if (0 == WriteRequestPort(boardNr, MessageID.Calibration, 2, 2, data, CommTimeout)) { error = CommErr.None; break; }
|
||||
|
||||
Reference in New Issue
Block a user