From 1228431bc2bc0982301d6941920d3d991cd02ef6 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Fri, 29 Jan 2021 14:18:48 -0700 Subject: [PATCH 1/2] remove unnecessary debug statements --- .../Essentials Devices Common/Display/SamsungMDCDisplay.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/SamsungMDCDisplay.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/SamsungMDCDisplay.cs index 47c08cea..65e38408 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/SamsungMDCDisplay.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/SamsungMDCDisplay.cs @@ -149,7 +149,7 @@ namespace PepperDash.Essentials.Devices.Displays public override bool CustomActivate() { Communication.Connect(); - CommunicationMonitor.StatusChange += (o, a) => { Debug.Console(2, this, "Communication monitor state: {0}", CommunicationMonitor.Status); }; + CommunicationMonitor.StatusChange += (o, a) => Debug.Console(2, this, "Communication monitor state: {0}", CommunicationMonitor.Status); CommunicationMonitor.Start(); return true; } @@ -188,9 +188,6 @@ namespace PepperDash.Essentials.Devices.Displays IncomingBuffer.CopyTo(newBytes, 0); e.Bytes.CopyTo(newBytes, IncomingBuffer.Length); - if (Debug.Level == 2) // This check is here to prevent following string format from building unnecessarily on level 0 or 1 - Debug.Console(2, this, "Received:{0}", ComTextHelper.GetEscapedText(newBytes)); - // Need to find AA FF and have for (int i = 0; i < newBytes.Length; i++) { @@ -364,8 +361,6 @@ namespace PepperDash.Essentials.Devices.Displays } checksum = checksum & 0x000000FF; // mask off MSBs b[b.Length - 1] = (byte)checksum; - if(Debug.Level == 2) // This check is here to prevent following string format from building unnecessarily on level 0 or 1 - Debug.Console(2, this, "Sending:{0}", ComTextHelper.GetEscapedText(b)); if (b[1] == 0x12) LastCommandSentWasVolume = true; From 5eb65fd72396eee4adb7a511ba9eb07694c8dff3 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 2 Feb 2021 15:30:43 -0700 Subject: [PATCH 2/2] Update RoutingInterfaces.cs --- .../Routing/RoutingInterfaces.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Routing/RoutingInterfaces.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Routing/RoutingInterfaces.cs index c7f2e533..467bf045 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Routing/RoutingInterfaces.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Routing/RoutingInterfaces.cs @@ -92,6 +92,16 @@ namespace PepperDash.Essentials.Core void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType); } + public interface IRoutingWithClear : IRouting + { + /// + /// Clears a route to an output, however a device needs to do that + /// + /// Output to clear + /// signal type to clear + void ClearRoute(object outputSelector, eRoutingSignalType signalType); + } + public interface IRoutingNumeric : IRouting { void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type);