mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-14 20:24:57 +00:00
@@ -575,35 +575,7 @@ namespace PepperDash.Essentials.DM {
|
|||||||
|
|
||||||
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType sigType)
|
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType sigType)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Making an awesome DM route from {0} to {1} {2}", inputSelector, outputSelector, sigType);
|
ExecuteSwitch(inputSelector, outputSelector, sigType);
|
||||||
|
|
||||||
var input = Convert.ToUInt32(inputSelector); // Cast can sometimes fail
|
|
||||||
var output = Convert.ToUInt32(outputSelector);
|
|
||||||
// Check to see if there's an off timer waiting on this and if so, cancel
|
|
||||||
var key = new PortNumberType(output, sigType);
|
|
||||||
if (input == 0)
|
|
||||||
{
|
|
||||||
StartOffTimer(key);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (RouteOffTimers.ContainsKey(key))
|
|
||||||
{
|
|
||||||
Debug.Console(2, this, "{0} cancelling route off due to new source", output);
|
|
||||||
RouteOffTimers[key].Stop();
|
|
||||||
RouteOffTimers.Remove(key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var inCard = input == 0 ? null : Chassis.Inputs[input];
|
|
||||||
var outCard = input == 0 ? null : Chassis.Outputs[output];
|
|
||||||
|
|
||||||
// NOTE THAT BITWISE COMPARISONS - TO CATCH ALL ROUTING TYPES
|
|
||||||
if ((sigType | eRoutingSignalType.Video) != eRoutingSignalType.Video) return;
|
|
||||||
Chassis.VideoEnter.BoolValue = true;
|
|
||||||
Chassis.Outputs[output].VideoOut = inCard;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user