mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
Merge pull request #284 from PepperDash/hotfix/GenericRelay-ctor-issues
Fix GenericRelayDevice Constructor
This commit is contained in:
@@ -31,13 +31,14 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
|||||||
RelayOutput = relay;
|
RelayOutput = relay;
|
||||||
RelayOutput.Register();
|
RelayOutput.Register();
|
||||||
|
|
||||||
RelayOutput.StateChange += new RelayEventHandler(RelayOutput_StateChange);
|
RelayOutput.StateChange += RelayOutput_StateChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GenericRelayDevice(string key, string name, Func<IOPortConfig, Relay> postActivationFunc,
|
public GenericRelayDevice(string key, string name, Func<IOPortConfig, Relay> postActivationFunc,
|
||||||
IOPortConfig config)
|
IOPortConfig config)
|
||||||
: base(key, name)
|
: base(key, name)
|
||||||
{
|
{
|
||||||
|
OutputIsOnFeedback = new BoolFeedback(() => RelayOutput.State);
|
||||||
|
|
||||||
AddPostActivationAction(() =>
|
AddPostActivationAction(() =>
|
||||||
{
|
{
|
||||||
@@ -46,7 +47,6 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
|||||||
RelayOutput.Register();
|
RelayOutput.Register();
|
||||||
|
|
||||||
RelayOutput.StateChange += RelayOutput_StateChange;
|
RelayOutput.StateChange += RelayOutput_StateChange;
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user