Makes IPower Obsolete and replaces with IHasPowerControl and IHasPowerControlWithFeedback

Includes major refactor to resolve IPower update

Closes #476
Closes #474 more properly
This commit is contained in:
Neil Dorin
2020-11-09 16:57:35 -07:00
parent f5753109d5
commit 40cdd4c1e7
18 changed files with 2236 additions and 2162 deletions

View File

@@ -181,13 +181,13 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
});
}
var powerCamera = cameraDevice as IPower;
var powerCamera = cameraDevice as IHasPowerControl;
if (powerCamera != null)
{
trilist.SetSigTrueAction(joinMap.PowerOn.JoinNumber, () => powerCamera.PowerOn());
trilist.SetSigTrueAction(joinMap.PowerOff.JoinNumber, () => powerCamera.PowerOff());
var powerFbCamera = powerCamera as IPowerWithFeedback;
var powerFbCamera = powerCamera as IHasPowerControlWithFeedback;
if (powerFbCamera != null)
{
powerFbCamera.PowerIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOn.JoinNumber]);

View File

@@ -14,7 +14,7 @@ using Crestron.SimplSharp.Reflection;
namespace PepperDash.Essentials.Devices.Common.Cameras
{
public class CameraVisca : CameraBase, IHasCameraPtzControl, ICommunicationMonitor, IHasCameraPresets, IPower, IBridgeAdvanced
public class CameraVisca : CameraBase, IHasCameraPtzControl, ICommunicationMonitor, IHasCameraPresets, IHasPowerControlWithFeedback, IBridgeAdvanced
{
public IBasicCommunication Communication { get; private set; }
public CommunicationGather PortGather { get; private set; }