mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 20:17:03 +00:00
Update C2nRthsController to use IHasCresnetBranches Interface
Inprogress #297
This commit is contained in:
parent
bfe87ae090
commit
4360dcdca9
3 changed files with 4 additions and 10 deletions
|
|
@ -118,12 +118,12 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
|||
Debug.Console(0, "Device {0} is a valid cresnet master - creating new C2nRths", parentKey);
|
||||
return new C2nRths(cresnetId, Global.ControlSystem);
|
||||
}
|
||||
var cresnetBridge = DeviceManager.GetDeviceForKey(parentKey) as ICresnetBridge;
|
||||
var cresnetBridge = DeviceManager.GetDeviceForKey(parentKey) as IHasCresnetBranches;
|
||||
|
||||
if (cresnetBridge != null)
|
||||
{
|
||||
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);
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue