MagFlux: - Support for legacy control to calibrate
This commit is contained in:
@@ -673,6 +673,32 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
|
||||
SetupFromConfigFile(slot, ignoreCorruptedData, true, true);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Copy list of flow results to <see cref="MagFlux.DataPackages.DataTypes.Calibration"/> and kick off the
|
||||
/// writing of calibrations to MagFlux.
|
||||
/// </summary>
|
||||
/// <param name="results">List of flow results</param>
|
||||
public void WriteCalibrationTestBench(List<WaterMeter.DataPackages.MeasurementRecords.FlowDeviations> results)
|
||||
{
|
||||
if (RequestProtocol == null) return;
|
||||
var calibrationsCmPerH = new List<Calibration>();
|
||||
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);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
void IMeter.SetupFromConfigFile(Int32 slot, Boolean ignoreCorruptedData, Boolean useRequest, Boolean useStreaming)
|
||||
{
|
||||
SetupFromConfigFile(slot, ignoreCorruptedData);
|
||||
}
|
||||
/// <summary>
|
||||
/// Setup water meter from configuration file:
|
||||
/// -slot,
|
||||
@@ -1159,17 +1185,6 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void WriteCalibrationTestBench(List<WaterMeter.DataPackages.MeasurementRecords.FlowDeviations> results)
|
||||
{
|
||||
//todo: convert to CalibrationPoints in L per H
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
void IMeter.SetupFromConfigFile(Int32 slot, Boolean ignoreCorruptedData, Boolean useRequest, Boolean useStreaming)
|
||||
{
|
||||
SetupFromConfigFile(slot, ignoreCorruptedData);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user