Initialization of 30 components changed, done in Initialize( ).
This commit is contained in:
@@ -26,9 +26,8 @@ namespace TBF.Rig.Modbus.QuidoRS
|
||||
|
||||
UInt32 watchdogBitMask;
|
||||
|
||||
public QuidoRS()
|
||||
{
|
||||
}
|
||||
|
||||
public QuidoRS() { }
|
||||
|
||||
public QuidoRS(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
@@ -38,18 +37,17 @@ namespace TBF.Rig.Modbus.QuidoRS
|
||||
modbus = (GenericDevices.IModbus)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
if (modbus == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
watchdogBitMask = (ushort)(quidoRSCfg.WatchdogEnabled ? (1 << quidoRSCfg.WatchdogBitNr) : 0);
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
watchdogBitMask = (ushort)(quidoRSCfg.WatchdogEnabled ? (1 << quidoRSCfg.WatchdogBitNr) : 0);
|
||||
}
|
||||
|
||||
///
|
||||
/// IDevice interface
|
||||
///
|
||||
public void Initialize() { }
|
||||
/// <summary>
|
||||
/// Run this device
|
||||
/// </summary>
|
||||
public void RunDeviceBefore()
|
||||
{
|
||||
if (quidoRSCfg.DebugLevel == Config.Entities.DebugMode.Simulate) return;
|
||||
@@ -78,8 +76,13 @@ namespace TBF.Rig.Modbus.QuidoRS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void RunDeviceAfter() { }
|
||||
public void StopDevice() { SendOutputs(0); }
|
||||
|
||||
public void StopDevice()
|
||||
{
|
||||
SendOutputs(0);
|
||||
}
|
||||
public void StopDevice2() { }
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user