EtCalib[] array size for Torino corrected, index checked when accessing the array.
This commit is contained in:
@@ -55,7 +55,7 @@ namespace TBF.BenchControl.Elde
|
||||
public int ScopeSamples(int i, int j, int k) { return controlCom.ScopeSamples(i, j, k); }
|
||||
public uint DigitalInputs { get { return controlCom.DigitalInputs; } }
|
||||
public float AnalogInput(int adcNr0) { return controlCom.AnalogInput(adcNr0); }
|
||||
public uint AnalogInputRaw(int adcNr0, int bank) { return controlCom.AnalogInputRaw(adcNr0, bank); } /// bank0=RV, bank1=Temp
|
||||
public uint AnalogInputRaw(int adcNr0, int bank) { return controlCom.AnalogInputRaw(adcNr0, bank); } /// adcNr0: 0=RV1, 1=RV2,... bank: 0=RV, 1=Temp
|
||||
public float ReferenceVolume { get { return controlCom.ReferenceVolume; } }
|
||||
public float VyslExt(int wmNr0, int what) { return controlCom.VyslExt(wmNr0, what); }
|
||||
|
||||
@@ -80,9 +80,9 @@ namespace TBF.BenchControl.Elde
|
||||
// Array length is the reference flowmeters count plus one
|
||||
#if DN100
|
||||
public float[] EtCalib = new float[6] { 1, 1, 1, 1, 1, 1 };
|
||||
#elif MUNICH
|
||||
public float[] EtCalib = new float[5] { 1, 1, 1, 1, 1 };
|
||||
#elif FUZHOU150 || FUZHOU300 || PT200IL || TORINO50
|
||||
#elif MUNICH || TORINO50
|
||||
public float[] EtCalib = new float[5] { 1, 1, 1, 1, 1 };
|
||||
#elif FUZHOU150 || FUZHOU300 || PT200IL
|
||||
public float[] EtCalib = new float[6] { 1, 1, 1, 1, 1, 1 };
|
||||
#endif
|
||||
public uint[] DiverterEdge = new uint[2] { 50, 50 };
|
||||
|
||||
@@ -36,9 +36,9 @@ namespace TBF.BenchControl.Elde.FlowMeter
|
||||
ControlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
if (ControlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
ControlBoard.EtCalib[Idx1] = flowMeterCfg.NominalFlow;
|
||||
|
||||
/// Prepare data for SendCalibData() control board component method
|
||||
if (Idx1 >= ControlBoard.EtCalib.Length) throw new Exception("Flowmeter " + Name + " parameter 'Idx1' is out of range");
|
||||
ControlBoard.EtCalib[Idx1] = flowMeterCfg.NominalFlow;
|
||||
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace TBF.BenchControl.Elde.FlowMeterTwins
|
||||
FlowMeter2 = (TBF.BenchControl.Elde.FlowMeter.FlowMeter)TbfComponents.FindComponent(flowMeterCfg.FlowMeter2, components);
|
||||
if (FlowMeter2 == null) throw new Exception("Cannot find FlowMeter2 component");
|
||||
|
||||
ControlBoard.EtCalib[Idx1] = flowMeterCfg.NominalFlow;
|
||||
ControlBoard.EtCalib[Idx1] = flowMeterCfg.NominalFlow; /// Idx1==0 for FlowMeterTwins
|
||||
|
||||
/// Prepare data for SendCalibData() control board component method
|
||||
|
||||
|
||||
Reference in New Issue
Block a user