From 0df315426b1f0064cfa0dcfe19a4822b13e73059 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Wed, 26 Apr 2023 13:32:49 -0600 Subject: [PATCH] fix: use new interface for parentDev The GetDmRmcController & GetDmTxController methods were previously ignoring the `DmBladeChassisController` type. This was causing transmitters connected to a DM blade chassis to not be built, --- .../Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs | 4 ++-- .../Essentials_DM/Endpoints/Transmitters/DmTxHelpers.cs | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs index bb8aec65..57f522fd 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcHelper.cs @@ -436,9 +436,9 @@ namespace PepperDash.Essentials.DM } return rx; } - else if (parentDev is DmChassisController) + else if (parentDev is IDmSwitchWithEndpointOnlineFeedback) { - var controller = parentDev as DmChassisController; + var controller = parentDev as IDmSwitchWithEndpointOnlineFeedback; var chassis = controller.Chassis; var num = props.ParentOutputNumber; Debug.Console(1, "Creating DM Chassis device '{0}'. Output number '{1}'.", key, num); diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTxHelpers.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTxHelpers.cs index 84007032..140f0f45 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTxHelpers.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTxHelpers.cs @@ -127,10 +127,10 @@ namespace PepperDash.Essentials.DM BasicDmTxControllerBase tx; bool useChassisForOfflineFeedback = false; - if (parentDev is DmChassisController) + if (parentDev is IDmSwitchWithEndpointOnlineFeedback) { // Get the Crestron chassis and link stuff up - var switchDev = (parentDev as DmChassisController); + var switchDev = (parentDev as IDmSwitchWithEndpointOnlineFeedback); var chassis = switchDev.Chassis; //Check that the input is within range of this chassis' possible inputs @@ -179,6 +179,7 @@ namespace PepperDash.Essentials.DM return null; } } + if (parentDev is DmpsRoutingController) { // Get the DMPS chassis and link stuff up