mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-13 12:37:07 +00:00
fix constructor to initialize feedback
This commit is contained in:
parent
377cf23bca
commit
8445656289
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue