Updating more device factories in Essentials and Devices.Common

This commit is contained in:
Neil Dorin
2020-04-20 23:12:27 -06:00
parent 902a94a82c
commit 2170a79399
29 changed files with 645 additions and 629 deletions

View File

@@ -8,6 +8,7 @@ using Crestron.SimplSharpPro.DeviceSupport;
using Newtonsoft.Json;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Core.Bridges;
using PepperDash.Essentials.Core.Routing;
@@ -166,4 +167,20 @@ namespace PepperDash.Essentials.Devices.Common
trilist.SetBoolSigAction(joinMap.PlayPause, Play);
}
}
public class AppleTVFactory : EssentialsDeviceFactory<AppleTV>
{
public AppleTVFactory()
{
TypeNames = new List<string>() { "appletv" };
}
public override EssentialsDevice BuildDevice(DeviceConfig dc)
{
Debug.Console(1, "Factory Attempting to create new AppleTV Device");
var irCont = IRPortHelper.GetIrOutputPortController(dc);
return new AppleTV(dc.Key, dc.Name, irCont);
}
}
}