Initialization of 30 components changed, done in Initialize( ).

This commit is contained in:
Milan Hanajik
2021-04-03 00:54:27 +02:00
parent cb1a66381f
commit a58fe1f997
30 changed files with 347 additions and 445 deletions
+8 -12
View File
@@ -151,10 +151,7 @@ namespace TBF.Rig.Modbus.TankSelector
}
public TankSelector()
{
CreateConditions(false);
}
public TankSelector() { }
public TankSelector(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
: base(cfg)
@@ -176,13 +173,17 @@ namespace TBF.Rig.Modbus.TankSelector
if (warmCooling == null) throw new Exception(string.Format("Component '{0}' cannot find temperature controller '{1}'", Name, tankSelectorCfg.WarmWaterCooling));
if (coldCooling == null) throw new Exception(string.Format("Component '{0}' cannot find temperature controller '{1}'", Name, tankSelectorCfg.ColdWaterCooling));
CreateConditions(true);
State = State.Unknown;
CreateConditions(true);
log.Fatal(this.ToString());
}
public override void Initialize()
{
State = State.Unknown;
SetOutputs(0); /// Reset all Quido outputs
}
/// <summary>
/// Recover the TankSelector state from ContolBoard.DigitalInputs
@@ -257,11 +258,6 @@ namespace TBF.Rig.Modbus.TankSelector
///
/// IDevice interface implementation
///
public void Initialize()
{
SetOutputs(0); /// Reset all Quido outputs
}
public void RunDeviceBefore()
{
if (StateMachine.Time == 3)