Merge branch 'release/v1.4.33' into feature/add-new-tx-features-to-other-tx-models

This commit is contained in:
Neil Dorin
2020-02-26 16:19:33 -07:00
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 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) 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) if (advancedTxDevice != null) // Advanced TX device
trilist.BooleanInput[joinMap.TxAdvancedIsPresent + ioSlot].BoolValue = true;
if (advancedTxDevice != null)
{ {
advancedTxDevice.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]); 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); Debug.Console(1, "Setting up actions and feedbacks on input card {0}", ioSlot);
dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]); dmChassis.VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus + ioSlot]);

View File

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

View File

@@ -104,9 +104,12 @@ namespace PepperDash.Essentials.DM
} }
var controller = new DmChassisController(key, name, chassis); var controller = new DmChassisController(key, name, chassis);
// add the cards and port names // add the cards and port names
foreach (var kvp in properties.InputSlots) foreach (var kvp in properties.InputSlots)
{
controller.AddInputCard(kvp.Value, kvp.Key); controller.AddInputCard(kvp.Value, kvp.Key);
}
foreach (var kvp in properties.OutputSlots) foreach (var kvp in properties.OutputSlots)
{ {
controller.AddOutputCard(kvp.Value, kvp.Key); controller.AddOutputCard(kvp.Value, kvp.Key);
@@ -188,12 +191,19 @@ namespace PepperDash.Essentials.DM
SystemIdBusyFeedback = new BoolFeedback(() => { return (Chassis as DmMDMnxn).SystemIdBusy.BoolValue; }); SystemIdBusyFeedback = new BoolFeedback(() => { return (Chassis as DmMDMnxn).SystemIdBusy.BoolValue; });
InputCardHdcpCapabilityFeedbacks = new Dictionary<uint, IntFeedback>(); InputCardHdcpCapabilityFeedbacks = new Dictionary<uint, IntFeedback>();
InputCardHdcpCapabilityTypes = new Dictionary<uint, eHdcpCapabilityType>(); InputCardHdcpCapabilityTypes = new Dictionary<uint, eHdcpCapabilityType>();
}
public override bool CustomActivate()
{
Debug.Console(2, this, "Setting up feedbacks.");
// Setup Output Card Feedbacks
for (uint x = 1; x <= Chassis.NumberOfOutputs; x++) 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) if (Chassis.Outputs[tempX] != null)
{ {
VideoOutputFeedbacks[tempX] = new IntFeedback(() => VideoOutputFeedbacks[tempX] = new IntFeedback(() =>
@@ -252,9 +262,24 @@ namespace PepperDash.Essentials.DM
return Chassis.Outputs[tempX].EndpointOnlineFeedback; 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) if (Chassis.Inputs[tempX] != null)
{ {
UsbInputRoutedToFeebacks[tempX] = new IntFeedback(() => UsbInputRoutedToFeebacks[tempX] = new IntFeedback(() =>
{ {
if (Chassis.Inputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Inputs[tempX].USBRoutedToFeedback.Number; } if (Chassis.Inputs[tempX].USBRoutedToFeedback != null) { return (ushort)Chassis.Inputs[tempX].USBRoutedToFeedback.Number; }
@@ -288,6 +313,8 @@ namespace PepperDash.Essentials.DM
{ {
var inputCard = Chassis.Inputs[tempX]; var inputCard = Chassis.Inputs[tempX];
Debug.Console(2, this, "Adding InputCardHdcpCapabilityFeedback for slot: {0}", inputCard);
if (inputCard.Card is DmcHd) if (inputCard.Card is DmcHd)
{ {
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport; InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
@@ -342,9 +369,33 @@ namespace PepperDash.Essentials.DM
return 0; 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> /// <summary>
/// ///
/// </summary> /// </summary>
@@ -566,6 +617,13 @@ namespace PepperDash.Essentials.DM
var cecPort2 = outputCard.Card2.HdmiOutput; var cecPort2 = outputCard.Card2.HdmiOutput;
AddDmcHdoPorts(number, cecPort1, cecPort2); 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") else if (type == "dmchdo")
{ {
var outputCard = new DmcHdoSingle(number, Chassis); var outputCard = new DmcHdoSingle(number, Chassis);