diff --git a/Common/Hardware/WaterMeter/MagFlux/MagFluxCore/MagFluxMeter.cs b/Common/Hardware/WaterMeter/MagFlux/MagFluxCore/MagFluxMeter.cs
index 0618e143..c60b2787 100644
--- a/Common/Hardware/WaterMeter/MagFlux/MagFluxCore/MagFluxMeter.cs
+++ b/Common/Hardware/WaterMeter/MagFlux/MagFluxCore/MagFluxMeter.cs
@@ -673,6 +673,32 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
SetupFromConfigFile(slot, ignoreCorruptedData, true, true);
}
+
+ ///
+ /// Copy list of flow results to and kick off the
+ /// writing of calibrations to MagFlux.
+ ///
+ /// List of flow results
+ public void WriteCalibrationTestBench(List results)
+ {
+ if (RequestProtocol == null) return;
+ var calibrationsCmPerH = new List();
+ var calibrationCmPerH = new Calibration();
+ foreach (var result in results)
+ {
+ calibrationCmPerH.refFlowRate = (Single)result.MeasuredRefFlowQmPerH;
+ calibrationCmPerH.dutFlowRate = (Single)result.MeasuredDutFlowQmPerH;
+ calibrationsCmPerH.Add(calibrationCmPerH);
+ }
+
+ RequestProtocol.SetCalibrationPoints(calibrationsCmPerH);
+ }
+
+ ///
+ void IMeter.SetupFromConfigFile(Int32 slot, Boolean ignoreCorruptedData, Boolean useRequest, Boolean useStreaming)
+ {
+ SetupFromConfigFile(slot, ignoreCorruptedData);
+ }
///
/// Setup water meter from configuration file:
/// -slot,
@@ -1159,17 +1185,6 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
}
}
}
-
- public void WriteCalibrationTestBench(List results)
- {
- //todo: convert to CalibrationPoints in L per H
- }
-
- ///
- void IMeter.SetupFromConfigFile(Int32 slot, Boolean ignoreCorruptedData, Boolean useRequest, Boolean useStreaming)
- {
- SetupFromConfigFile(slot, ignoreCorruptedData);
- }
#endregion
}
}
diff --git a/Common/Ui/MagFluxToolBox/FrmTest.cs b/Common/Ui/MagFluxToolBox/FrmTest.cs
index dfc03f21..ae972cc4 100644
--- a/Common/Ui/MagFluxToolBox/FrmTest.cs
+++ b/Common/Ui/MagFluxToolBox/FrmTest.cs
@@ -654,7 +654,7 @@ namespace Xylem.Common.Ui.MagFluxToolBox
return;
_magFluxMeter?.WriteCalibration(_calibPointsCmPerH);
- SetControlsDownloadIsFinished();
+ btnReadCalibration_Click(this, null);
}
private void btnAbortCalibration_Click(Object sender, EventArgs e)