mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 05:05:00 +00:00
Merge branch 'development' into feature/device-info
This commit is contained in:
1
.github/workflows/docker.yml
vendored
1
.github/workflows/docker.yml
vendored
@@ -45,7 +45,6 @@ jobs:
|
|||||||
- name: Update AssemblyInfo.cs
|
- name: Update AssemblyInfo.cs
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
Write-Output ${{ env.VERSION }}
|
|
||||||
./.github/scripts/UpdateAssemblyVersion.ps1 ${{ env.VERSION }}
|
./.github/scripts/UpdateAssemblyVersion.ps1 ${{ env.VERSION }}
|
||||||
- name: restore Nuget Packages
|
- name: restore Nuget Packages
|
||||||
run: nuget install .\packages.config -OutputDirectory .\packages -ExcludeVersion
|
run: nuget install .\packages.config -OutputDirectory .\packages -ExcludeVersion
|
||||||
|
|||||||
3
.github/workflows/main.yml
vendored
3
.github/workflows/main.yml
vendored
@@ -31,12 +31,11 @@ jobs:
|
|||||||
shell: powershell
|
shell: powershell
|
||||||
env:
|
env:
|
||||||
TAG_NAME: ${{ github.event.release.tag_name }}
|
TAG_NAME: ${{ github.event.release.tag_name }}
|
||||||
run: echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
run: echo "VERSION=$($Env:TAG_NAME)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
# Use the version number to set the version of the assemblies
|
# Use the version number to set the version of the assemblies
|
||||||
- name: Update AssemblyInfo.cs
|
- name: Update AssemblyInfo.cs
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
Write-Output ${{ env.VERSION }}
|
|
||||||
./.github/scripts/UpdateAssemblyVersion.ps1 ${{ env.VERSION }}
|
./.github/scripts/UpdateAssemblyVersion.ps1 ${{ env.VERSION }}
|
||||||
- name: restore Nuget Packages
|
- name: restore Nuget Packages
|
||||||
run: nuget install .\packages.config -OutputDirectory .\packages -ExcludeVersion
|
run: nuget install .\packages.config -OutputDirectory .\packages -ExcludeVersion
|
||||||
|
|||||||
@@ -367,9 +367,18 @@ namespace PepperDash.Essentials.DM
|
|||||||
});
|
});
|
||||||
AudioOutputFeedbacks[outputCard.Number] = new IntFeedback(() =>
|
AudioOutputFeedbacks[outputCard.Number] = new IntFeedback(() =>
|
||||||
{
|
{
|
||||||
if (outputCard.AudioOutFeedback != null) { return (ushort)outputCard.AudioOutFeedback.Number; }
|
try
|
||||||
|
{
|
||||||
|
if (outputCard.AudioOutFeedback != null)
|
||||||
|
{
|
||||||
|
return (ushort) outputCard.AudioOutFeedback.Number;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
;
|
}
|
||||||
|
catch (NotSupportedException)
|
||||||
|
{
|
||||||
|
return (ushort) outputCard.AudioOutSourceFeedback;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
OutputNameFeedbacks[outputCard.Number] = new StringFeedback(() =>
|
OutputNameFeedbacks[outputCard.Number] = new StringFeedback(() =>
|
||||||
@@ -770,22 +779,13 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
else if (args.EventId == DMOutputEventIds.VideoOutEventId)
|
else if (args.EventId == DMOutputEventIds.VideoOutEventId)
|
||||||
{
|
{
|
||||||
if (outputCard == null) return;
|
if (outputCard != null && outputCard.VideoOutFeedback != null)
|
||||||
|
{
|
||||||
var outputFeedbackIndex = outputCard.VideoOutFeedback == null ? 0 : outputCard.VideoOutFeedback.Number;
|
Debug.Console(2, this, "DMSwitchVideo:{0} Routed Input:{1} Output:{2}'", this.Name, outputCard.VideoOutFeedback.Number, output);
|
||||||
|
}
|
||||||
Debug.Console(2, this, "DMSwitchVideo:{0} Routed Input:{1} Output:{2}'", this.Name,
|
|
||||||
outputFeedbackIndex, output);
|
|
||||||
|
|
||||||
if (VideoOutputFeedbacks.ContainsKey(output))
|
if (VideoOutputFeedbacks.ContainsKey(output))
|
||||||
{
|
{
|
||||||
var localInputPort =
|
|
||||||
InputPorts.FirstOrDefault(p => (DMInput) p.FeedbackMatchObject == outputCard.VideoOutFeedback);
|
|
||||||
var localOutputPort = OutputPorts.FirstOrDefault(p => (DMOutput) p.FeedbackMatchObject == outputCard);
|
|
||||||
|
|
||||||
VideoOutputFeedbacks[output].FireUpdate();
|
VideoOutputFeedbacks[output].FireUpdate();
|
||||||
OnSwitchChange(new RoutingNumericEventArgs(output, VideoOutputFeedbacks[output].UShortValue,
|
|
||||||
localOutputPort, localInputPort, eRoutingSignalType.Video));
|
|
||||||
}
|
}
|
||||||
if (OutputVideoRouteNameFeedbacks.ContainsKey(output))
|
if (OutputVideoRouteNameFeedbacks.ContainsKey(output))
|
||||||
{
|
{
|
||||||
@@ -794,39 +794,29 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
else if (args.EventId == DMOutputEventIds.AudioOutEventId)
|
else if (args.EventId == DMOutputEventIds.AudioOutEventId)
|
||||||
{
|
{
|
||||||
/*
|
try
|
||||||
if (outputCard == null || outputCard.AudioOutFeedback == null) return;
|
{
|
||||||
|
if (outputCard != null && outputCard.AudioOutFeedback != null)
|
||||||
|
{
|
||||||
Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", this.Name,
|
Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", this.Name,
|
||||||
outputCard.AudioOutFeedback.Number, output);
|
outputCard.AudioOutFeedback.Number, output);
|
||||||
|
}
|
||||||
if (AudioOutputFeedbacks.ContainsKey(output))
|
if (AudioOutputFeedbacks.ContainsKey(output))
|
||||||
{
|
{
|
||||||
AudioOutputFeedbacks[output].FireUpdate();
|
AudioOutputFeedbacks[output].FireUpdate();
|
||||||
OnSwitchChange(new RoutingNumericEventArgs(output, AudioOutputFeedbacks[output].UShortValue, eRoutingSignalType.Audio));
|
|
||||||
}
|
}
|
||||||
*/
|
}
|
||||||
|
catch (NotSupportedException)
|
||||||
if (outputCard == null) return;
|
{
|
||||||
|
if (outputCard != null)
|
||||||
var outputFeedbackIndex = outputCard.AudioOutFeedback == null ? 0 : outputCard.VideoOutFeedback.Number;
|
{
|
||||||
|
Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", Name,
|
||||||
Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", this.Name,
|
outputCard.AudioOutSourceFeedback, output);
|
||||||
outputFeedbackIndex, output);
|
}
|
||||||
|
|
||||||
if (AudioOutputFeedbacks.ContainsKey(output))
|
if (AudioOutputFeedbacks.ContainsKey(output))
|
||||||
{
|
{
|
||||||
var localInputPort =
|
|
||||||
InputPorts.FirstOrDefault(p => (DMInput)p.FeedbackMatchObject == outputCard.AudioOutFeedback);
|
|
||||||
var localOutputPort = OutputPorts.FirstOrDefault(p => (DMOutput)p.FeedbackMatchObject == outputCard);
|
|
||||||
|
|
||||||
AudioOutputFeedbacks[output].FireUpdate();
|
AudioOutputFeedbacks[output].FireUpdate();
|
||||||
OnSwitchChange(new RoutingNumericEventArgs(output, AudioOutputFeedbacks[output].UShortValue,
|
|
||||||
localOutputPort, localInputPort, eRoutingSignalType.Audio));
|
|
||||||
}
|
}
|
||||||
if (OutputAudioRouteNameFeedbacks.ContainsKey(output))
|
|
||||||
{
|
|
||||||
OutputAudioRouteNameFeedbacks[output].FireUpdate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (args.EventId == DMOutputEventIds.OutputNameEventId
|
else if (args.EventId == DMOutputEventIds.OutputNameEventId
|
||||||
@@ -861,7 +851,14 @@ namespace PepperDash.Essentials.DM
|
|||||||
var input = Convert.ToUInt32(inputSelector); // Cast can sometimes fail
|
var input = Convert.ToUInt32(inputSelector); // Cast can sometimes fail
|
||||||
var output = Convert.ToUInt32(outputSelector);
|
var output = Convert.ToUInt32(outputSelector);
|
||||||
|
|
||||||
if (input <= Dmps.NumberOfSwitcherInputs && output <= Dmps.NumberOfSwitcherOutputs)
|
var sigTypeIsUsbOrVideo = ((sigType & eRoutingSignalType.Video) == eRoutingSignalType.Video) ||
|
||||||
|
((sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput) ||
|
||||||
|
((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput);
|
||||||
|
|
||||||
|
if ((input <= Dmps.NumberOfSwitcherInputs && output <= Dmps.NumberOfSwitcherOutputs &&
|
||||||
|
sigTypeIsUsbOrVideo) ||
|
||||||
|
(input <= Dmps.NumberOfSwitcherInputs + 5 && output <= Dmps.NumberOfSwitcherOutputs &&
|
||||||
|
(sigType & eRoutingSignalType.Audio) == eRoutingSignalType.Audio))
|
||||||
{
|
{
|
||||||
// Check to see if there's an off timer waiting on this and if so, cancel
|
// Check to see if there's an off timer waiting on this and if so, cancel
|
||||||
var key = new PortNumberType(output, sigType);
|
var key = new PortNumberType(output, sigType);
|
||||||
@@ -879,36 +876,54 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DMInput inCard = input == 0 ? null : Dmps.SwitcherInputs[input] as DMInput;
|
|
||||||
DMOutput outCard = output == 0 ? null : Dmps.SwitcherOutputs[output] as DMOutput;
|
DMOutput dmOutputCard = output == 0 ? null : Dmps.SwitcherOutputs[output] as DMOutput;
|
||||||
|
|
||||||
//if (inCard != null)
|
//if (inCard != null)
|
||||||
//{
|
//{
|
||||||
// NOTE THAT BITWISE COMPARISONS - TO CATCH ALL ROUTING TYPES
|
// NOTE THAT BITWISE COMPARISONS - TO CATCH ALL ROUTING TYPES
|
||||||
if ((sigType | eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
if ((sigType & eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
||||||
{
|
{
|
||||||
|
DMInput dmInputCard = input == 0 ? null : Dmps.SwitcherInputs[input] as DMInput;
|
||||||
//SystemControl.VideoEnter.BoolValue = true;
|
//SystemControl.VideoEnter.BoolValue = true;
|
||||||
if (outCard != null)
|
if (dmOutputCard != null)
|
||||||
outCard.VideoOut = inCard;
|
dmOutputCard.VideoOut = dmInputCard;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sigType | eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
if ((sigType & eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
||||||
{
|
{
|
||||||
if (outCard != null)
|
DMInput dmInputCard = null;
|
||||||
outCard.AudioOut = inCard;
|
if (input <= Dmps.NumberOfSwitcherInputs)
|
||||||
|
{
|
||||||
|
dmInputCard = input == 0 ? null : Dmps.SwitcherInputs[input] as DMInput;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sigType | eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
|
if (dmOutputCard != null)
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (outCard != null)
|
dmOutputCard.AudioOut = dmInputCard;
|
||||||
outCard.USBRoutedTo = inCard;
|
}
|
||||||
|
catch (NotSupportedException)
|
||||||
|
{
|
||||||
|
Debug.Console(1, this, "Routing input {0} audio to output {1}",
|
||||||
|
(eDmps34KAudioOutSource) input, (CrestronControlSystem.eDmps34K350COutputs) output);
|
||||||
|
|
||||||
|
dmOutputCard.AudioOutSource = (eDmps34KAudioOutSource) input;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sigType | eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
|
if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
|
||||||
{
|
{
|
||||||
if (inCard != null)
|
DMInput dmInputCard = input == 0 ? null : Dmps.SwitcherInputs[input] as DMInput;
|
||||||
inCard.USBRoutedTo = outCard;
|
if (dmOutputCard != null)
|
||||||
|
dmOutputCard.USBRoutedTo = dmInputCard;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
|
||||||
|
{
|
||||||
|
DMInput dmInputCard = input == 0 ? null : Dmps.SwitcherInputs[input] as DMInput;
|
||||||
|
if (dmInputCard != null)
|
||||||
|
dmInputCard.USBRoutedTo = dmOutputCard;
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
//else
|
//else
|
||||||
@@ -919,7 +934,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Unable to execute route from input {0} to output {1}", inputSelector, outputSelector);
|
Debug.Console(1, this, "Unable to execute route from input {0} to output {1}", inputSelector,
|
||||||
|
outputSelector);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="PepperDashCore" version="1.0.42" targetFramework="net35" allowedVersions="[1.0,1.1)"/>
|
<package id="PepperDashCore" version="1.0.43" targetFramework="net35" allowedVersions="[1.0,1.1)"/>
|
||||||
</packages>
|
</packages>
|
||||||
Reference in New Issue
Block a user