mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
Update C2nRthsController to use IHasCresnetBranches Interface
Inprogress #297
This commit is contained in:
@@ -118,12 +118,12 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
|||||||
Debug.Console(0, "Device {0} is a valid cresnet master - creating new C2nRths", parentKey);
|
Debug.Console(0, "Device {0} is a valid cresnet master - creating new C2nRths", parentKey);
|
||||||
return new C2nRths(cresnetId, Global.ControlSystem);
|
return new C2nRths(cresnetId, Global.ControlSystem);
|
||||||
}
|
}
|
||||||
var cresnetBridge = DeviceManager.GetDeviceForKey(parentKey) as ICresnetBridge;
|
var cresnetBridge = DeviceManager.GetDeviceForKey(parentKey) as IHasCresnetBranches;
|
||||||
|
|
||||||
if (cresnetBridge != null)
|
if (cresnetBridge != null)
|
||||||
{
|
{
|
||||||
Debug.Console(0, "Device {0} is a valid cresnet master - creating new C2nRths", parentKey);
|
Debug.Console(0, "Device {0} is a valid cresnet master - creating new C2nRths", parentKey);
|
||||||
return new C2nRths(cresnetId, cresnetBridge.Branches[branchId]);
|
return new C2nRths(cresnetId, cresnetBridge.CresnetBranches[branchId]);
|
||||||
}
|
}
|
||||||
Debug.Console(0, "Device {0} is not a valid cresnet master", parentKey);
|
Debug.Console(0, "Device {0} is not a valid cresnet master", parentKey);
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -1,15 +1,9 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using Crestron.SimplSharpPro.GeneralIO;
|
using Crestron.SimplSharpPro.GeneralIO;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core.Bridges;
|
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using System.Linq;
|
|
||||||
using PepperDash_Essentials_Core.Crestron_IO.DinCenCn;
|
|
||||||
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
namespace PepperDash.Essentials.Core
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ using Crestron.SimplSharp;
|
|||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
|
|
||||||
namespace PepperDash_Essentials_Core.Crestron_IO.DinCenCn
|
namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
public interface IHasCresnetBranches
|
public interface IHasCresnetBranches
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user