From 1484c26434e9b7c6fec6be1bd46fd687cd60a31f Mon Sep 17 00:00:00 2001 From: Trevor Payne Date: Wed, 21 Oct 2020 12:55:41 -0500 Subject: [PATCH] added IDspPreset Interface Implemented IDspPreset Interface on internal Tesira DSP Resolves #457 --- .../PepperDashEssentialsBase/Devices/IDspPreset.cs | 9 +++++++++ .../PepperDash_Essentials_Core.csproj | 1 + .../DSP/BiampTesira/BiampTesiraForteDsp.cs | 9 +++++++-- .../Essentials Devices Common/DSP/DspBase.cs | 6 ++++-- 4 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IDspPreset.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IDspPreset.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IDspPreset.cs new file mode 100644 index 00000000..c565e0d9 --- /dev/null +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IDspPreset.cs @@ -0,0 +1,9 @@ +namespace PepperDash.Essentials.Core +{ + public interface IDspPreset + { + void RunPreset(string name); + + void RunPreset(int id); + } +} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj index 98e4e510..2b45030c 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj @@ -190,6 +190,7 @@ + diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/BiampTesira/BiampTesiraForteDsp.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/BiampTesira/BiampTesiraForteDsp.cs index 86850fea..9e397f19 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/BiampTesira/BiampTesiraForteDsp.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/BiampTesira/BiampTesiraForteDsp.cs @@ -296,8 +296,13 @@ namespace PepperDash.Essentials.Devices.Common.DSP if(!CommandQueueInProgress) SendNextQueuedCommand(); - } - + } + + public override void RunPreset(int data) + { + SendLine(String.Format("Device recallPreset {0}", data )); + } + /// /// Adds a raw string command to the queue /// diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/DspBase.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/DspBase.cs index cad57761..62043827 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/DspBase.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/DspBase.cs @@ -9,7 +9,7 @@ using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Devices.Common.DSP { - public abstract class DspBase : EssentialsDevice + public abstract class DspBase : EssentialsDevice, IDspPreset { public Dictionary LevelControlPoints { get; private set; } @@ -17,7 +17,9 @@ namespace PepperDash.Essentials.Devices.Common.DSP public Dictionary SwitcherControlPoints { get; private set; } - public abstract void RunPreset(string name); + public abstract void RunPreset(string name); + + public abstract void RunPreset(int data); public DspBase(string key, string name) : base(key, name) { }