Adds property to set TvPresetsDigitSpacingMs from config

This commit is contained in:
Neil Dorin
2021-01-14 14:39:28 -07:00
parent de068277de
commit 29e2b88862
4 changed files with 53 additions and 10 deletions

View File

@@ -28,6 +28,8 @@ namespace PepperDash.Essentials.Devices.Common
public bool HasDpad { get; set; }
public bool HasNumeric { get; set; }
public int TvPresetsDigitSpacingMs { get; private set; }
public DevicePresetsModel PresetsModel { get; private set; }
public IRSetTopBoxBase(string key, string name, IrOutputPortController portCont,
@@ -35,13 +37,19 @@ namespace PepperDash.Essentials.Devices.Common
: base(key, name)
{
IrPort = portCont;
IrPulseTime = 200;
IrPulseTime = 200; // default
TvPresetsDigitSpacingMs = 200; // default
if (props.IrPulseTime > 0)
{
IrPulseTime = (ushort)props.IrPulseTime;
}
if (props.TvPresetsDigitSpacingMs > 0)
{
TvPresetsDigitSpacingMs = props.TvPresetsDigitSpacingMs;
}
DeviceManager.AddDevice(portCont);
HasPresets = props.HasPresets;

View File

@@ -15,6 +15,7 @@ namespace PepperDash.Essentials.Devices.Common
public bool HasDpad { get; set; }
public bool HasNumeric { get; set; }
public int IrPulseTime { get; set; }
public int TvPresetsDigitSpacingMs { get; set; }
public ControlPropertiesConfig Control { get; set; }
}