Updates to Feedback logic for use in bridge classes, refactored into separate files. Added SerialFeedback class for use with serial stream data that doesn't use Funcs to compute value on update.

This commit is contained in:
Neil Dorin
2018-06-27 14:27:05 -06:00
parent f5b589bc2e
commit 8490f2d722
26 changed files with 486 additions and 413 deletions

View File

@@ -606,7 +606,7 @@ namespace PepperDash.Essentials.Devices.Displays
else // if power is off, wait until we get on FB to send it.
{
// One-time event handler to wait for power on before executing switch
EventHandler<EventArgs> handler = null; // necessary to allow reference inside lambda to handler
EventHandler<FeedbackEventArgs> handler = null; // necessary to allow reference inside lambda to handler
handler = (o, a) =>
{
if (!_IsWarmingUp) // Done warming

View File

@@ -491,7 +491,7 @@ namespace PepperDash.Essentials.Devices.Displays
else // if power is off, wait until we get on FB to send it.
{
// One-time event handler to wait for power on before executing switch
EventHandler<EventArgs> handler = null; // necessary to allow reference inside lambda to handler
EventHandler<FeedbackEventArgs> handler = null; // necessary to allow reference inside lambda to handler
handler = (o, a) =>
{
if (!_IsWarmingUp) // Done warming

View File

@@ -98,7 +98,7 @@ namespace PepperDash.Essentials.Devices.Common.Microphones
{
PrivacyDevice = privacyDevice;
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange += new EventHandler<EventArgs>(PrivacyModeIsOnFeedback_OutputChange);
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange += PrivacyModeIsOnFeedback_OutputChange;
}
void PrivacyModeIsOnFeedback_OutputChange(object sender, EventArgs e)
@@ -124,7 +124,7 @@ namespace PepperDash.Essentials.Devices.Common.Microphones
{
Inputs.Add(input);
input.InputStateFeedback.OutputChange += new EventHandler<EventArgs>(InputStateFeedback_OutputChange);
input.InputStateFeedback.OutputChange += InputStateFeedback_OutputChange;
}
void RemoveInput(IDigitalInput input)