mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-14 04:57:15 +00:00
Added a check to verify that the number of inputs on a display is not greater than the size of the joinspan
This commit is contained in:
parent
18c35b103e
commit
64b5bc8cb8
2 changed files with 317 additions and 314 deletions
|
|
@ -193,12 +193,15 @@ namespace PepperDash.Essentials.Core
|
|||
var count = 0;
|
||||
foreach (var input in displayDevice.InputPorts)
|
||||
{
|
||||
inputKeys.Add(input.Key);
|
||||
var tempKey = inputKeys.ElementAt(count - 1);
|
||||
trilist.SetSigTrueAction((ushort)(joinMap.InputSelectOffset.JoinNumber + count), () => displayDevice.ExecuteSwitch(displayDevice.InputPorts[tempKey].Selector));
|
||||
Debug.Console(2, displayDevice, "Setting Input Select Action on Digital Join {0} to Input: {1}", joinMap.InputSelectOffset.JoinNumber + count, displayDevice.InputPorts[tempKey].Key.ToString());
|
||||
trilist.StringInput[(ushort)(joinMap.InputNamesOffset.JoinNumber + count)].StringValue = input.Key.ToString();
|
||||
count++;
|
||||
if (count < joinMap.InputSelectOffset.JoinSpan)
|
||||
{
|
||||
inputKeys.Add(input.Key);
|
||||
var tempKey = inputKeys.ElementAt(count - 1);
|
||||
trilist.SetSigTrueAction((ushort)(joinMap.InputSelectOffset.JoinNumber + count), () => displayDevice.ExecuteSwitch(displayDevice.InputPorts[tempKey].Selector));
|
||||
Debug.Console(2, displayDevice, "Setting Input Select Action on Digital Join {0} to Input: {1}", joinMap.InputSelectOffset.JoinNumber + count, displayDevice.InputPorts[tempKey].Key.ToString());
|
||||
trilist.StringInput[(ushort)(joinMap.InputNamesOffset.JoinNumber + count)].StringValue = input.Key.ToString();
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
Debug.Console(2, displayDevice, "Setting Input Select Action on Analog Join {0}", joinMap.InputSelect);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue