mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-14 04:57:15 +00:00
WHAR-1436 - Add Vol control up/down buttons on the user page
This commit is contained in:
parent
96e60f6eaf
commit
759635b364
2 changed files with 137 additions and 119 deletions
|
|
@ -59,7 +59,14 @@ namespace PepperDash.Essentials {
|
|||
var QscChannel = channel.Value as IBasicVolumeWithFeedback;
|
||||
QscChannel.MuteFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.channelMuteToggle[x]]);
|
||||
QscChannel.VolumeLevelFeedback.LinkInputSig(ApiEisc.Eisc.UShortInput[ApiMap.channelVolume[x]]);
|
||||
|
||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteToggle[x], () => QscChannel.MuteToggle());
|
||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteOn[x], () => QscChannel.MuteOn());
|
||||
ApiEisc.Eisc.SetSigTrueAction(ApiMap.channelMuteOff[x], () => QscChannel.MuteOff());
|
||||
|
||||
ApiEisc.Eisc.SetBoolSigAction(ApiMap.channelVolumeUp[x], b => QscChannel.VolumeUp(b));
|
||||
ApiEisc.Eisc.SetBoolSigAction(ApiMap.channelVolumeDown[x], b => QscChannel.VolumeDown(b));
|
||||
|
||||
ApiEisc.Eisc.SetUShortSigAction(ApiMap.channelVolume[x], u => QscChannel.SetVolume(u));
|
||||
ApiEisc.Eisc.SetStringSigAction(ApiMap.presetString, s => Dsp.RunPreset(s));
|
||||
x++;
|
||||
|
|
@ -99,19 +106,30 @@ namespace PepperDash.Essentials {
|
|||
public class EssentialDspApiMap {
|
||||
public ushort presetString = 2000;
|
||||
public Dictionary<uint, ushort> channelMuteToggle;
|
||||
public Dictionary<uint, ushort> channelMuteOn;
|
||||
public Dictionary<uint, ushort> channelMuteOff;
|
||||
public Dictionary<uint, ushort> channelVolume;
|
||||
public Dictionary<uint, ushort> channelVolumeUp;
|
||||
public Dictionary<uint, ushort> channelVolumeDown;
|
||||
public Dictionary<uint, ushort> presets;
|
||||
|
||||
public EssentialDspApiMap() {
|
||||
channelMuteToggle = new Dictionary<uint, ushort>();
|
||||
channelMuteOn = new Dictionary<uint, ushort>();
|
||||
channelMuteOff = new Dictionary<uint, ushort>();
|
||||
channelVolume = new Dictionary<uint, ushort>();
|
||||
presets = new Dictionary<uint, ushort>();
|
||||
channelVolumeUp = new Dictionary<uint, ushort>();
|
||||
channelVolumeDown = new Dictionary<uint, ushort>();
|
||||
for (uint x = 1; x <= 100; x++) {
|
||||
uint tempNum = x;
|
||||
presets[tempNum] = (ushort)(tempNum + 100);
|
||||
channelMuteToggle[tempNum] = (ushort)(tempNum + 400);
|
||||
channelMuteOn[tempNum] = (ushort)(tempNum + 600);
|
||||
channelMuteOff[tempNum] = (ushort)(tempNum + 800);
|
||||
channelVolume[tempNum] = (ushort)(tempNum + 200);
|
||||
|
||||
channelVolumeUp[tempNum] = (ushort)(tempNum + 1000);
|
||||
channelVolumeDown[tempNum] = (ushort)(tempNum + 1200);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 0db23f86a7c4c6e1d156ee16a350ee02d6cf384e
|
||||
Subproject commit 5fde72515cb1d55c30e8589971943f2f7f344113
|
||||
Loading…
Add table
Add a link
Reference in a new issue