From 7b4aad35169392fc46e7f7b39400ff2267ebca0a Mon Sep 17 00:00:00 2001 From: Jason T Alborough Date: Fri, 14 Sep 2018 09:12:47 -0400 Subject: [PATCH] Modifications to EssentialsDsp Bridge As installed in Wharton HH.8th floor 2018-09-14 --- PepperDashEssentials/Bridges/EssentialDsp.cs | 34 +++++++++++++------- essentials-framework | 2 +- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/PepperDashEssentials/Bridges/EssentialDsp.cs b/PepperDashEssentials/Bridges/EssentialDsp.cs index 4e0837a0..d8aed442 100644 --- a/PepperDashEssentials/Bridges/EssentialDsp.cs +++ b/PepperDashEssentials/Bridges/EssentialDsp.cs @@ -65,20 +65,26 @@ namespace PepperDash.Essentials { { //var QscChannel = channel.Value as PepperDash.Essentials.Devices.Common.DSP.QscDspLevelControl; Debug.Console(2, "QscChannel {0} connect", x); - - var QscChannel = channel.Value as IBasicVolumeWithFeedback; - QscChannel.MuteFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.channelMuteToggle[x]]); - QscChannel.VolumeLevelFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.channelVolume[x]]); + + var genericChannel = channel.Value as IBasicVolumeWithFeedback; + if (channel.Value.Enabled) + { + ApiEisc.Eisc.StringInput[ApiMap.channelName[x]].StringValue = channel.Value.LevelCustomName; + ApiEisc.Eisc.UShortInput[ApiMap.channelType[x]].UShortValue = (ushort)channel.Value.Type; - ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteToggle[x], () => QscChannel.MuteToggle()); - ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteOn[x], () => QscChannel.MuteOn()); - ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteOff[x], () => QscChannel.MuteOff()); + genericChannel.MuteFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.channelMuteToggle[x]]); + genericChannel.VolumeLevelFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.channelVolume[x]]); - ApiEisc.Eisc.SetBoolSigAction(ApiMap.channelVolumeUp[x], b => QscChannel.VolumeUp(b)); - ApiEisc.Eisc.SetBoolSigAction(ApiMap.channelVolumeDown[x], b => QscChannel.VolumeDown(b)); + ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteToggle[x], () => genericChannel.MuteToggle()); + ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteOn[x], () => genericChannel.MuteOn()); + ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteOff[x], () => genericChannel.MuteOff()); - ApiEisc.Eisc.SetUShortSigAction(ApiMap.channelVolume[x], u => QscChannel.SetVolume(u)); - ApiEisc.Eisc.SetStringSigAction(ApiMap.presetString, s => Dsp.RunPreset(s)); + ApiEisc.Eisc.SetBoolSigAction(ApiMap.channelVolumeUp[x], b => genericChannel.VolumeUp(b)); + ApiEisc.Eisc.SetBoolSigAction(ApiMap.channelVolumeDown[x], b => genericChannel.VolumeDown(b)); + + ApiEisc.Eisc.SetUShortSigAction(ApiMap.channelVolume[x], u => genericChannel.SetVolume(u)); + ApiEisc.Eisc.SetStringSigAction(ApiMap.presetString, s => Dsp.RunPreset(s)); + } x++; } @@ -155,6 +161,8 @@ namespace PepperDash.Essentials { public Dictionary channelMuteOn; public Dictionary channelMuteOff; public Dictionary channelVolume; + public Dictionary channelType; + public Dictionary channelName; public Dictionary channelVolumeUp; public Dictionary channelVolumeDown; public Dictionary presets; @@ -186,6 +194,8 @@ namespace PepperDash.Essentials { channelMuteOn = new Dictionary(); channelMuteOff = new Dictionary(); channelVolume = new Dictionary(); + channelName = new Dictionary(); + channelType = new Dictionary(); presets = new Dictionary(); channelVolumeUp = new Dictionary(); channelVolumeDown = new Dictionary(); @@ -196,6 +206,8 @@ namespace PepperDash.Essentials { channelMuteOn[tempNum] = (ushort)(tempNum + 600); channelMuteOff[tempNum] = (ushort)(tempNum + 800); channelVolume[tempNum] = (ushort)(tempNum + 200); + channelName[tempNum] = (ushort)(tempNum + 200); + channelType[tempNum] = (ushort)(tempNum + 400); channelVolumeUp[tempNum] = (ushort)(tempNum + 1000); channelVolumeDown[tempNum] = (ushort)(tempNum + 1200); } diff --git a/essentials-framework b/essentials-framework index 2815550f..7f3782b0 160000 --- a/essentials-framework +++ b/essentials-framework @@ -1 +1 @@ -Subproject commit 2815550f20624c6b19b3f4e9e574438091ac8cf1 +Subproject commit 7f3782b03ddebe45df5cf9be9f16d6cf5555a8e2