Adds IHasCameraOff to CameraVisca

This commit is contained in:
Neil Dorin
2020-11-09 10:13:53 -07:00
parent d074be323c
commit 944b72e2a8
5 changed files with 18 additions and 4 deletions

View File

@@ -58,6 +58,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
{
_powerIsOn = value;
PowerIsOnFeedback.FireUpdate();
CameraIsOffFeedback.FireUpdate();
}
}
}
@@ -110,6 +111,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
Communication.BytesReceived += new EventHandler<GenericCommMethodReceiveBytesArgs>(Communication_BytesReceived);
PowerIsOnFeedback = new BoolFeedback(() => { return PowerIsOn; });
CameraIsOffFeedback = new BoolFeedback(() => { return !PowerIsOn; });
if (props.CommunicationMonitorProperties != null)
{
@@ -608,6 +610,18 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
}
}
}
#region IHasCameraOff Members
public BoolFeedback CameraIsOffFeedback { get; private set; }
public void CameraOff()
{
PowerOff();
}
#endregion
}
public class CameraViscaFactory : EssentialsDeviceFactory<CameraVisca>