IControlBoard.SpecifyInvertedValves instead of InitializeComponent
This commit is contained in:
@@ -9,7 +9,7 @@ namespace TBF.BenchControl.ControlBoard
|
||||
{
|
||||
public interface IControlBoard : IDevice, IValveControl
|
||||
{
|
||||
void InitializeComponent(object thirdPartyComponent, UInt128 valvesToInvert, double[] tankCapacities);
|
||||
void SpecifyInvertedValves(UInt128 valvesToInvert);
|
||||
|
||||
/// <summary>
|
||||
/// Display value in a third party component, update UI
|
||||
|
||||
@@ -377,7 +377,7 @@ namespace TBF.BenchControl.ControlBoard.Legacy
|
||||
/// Specific pre-initialization for control board only
|
||||
/// </summary>
|
||||
/// <param name="eldeComponent"></param>
|
||||
public void InitializeComponent(object eldeComponent, UInt128 valvesToInvert, double[] tankCapacities)
|
||||
public void SpecifyInvertedValves(UInt128 valvesToInvert)
|
||||
{
|
||||
this.valvesToInvert = valvesToInvert;
|
||||
this.benchModelRoute = valvesToInvert;
|
||||
@@ -388,17 +388,16 @@ namespace TBF.BenchControl.ControlBoard.Legacy
|
||||
}
|
||||
else
|
||||
{
|
||||
#if !JUZNA_AFRIKA_NEW
|
||||
controlCom = new ControlComWrap(eldeComponent);
|
||||
#endif
|
||||
// controlCom = new ControlComWrap(eldeComponent);
|
||||
|
||||
/// Default number of scales (and BalanceRange length) is 2.
|
||||
/// If there are more scales, BalanceRange length is larger.
|
||||
int scalesCnt = Math.Max(2, tankCapacities.Length);
|
||||
BalanceRange = new uint[scalesCnt];
|
||||
for (int i = 0; i < scalesCnt; i++)
|
||||
{
|
||||
BalanceRange[i] = (uint)((i < tankCapacities.Length) ? tankCapacities[i] : 0);
|
||||
}
|
||||
// int scalesCnt = Math.Max(2, tankCapacities.Length);
|
||||
// BalanceRange = new uint[scalesCnt];
|
||||
// for (int i = 0; i < scalesCnt; i++)
|
||||
// {
|
||||
// BalanceRange[i] = (uint)((i < tankCapacities.Length) ? tankCapacities[i] : 0);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace TBF.BenchControl.ControlBoard.New
|
||||
|
||||
}
|
||||
|
||||
public void InitializeComponent(object thirdPartyComponent, UInt128 valvesToInvert, double[] tankCapacities)
|
||||
public void SpecifyInvertedValves(UInt128 valvesToInvert)
|
||||
{
|
||||
this.valvesToInvert = valvesToInvert;
|
||||
this.benchModelRoute = valvesToInvert;
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace TBF.BenchControl.ControlBoard.Papouch
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public void InitializeComponent(object thirdPartyComponent, UInt128 valvesToInvert, double[] tankCapacities)
|
||||
public void SpecifyInvertedValves(UInt128 valvesToInvert)
|
||||
{
|
||||
this.valvesToInvert = valvesToInvert;
|
||||
this.benchModelRoute = valvesToInvert;
|
||||
|
||||
Reference in New Issue
Block a user