Added IR SetTopBox

This commit is contained in:
Trevor Payne
2020-03-09 15:08:14 -05:00
parent a875880bc3
commit ddf2bd4c64
5 changed files with 324 additions and 3 deletions

View File

@@ -12,7 +12,7 @@ using PepperDash.Essentials.Core.Routing;
namespace PepperDash.Essentials.Devices.Common
{
public class IRSetTopBoxBase : Device, ISetTopBoxControls, IUiDisplayInfo, IRoutingOutputs, IUsageTracking
public class IRSetTopBoxBase : Device, ISetTopBoxControls, IUiDisplayInfo, IRoutingOutputs, IUsageTracking, IPower
{
public IrOutputPortController IrPort { get; private set; }
@@ -338,6 +338,34 @@ namespace PepperDash.Essentials.Devices.Common
public UsageTracking UsageTracker { get; set; }
#endregion
}
#endregion
#region IPower Members
public void PowerOn()
{
IrPort.PressRelease(IROutputStandardCommands.IROut_POWER_ON, true);
IrPort.PressRelease(IROutputStandardCommands.IROut_POWER_ON, false);
}
public void PowerOff()
{
IrPort.PressRelease(IROutputStandardCommands.IROut_POWER_OFF, true);
IrPort.PressRelease(IROutputStandardCommands.IROut_POWER_OFF, false);
}
public void PowerToggle()
{
throw new NotImplementedException();
}
public BoolFeedback PowerIsOnFeedback
{
get { throw new NotImplementedException(); }
}
#endregion
}
}