mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
Assembly Version incremented to 1.4.11. Fixes issues with DisplayControllerBridge join mapping. Adds volume controls and ensures all input selection joins start at joinstart + 10.
This commit is contained in:
@@ -84,10 +84,12 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
InputKeys.Add(input.Key.ToString());
|
InputKeys.Add(input.Key.ToString());
|
||||||
var tempKey = InputKeys.ElementAt(count - 1);
|
var tempKey = InputKeys.ElementAt(count - 1);
|
||||||
trilist.SetSigTrueAction((ushort)(JoinMap.InputSelectOffset + count), () => { displayDevice.ExecuteSwitch(displayDevice.InputPorts[tempKey].Selector); });
|
trilist.SetSigTrueAction((ushort)(JoinMap.InputSelectOffset + count), () => { displayDevice.ExecuteSwitch(displayDevice.InputPorts[tempKey].Selector); });
|
||||||
|
Debug.Console(2, displayDevice, "Setting Input Select Action on Digital Join {0} to Input: {1}", JoinMap.InputSelectOffset + count, displayDevice.InputPorts[tempKey].Key.ToString());
|
||||||
trilist.StringInput[(ushort)(JoinMap.InputNamesOffset + count)].StringValue = input.Key.ToString();
|
trilist.StringInput[(ushort)(JoinMap.InputNamesOffset + count)].StringValue = input.Key.ToString();
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Debug.Console(2, displayDevice, "Setting Input Select Action on Analog Join {0}", JoinMap.InputSelect);
|
||||||
trilist.SetUShortSigAction(JoinMap.InputSelect, (a) =>
|
trilist.SetUShortSigAction(JoinMap.InputSelect, (a) =>
|
||||||
{
|
{
|
||||||
if (a == 0)
|
if (a == 0)
|
||||||
@@ -105,11 +107,25 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
displayDevice.PowerToggle();
|
displayDevice.PowerToggle();
|
||||||
|
|
||||||
}
|
}
|
||||||
if (displayDevice is PepperDash.Essentials.Core.TwoWayDisplayBase)
|
if (twoWayDisplay != null)
|
||||||
InputNumberFeedback.FireUpdate();
|
InputNumberFeedback.FireUpdate();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var volumeDisplay = displayDevice as IBasicVolumeControls;
|
||||||
|
if (volumeDisplay != null)
|
||||||
|
{
|
||||||
|
trilist.SetBoolSigAction(JoinMap.VolumeUp, (b) => volumeDisplay.VolumeUp(b));
|
||||||
|
trilist.SetBoolSigAction(JoinMap.VolumeDown, (b) => volumeDisplay.VolumeDown(b));
|
||||||
|
trilist.SetSigTrueAction(JoinMap.VolumeMute, () => volumeDisplay.MuteToggle());
|
||||||
|
|
||||||
|
var volumeDisplayWithFeedback = volumeDisplay as IBasicVolumeWithFeedback;
|
||||||
|
if(volumeDisplayWithFeedback != null)
|
||||||
|
{
|
||||||
|
volumeDisplayWithFeedback.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[JoinMap.VolumeLevelFB]);
|
||||||
|
volumeDisplayWithFeedback.MuteFeedback.LinkInputSig(trilist.BooleanInput[JoinMap.VolumeMute]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CurrentInputFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
static void CurrentInputFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
||||||
@@ -142,16 +158,25 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
}
|
}
|
||||||
public class DisplayControllerJoinMap : JoinMapBase
|
public class DisplayControllerJoinMap : JoinMapBase
|
||||||
{
|
{
|
||||||
public uint Name { get; set; }
|
// Digital
|
||||||
public uint InputNamesOffset { get; set; }
|
public uint PowerOff { get; set; }
|
||||||
public uint InputSelectOffset { get; set; }
|
public uint PowerOn { get; set; }
|
||||||
public uint IsOnline { get; set; }
|
|
||||||
public uint PowerOff { get; set; }
|
|
||||||
public uint InputSelect { get; set; }
|
|
||||||
public uint PowerOn { get; set; }
|
|
||||||
public uint IsTwoWayDisplay { get; set; }
|
public uint IsTwoWayDisplay { get; set; }
|
||||||
public uint SelectScene { get; set; }
|
public uint VolumeUp { get; set; }
|
||||||
|
public uint VolumeDown { get; set; }
|
||||||
|
public uint VolumeMute { get; set; }
|
||||||
|
public uint InputSelectOffset { get; set; }
|
||||||
public uint ButtonVisibilityOffset { get; set; }
|
public uint ButtonVisibilityOffset { get; set; }
|
||||||
|
public uint IsOnline { get; set; }
|
||||||
|
|
||||||
|
// Analog
|
||||||
|
public uint InputSelect { get; set; }
|
||||||
|
public uint VolumeLevelFB { get; set; }
|
||||||
|
|
||||||
|
// Serial
|
||||||
|
public uint Name { get; set; }
|
||||||
|
public uint InputNamesOffset { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public DisplayControllerJoinMap()
|
public DisplayControllerJoinMap()
|
||||||
{
|
{
|
||||||
@@ -160,11 +185,16 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
PowerOff = 1;
|
PowerOff = 1;
|
||||||
PowerOn = 2;
|
PowerOn = 2;
|
||||||
IsTwoWayDisplay = 3;
|
IsTwoWayDisplay = 3;
|
||||||
|
VolumeUp = 5;
|
||||||
|
VolumeDown = 6;
|
||||||
|
VolumeMute = 7;
|
||||||
|
|
||||||
ButtonVisibilityOffset = 40;
|
ButtonVisibilityOffset = 40;
|
||||||
InputSelectOffset = 4;
|
InputSelectOffset = 10;
|
||||||
|
|
||||||
// Analog
|
// Analog
|
||||||
InputSelect = 4;
|
InputSelect = 11;
|
||||||
|
VolumeLevelFB = 5;
|
||||||
|
|
||||||
// Serial
|
// Serial
|
||||||
Name = 1;
|
Name = 1;
|
||||||
@@ -179,12 +209,17 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
PowerOff = PowerOff + joinOffset;
|
PowerOff = PowerOff + joinOffset;
|
||||||
PowerOn = PowerOn + joinOffset;
|
PowerOn = PowerOn + joinOffset;
|
||||||
IsTwoWayDisplay = IsTwoWayDisplay + joinOffset;
|
IsTwoWayDisplay = IsTwoWayDisplay + joinOffset;
|
||||||
SelectScene = SelectScene + joinOffset;
|
|
||||||
ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset;
|
ButtonVisibilityOffset = ButtonVisibilityOffset + joinOffset;
|
||||||
Name = Name + joinOffset;
|
Name = Name + joinOffset;
|
||||||
InputNamesOffset = InputNamesOffset + joinOffset;
|
InputNamesOffset = InputNamesOffset + joinOffset;
|
||||||
InputSelectOffset = InputSelectOffset + joinOffset;
|
InputSelectOffset = InputSelectOffset + joinOffset;
|
||||||
|
|
||||||
|
InputSelect = InputSelect + joinOffset;
|
||||||
|
|
||||||
|
VolumeUp = VolumeUp + joinOffset;
|
||||||
|
VolumeDown = VolumeDown + joinOffset;
|
||||||
|
VolumeMute = VolumeMute + joinOffset;
|
||||||
|
VolumeLevelFB = VolumeLevelFB + joinOffset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,5 +4,5 @@
|
|||||||
[assembly: AssemblyCompany("PepperDash Technology Corp")]
|
[assembly: AssemblyCompany("PepperDash Technology Corp")]
|
||||||
[assembly: AssemblyProduct("PepperDashEssentials")]
|
[assembly: AssemblyProduct("PepperDashEssentials")]
|
||||||
[assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2018")]
|
[assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2018")]
|
||||||
[assembly: AssemblyVersion("1.4.10.*")]
|
[assembly: AssemblyVersion("1.4.11.*")]
|
||||||
|
|
||||||
|
|||||||
Submodule essentials-framework updated: 1675b98b87...d8825f385f
Reference in New Issue
Block a user