Diverter ADC value updated in DiverterCfgCtrl (More button).
This commit is contained in:
@@ -5,10 +5,11 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Dirichlet.Numerics;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.Diverter
|
||||
{
|
||||
public class Diverter : ComponentBase, GenericDevices.IDiverter
|
||||
public class Diverter : ComponentBase, IDevice, GenericDevices.IDiverter
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Diverter));
|
||||
public override string ToString() { return string.Format("Diverter({0})", Cfg.ToString(1)); }
|
||||
@@ -91,6 +92,19 @@ namespace TBF.BenchControl.Elde.Diverter
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// IDevice interface implementation
|
||||
///
|
||||
public void Initialize() { }
|
||||
public void RunDeviceBefore()
|
||||
{
|
||||
int adc = (int)StateMachine.ControlBoard.AnalogInputRaw(diverterCfg.AdcNr, 0);
|
||||
Handlers.OnAdcChanged(this, new CmdResponseArgs(CfgChangeCmd.GetAdc, diverterCfg.BitPosition, adc));
|
||||
}
|
||||
public void RunDeviceAfter() { }
|
||||
public void StopDevice() { }
|
||||
|
||||
|
||||
#region Configuration Change Handling
|
||||
|
||||
public static void OnCfgChange(object sender, CfgChangeArgs args)
|
||||
|
||||
@@ -107,6 +107,10 @@ namespace TBF.BenchControl.Elde.RegulValve
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// IDevice interface implementation
|
||||
///
|
||||
public void Initialize() { }
|
||||
public void RunDeviceBefore()
|
||||
{
|
||||
@@ -116,6 +120,7 @@ namespace TBF.BenchControl.Elde.RegulValve
|
||||
public void RunDeviceAfter() { }
|
||||
public void StopDevice() { }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Operation to set the water flow within tolerances
|
||||
/// Events: Event.None, Event.FlowReached, Event.FlowTimeOut
|
||||
|
||||
Reference in New Issue
Block a user