mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-14 04:57:15 +00:00
feat(SigCommands): #759 Adds SigCommand concept for each data type
This commit is contained in:
parent
10f5516a5a
commit
83525b721b
7 changed files with 321 additions and 12 deletions
|
|
@ -62,6 +62,7 @@ namespace PepperDash.Essentials.Core
|
|||
ValueFunc = valueFunc;
|
||||
}
|
||||
|
||||
|
||||
public override void FireUpdate()
|
||||
{
|
||||
bool newValue = InTestMode ? TestValue : ValueFunc.Invoke();
|
||||
|
|
|
|||
|
|
@ -42,8 +42,6 @@ namespace PepperDash.Essentials.Core
|
|||
Key = key;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Clears test mode and fires update.
|
||||
/// </summary>
|
||||
|
|
@ -53,9 +51,9 @@ namespace PepperDash.Essentials.Core
|
|||
FireUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fires an update synchronously
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Computes the value by running the ValueFunc and if the value has changed, updates the linked sigs and fires the OnOutputChange event
|
||||
/// </summary>
|
||||
public abstract void FireUpdate();
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -66,13 +64,7 @@ namespace PepperDash.Essentials.Core
|
|||
CrestronInvoke.BeginInvoke(o => FireUpdate());
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// Helper method that fires event. Use this intstead of calling OutputChange
|
||||
///// </summary>
|
||||
//protected void OnOutputChange()
|
||||
//{
|
||||
// if (OutputChange != null) OutputChange(this, EventArgs.Empty);
|
||||
//}
|
||||
// Helper Methods for firing event
|
||||
|
||||
protected void OnOutputChange(bool value)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue