From 47fb805766798b3f45a597c4c681b558b64ba0ca Mon Sep 17 00:00:00 2001 From: Joshua Gutenplan Date: Tue, 28 May 2019 19:25:18 -0700 Subject: [PATCH] Added IBridge to make it easier to deal with calling the linkToApi method. Added as an else if in EiscApI to ensure backwards compatibility. --- PepperDashEssentials/Bridges/BridgeBase.cs | 5 +++++ PepperDashEssentials/Bridges/IBridge.cs | 14 ++++++++++++++ PepperDashEssentials/PepperDashEssentials.csproj | 1 + essentials-framework | 2 +- 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 PepperDashEssentials/Bridges/IBridge.cs diff --git a/PepperDashEssentials/Bridges/BridgeBase.cs b/PepperDashEssentials/Bridges/BridgeBase.cs index e6ecf1c0..9cfcc08a 100644 --- a/PepperDashEssentials/Bridges/BridgeBase.cs +++ b/PepperDashEssentials/Bridges/BridgeBase.cs @@ -123,6 +123,11 @@ namespace PepperDash.Essentials.Bridges { (device as IDigitalInput).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); continue; + } + else if (device is IBridge) + { + (device as IBridge).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey); + continue; } //else if (device is LightingBase) //{ diff --git a/PepperDashEssentials/Bridges/IBridge.cs b/PepperDashEssentials/Bridges/IBridge.cs new file mode 100644 index 00000000..d86a1d1d --- /dev/null +++ b/PepperDashEssentials/Bridges/IBridge.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro.DeviceSupport; + +namespace PepperDash.Essentials.Bridges +{ + public interface IBridge + { + void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey); + } +} \ No newline at end of file diff --git a/PepperDashEssentials/PepperDashEssentials.csproj b/PepperDashEssentials/PepperDashEssentials.csproj index b454f4b4..4a5ad292 100644 --- a/PepperDashEssentials/PepperDashEssentials.csproj +++ b/PepperDashEssentials/PepperDashEssentials.csproj @@ -127,6 +127,7 @@ + diff --git a/essentials-framework b/essentials-framework index 75c2bf81..a801b08d 160000 --- a/essentials-framework +++ b/essentials-framework @@ -1 +1 @@ -Subproject commit 75c2bf819a3b7e6c37a3d6b0c7b11cc273043b12 +Subproject commit a801b08d38a9ba6e8a973c58d7b7715424b25839