Bugfixes: (1) PumpTandem was missing a Mask to be used as Valve, (2) Column widths in results screen
This commit is contained in:
@@ -4,7 +4,7 @@ using log4net;
|
||||
|
||||
namespace TBF.BenchControl.Elde.PumpTandem
|
||||
{
|
||||
public class Pump : ComponentBase, GenericDevices.IPumpFM, IOperation
|
||||
public class Pump : ComponentBase, GenericDevices.IPumpFM, GenericDevices.IValve, IOperation
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Pump));
|
||||
public override string ToString() { return string.Format("PumpTandem({0})", Cfg.ToString(1)); }
|
||||
@@ -20,6 +20,15 @@ namespace TBF.BenchControl.Elde.PumpTandem
|
||||
public bool State { get { return pump1.State || pump2.State; } }
|
||||
public int Delay { get { return Math.Max(pump1.Delay, pump2.Delay); } }
|
||||
public float Power { get { return pumpCfg.TestParams.Power; } }
|
||||
public ValveCategory Category { get { return ValveCategory.Feeding; } } /// Pump category is Feeding
|
||||
public GenericDevices.IValve CoupledTo { get { return null; } }
|
||||
public bool InvertCouple { get { return false; } }
|
||||
public int LagOpening { get { return 0; } }
|
||||
public int LagClosing { get { return 0; } }
|
||||
|
||||
readonly ulong mask1;
|
||||
readonly ulong mask2;
|
||||
public ulong Mask { get { return mask1 | mask2; } } /// derived from masks of two pumps
|
||||
|
||||
public Pump(PumpCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
@@ -35,6 +44,14 @@ namespace TBF.BenchControl.Elde.PumpTandem
|
||||
pumpFm1 = pump1 as GenericDevices.IPumpFM;
|
||||
pumpFm2 = pump2 as GenericDevices.IPumpFM;
|
||||
|
||||
if (pump1 is Elde.Pump.Pump) { mask1 = (pump1 as Elde.Pump.Pump).Mask; }
|
||||
else if (pump1 is Elde.PumpWithFM.Pump) { mask1 = (pump1 as Elde.PumpWithFM.Pump).Mask; }
|
||||
else { mask1 = 0; }
|
||||
|
||||
if (pump2 is Elde.Pump.Pump) { mask2 = (pump2 as Elde.Pump.Pump).Mask; }
|
||||
else if (pump2 is Elde.PumpWithFM.Pump) { mask2 = (pump2 as Elde.PumpWithFM.Pump).Mask; }
|
||||
else { mask2 = 0; }
|
||||
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
@@ -53,6 +70,7 @@ namespace TBF.BenchControl.Elde.PumpTandem
|
||||
}
|
||||
else if ((pumpFm1 != null) && (pumpFm2 == null))
|
||||
{
|
||||
// TODO
|
||||
if (powerArg >= 50)
|
||||
{
|
||||
pumpFm1.TurnOn(2 * (powerArg - 50.0f));
|
||||
|
||||
Reference in New Issue
Block a user