mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-17 13:45:01 +00:00
Fixes USB Routing for routing via Inputs and input to input
Also adds feedbacks for Audio Breakaway and USB Breakaway status
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using Crestron.SimplSharpPro.DM;
|
using Crestron.SimplSharpPro.DM;
|
||||||
using Crestron.SimplSharpPro.DM.Cards;
|
using Crestron.SimplSharpPro.DM.Cards;
|
||||||
@@ -383,6 +384,11 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ChassisOnBaseEvent(GenericBase device, BaseEventArgs args)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -775,6 +781,20 @@ namespace PepperDash.Essentials.DM
|
|||||||
SystemIdBusyFeedback.FireUpdate();
|
SystemIdBusyFeedback.FireUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case DMSystemEventIds.AudioBreakawayEventId:
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "AudioBreakaway Event: value: {0}",
|
||||||
|
(Chassis as DmMDMnxn).EnableAudioBreakawayFeedback.BoolValue);
|
||||||
|
EnableAudioBreakawayFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case DMSystemEventIds.USBBreakawayEventId:
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "USBBreakaway Event: value: {0}",
|
||||||
|
(Chassis as DmMDMnxn).EnableUSBBreakawayFeedback.BoolValue);
|
||||||
|
EnableUsbBreakawayFeedback.FireUpdate();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1036,7 +1056,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
Debug.Console(2, this, "Executing USB Input switch.\r\n in:{0} output: {1}", input, output);
|
Debug.Console(2, this, "Executing USB Input switch.\r\n in:{0} output: {1}", input, output);
|
||||||
|
|
||||||
if (input > chassisSize)
|
if (output > chassisSize)
|
||||||
{
|
{
|
||||||
//wanting to route an input to an output. Subtract chassis size and get output, unless it's 8x8
|
//wanting to route an input to an output. Subtract chassis size and get output, unless it's 8x8
|
||||||
//need this to determine USB routing values
|
//need this to determine USB routing values
|
||||||
@@ -1064,12 +1084,12 @@ namespace PepperDash.Essentials.DM
|
|||||||
|
|
||||||
Chassis.USBEnter.BoolValue = true;
|
Chassis.USBEnter.BoolValue = true;
|
||||||
|
|
||||||
if (Chassis.Inputs[input] == null)
|
if (Chassis.Inputs[output] == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Debug.Console(2, this, "Routing USB for input {0} to {1}", Chassis.Inputs[input], dmCard);
|
Debug.Console(2, this, "Routing USB for input {0} to {1}", Chassis.Inputs[output], dmCard);
|
||||||
Chassis.Inputs[input].USBRoutedTo = dmCard;
|
Chassis.Inputs[output].USBRoutedTo = dmCard;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@@ -1105,6 +1125,19 @@ namespace PepperDash.Essentials.DM
|
|||||||
SystemIdFeebdack.LinkInputSig(trilist.UShortInput[joinMap.SystemId.JoinNumber]);
|
SystemIdFeebdack.LinkInputSig(trilist.UShortInput[joinMap.SystemId.JoinNumber]);
|
||||||
SystemIdBusyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SystemId.JoinNumber]);
|
SystemIdBusyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SystemId.JoinNumber]);
|
||||||
|
|
||||||
|
EnableAudioBreakawayFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableAudioBreakaway.JoinNumber]);
|
||||||
|
EnableUsbBreakawayFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsbBreakaway.JoinNumber]);
|
||||||
|
|
||||||
|
trilist.OnlineStatusChange += (o, a) =>
|
||||||
|
{
|
||||||
|
if (!a.DeviceOnLine) return;
|
||||||
|
|
||||||
|
EnableAudioBreakawayFeedback.FireUpdate();
|
||||||
|
EnableUsbBreakawayFeedback.FireUpdate();
|
||||||
|
SystemIdBusyFeedback.FireUpdate();
|
||||||
|
SystemIdFeebdack.FireUpdate();
|
||||||
|
};
|
||||||
|
|
||||||
// Link up outputs
|
// Link up outputs
|
||||||
for (uint i = 1; i <= Chassis.NumberOfOutputs; i++)
|
for (uint i = 1; i <= Chassis.NumberOfOutputs; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user