mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
parent
b42d487c4c
commit
5fcf746124
1 changed files with 16 additions and 9 deletions
|
|
@ -1408,24 +1408,28 @@ namespace PepperDash.Essentials.DM
|
||||||
if ((sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
|
if ((sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Executing USB Input switch.\r\n in:{0} output: {1}", inputSelector, outputSelector);
|
Debug.Console(2, this, "Executing USB Input switch.\r\n in:{0} output: {1}", inputSelector, outputSelector);
|
||||||
if (outputSelector > chassisSize)
|
if (inputSelector > chassisSize)
|
||||||
{
|
{
|
||||||
uint outputIndex;
|
uint inputIndex;
|
||||||
|
|
||||||
if (chassisSize == 8)
|
if (chassisSize == 8)
|
||||||
{
|
{
|
||||||
outputIndex = (uint) inputSelector - 16;
|
inputIndex = (uint) inputSelector - 16;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
outputIndex = inputSelector - chassisSize;
|
inputIndex = inputSelector - chassisSize;
|
||||||
}
|
}
|
||||||
dmCard = Chassis.Outputs[outputIndex];
|
dmCard = Chassis.Outputs[inputIndex];
|
||||||
}
|
}
|
||||||
else
|
else if (inputSelector > 0)
|
||||||
{
|
{
|
||||||
dmCard = Chassis.Inputs[inputSelector];
|
dmCard = Chassis.Inputs[inputSelector];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dmCard = null;
|
||||||
|
}
|
||||||
|
|
||||||
ExecuteSwitch(dmCard, Chassis.Inputs[outputSelector], sigType);
|
ExecuteSwitch(dmCard, Chassis.Inputs[outputSelector], sigType);
|
||||||
return;
|
return;
|
||||||
|
|
@ -1455,13 +1459,16 @@ namespace PepperDash.Essentials.DM
|
||||||
|
|
||||||
dmCard = Chassis.Outputs[outputIndex];
|
dmCard = Chassis.Outputs[outputIndex];
|
||||||
}
|
}
|
||||||
else
|
else if (inputSelector > 0)
|
||||||
{
|
{
|
||||||
dmCard = Chassis.Inputs[inputSelector];
|
dmCard = Chassis.Inputs[inputSelector];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dmCard = null;
|
||||||
|
}
|
||||||
Chassis.USBEnter.BoolValue = true;
|
Chassis.USBEnter.BoolValue = true;
|
||||||
|
|
||||||
Debug.Console(2, this, "Routing USB for input {0} to {1}", inputSelector, dmCard);
|
|
||||||
ExecuteSwitch(dmCard, Chassis.Outputs[outputSelector], sigType);
|
ExecuteSwitch(dmCard, Chassis.Outputs[outputSelector], sigType);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue