Merge pull request #48 from PepperDash/bugfix/ecs-1255

Bugfix/ecs 1255
This commit is contained in:
Neil Dorin
2020-02-25 10:13:25 -07:00
committed by GitHub
6 changed files with 141 additions and 27 deletions

34
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,34 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]-"
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**Stacktrace**
Include a stack trace of the exception if possible.
```
Paste stack trace here
```
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.

View File

@@ -0,0 +1,21 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEATURE]-"
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
If this is a request for support for a new device or type, be as specific as possible and include any pertinent manufacturer and model information.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -16,7 +16,7 @@ using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges
{
public static class DmChassisControllerApiExtentions
public static class DmChassisControllerApiExtensions
{
public static void LinkToApi(this DmChassisController dmChassis, BasicTriList trilist, uint joinStart, string joinMapKey)
{
@@ -81,14 +81,14 @@ namespace PepperDash.Essentials.Bridges
}
}
if (basicTxDevice != null && advancedTxDevice == null)
trilist.BooleanInput[joinMap.TxAdvancedIsPresent + ioSlot].BoolValue = true;
if (advancedTxDevice != null)
if (advancedTxDevice != null) // Advanced TX device
{
advancedTxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);
// Flag if the TX is an advanced endpoint type
trilist.BooleanInput[joinMap.TxAdvancedIsPresent + ioSlot].BoolValue = true;
}
else if(advancedTxDevice == null || basicTxDevice != null)
else if(advancedTxDevice == null || basicTxDevice != null) // Basic TX device
{
Debug.Console(1, "Setting up actions and feedbacks on input card {0}", ioSlot);
dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);

View File

@@ -139,6 +139,7 @@ namespace PepperDash.Essentials.Bridges
OutputEndpointOnline = OutputEndpointOnline + joinOffset;
HdcpSupportState = HdcpSupportState + joinOffset;
HdcpSupportCapability = HdcpSupportCapability + joinOffset;
TxAdvancedIsPresent = TxAdvancedIsPresent + joinOffset;
}
}
}

View File

