added IDspPreset Interface

Implemented IDspPreset Interface on internal Tesira DSP

Resolves #457
This commit is contained in:
Trevor Payne
2020-10-21 12:55:41 -05:00
parent f95b50c99d
commit 1484c26434
4 changed files with 21 additions and 4 deletions

View File

@@ -0,0 +1,9 @@
namespace PepperDash.Essentials.Core
{
public interface IDspPreset
{
void RunPreset(string name);
void RunPreset(int id);
}
}

View File

@@ -190,6 +190,7 @@
<Compile Include="Devices\EssentialsBridgeableDevice.cs" />
<Compile Include="Devices\EssentialsDevice.cs" />
<Compile Include="Devices\GenericIRController.cs" />
<Compile Include="Devices\IDspPreset.cs" />
<Compile Include="Devices\IProjectorInterfaces.cs" />
<Compile Include="Devices\PC\InRoomPc.cs" />
<Compile Include="Devices\PC\Laptop.cs" />

View File

@@ -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 ));
}
/// <summary>
/// Adds a raw string command to the queue
/// </summary>

View File

@@ -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<string, DspControlPoint> LevelControlPoints { get; private set; }
@@ -17,7 +17,9 @@ namespace PepperDash.Essentials.Devices.Common.DSP
public Dictionary<string, DspControlPoint> 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) { }