From 671d506b457d5bcc2699768e743832c64ee7c1a9 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 28 Apr 2020 08:54:38 -0600 Subject: [PATCH] moves Port registration for controller ports to ConfigureComPort ...and renames method to RegisterAndConfigureComPort --- .../Config/Comm and IR/ComPortController.cs | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/ComPortController.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/ComPortController.cs index 07260c7e..2ca07749 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/ComPortController.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/ComPortController.cs @@ -47,22 +47,24 @@ namespace PepperDash.Essentials.Core Spec = spec; //IsConnected = new BoolFeedback(CommonBoolCue.IsConnected, () => true); - if (Port.Parent is CrestronControlSystem) - { - - var result = Port.Register(); - if (result != eDeviceRegistrationUnRegistrationResponse.Success) - { - Debug.Console(0, this, "ERROR: Cannot register Com port: {0}", result); - return; // false - } - } ConfigureComPort(); } private void ConfigureComPort() { + if (Port.Parent is CrestronControlSystem) + { + + + var result = Port.Register(); + if (result != eDeviceRegistrationUnRegistrationResponse.Success) + { + Debug.Console(0, this, "ERROR: Cannot register Com port: {0}", result); + return; // false + } + } + var specResult = Port.SetComPortSpec(Spec); if (specResult != 0) {