@@ -104,9 +104,12 @@ namespace PepperDash.Essentials.DM
}
var controller = new DmChassisController(key, name, chassis);
// add the cards and port names
foreach (var kvp in properties.InputSlots)
controller.AddInputCard(kvp.Value, kvp.Key);
foreach (var kvp in properties.InputSlots)
{
controller.AddInputCard(kvp.Value, kvp.Key);
}
foreach (var kvp in properties.OutputSlots)
{
controller.AddOutputCard(kvp.Value, kvp.Key);
@@ -188,11 +191,18 @@ namespace PepperDash.Essentials.DM
SystemIdBusyFeedback = new BoolFeedback(() => { return (Chassis as DmMDMnxn).SystemIdBusy.BoolValue; });
InputCardHdcpCapabilityFeedbacks = new Dictionary<uint, IntFeedback>();
InputCardHdcpCapabilityTypes = new Dictionary<uint, eHdcpCapabilityType>();
}
public override bool CustomActivate()
{
Debug.Console(2, this, "Setting up feedbacks.");
for (uint x = 1; x <= Chassis.NumberOfOutputs; x++)
// Setup Output Card Feedbacks
for (uint x = 1; x <= Chassis.NumberOfOutputs; x++)
{
var tempX = x;
var tempX = x;
Debug.Console(2, this, "Setting up feedbacks for output slot: {0}", tempX);
if (Chassis.Outputs[tempX] != null)
{
@@ -235,26 +245,41 @@ namespace PepperDash.Essentials.DM
}
});
OutputAudioRouteNameFeedbacks[tempX] = new StringFeedback(() =>
{
if (Chassis.Outputs[tempX].AudioOutFeedback != null)
{
if (Chassis.Outputs[tempX].AudioOutFeedback != null)
{
return Chassis.Outputs[tempX].AudioOutFeedback.NameFeedback.StringValue;
}
else
{
return NoRouteText;
return Chassis.Outputs[tempX].AudioOutFeedback.NameFeedback.StringValue;
}
else
{
return NoRouteText;
}
});
}
});
OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() =>
OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() =>
{
return Chassis.Outputs[tempX].EndpointOnlineFeedback;
});
}
else
{
Debug.Console(2, this, "No Output Card defined in slot: {0}", tempX);
}
};
// Setup Input Card Feedbacks
for (uint x = 1; x <= Chassis.NumberOfInputs; x++)
{
var tempX = x;
Debug.Console(2, this, "Setting up feedbacks for input slot: {0}", tempX);
CheckForHdcp2Property(tempX);
if (Chassis.Inputs[tempX] != null)
{
UsbInputRoutedToFeebacks[tempX] = new IntFeedback(() =>
{
if (Chassis.Inputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Inputs[tempX].USBRoutedToFeedback.Number; }
@@ -279,7 +304,7 @@ namespace PepperDash.Essentials.DM
}
});
InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() =>
InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() =>
{
return Chassis.Inputs[tempX].EndpointOnlineFeedback;
});
@@ -288,6 +313,8 @@ namespace PepperDash.Essentials.DM
{
var inputCard = Chassis.Inputs[tempX];
Debug.Console(2, this, "Adding InputCardHdcpCapabilityFeedback for slot: {0}", inputCard);
if (inputCard.Card is DmcHd)
{
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
@@ -342,8 +369,32 @@ namespace PepperDash.Essentials.DM
return 0;
});
}
}
}
else
{
Debug.Console(2, this, "No Input Card defined in slot: {0}", tempX);
}
}
return base.CustomActivate();
}
/// <summary>
/// Checks for presence of config property defining if the input card supports HDCP2.
/// If not found, assumes false.
/// </summary>
/// <param name="inputSlot">Input Slot</param>
void CheckForHdcp2Property(uint inputSlot)
{
if (!PropertiesConfig.InputSlotSupportsHdcp2.ContainsKey(inputSlot))
{
Debug.Console(0, this, Debug.ErrorLogLevel.Warning,
@"Properties Config does not define inputSlotSupportsHdcp2 entry for input card: {0}. Assuming false.
If HDCP2 is required, HDCP control/feedback will not fucntion correctly!", inputSlot);
PropertiesConfig.InputSlotSupportsHdcp2.Add(inputSlot, false);
}
else
Debug.Console(2, this, "inputSlotSupportsHdcp2 for input card: {0} = {1}", inputSlot, PropertiesConfig.InputSlotSupportsHdcp2[inputSlot]);
}
/// <summary>
///
@@ -566,6 +617,13 @@ namespace PepperDash.Essentials.DM
var cecPort2 = outputCard.Card2.HdmiOutput;
AddDmcHdoPorts(number, cecPort1, cecPort2);
}
else if (type == "dmc4kzhdo")
{
var outputCard = new Dmc4kzHdoSingle(number, Chassis);
var cecPort1 = outputCard.Card1.HdmiOutput;
var cecPort2 = outputCard.Card2.HdmiOutput;
AddDmcHdoPorts(number, cecPort1, cecPort2);
}
else if (type == "dmchdo")
{
var outputCard = new DmcHdoSingle(number, Chassis);
@@ -579,13 +637,13 @@ namespace PepperDash.Essentials.DM
var cecPort1 = outputCard.Card1.HdmiOutput;
AddDmcCoPorts(number, cecPort1);
}
else if (type == "dmc4kzcohd")
{
else if (type == "dmc4kzcohd")
{
var outputCard = new Dmc4kzCoHdSingle(number, Chassis);
var cecPort1 = outputCard.Card1.HdmiOutput;
AddDmcCoPorts(number, cecPort1);
}
else if (type == "dmccohd")
else if (type == "dmccohd")
{
var outputCard = new DmcCoHdSingle(number, Chassis);
var cecPort1 = outputCard.Card1.HdmiOutput;