diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..c969d2a1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -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. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..0a854e75 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -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. diff --git a/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs b/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs index c85854b6..23294997 100644 --- a/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs +++ b/PepperDashEssentials/Bridges/DmChassisControllerBridge.cs @@ -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]); diff --git a/PepperDashEssentials/Bridges/JoinMaps/DmChassisControllerJoinMap.cs b/PepperDashEssentials/Bridges/JoinMaps/DmChassisControllerJoinMap.cs index d04004b9..7c920cc4 100644 --- a/PepperDashEssentials/Bridges/JoinMaps/DmChassisControllerJoinMap.cs +++ b/PepperDashEssentials/Bridges/JoinMaps/DmChassisControllerJoinMap.cs @@ -139,6 +139,7 @@ namespace PepperDash.Essentials.Bridges OutputEndpointOnline = OutputEndpointOnline + joinOffset; HdcpSupportState = HdcpSupportState + joinOffset; HdcpSupportCapability = HdcpSupportCapability + joinOffset; + TxAdvancedIsPresent = TxAdvancedIsPresent + joinOffset; } } } diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs index 094b8022..d0a6ba63 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs @@ -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(); InputCardHdcpCapabilityTypes = new Dictionary(); + } + 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(); + } + + /// + /// Checks for presence of config property defining if the input card supports HDCP2. + /// If not found, assumes false. + /// + /// Input Slot + 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]); + } /// /// @@ -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; diff --git a/essentials-framework/pepperdashcore-builds b/essentials-framework/pepperdashcore-builds index 27a665b6..7db7cb27 160000 --- a/essentials-framework/pepperdashcore-builds +++ b/essentials-framework/pepperdashcore-builds @@ -1 +1 @@ -Subproject commit 27a665b68a0725729bb09138bb85f575833df4b2 +Subproject commit 7db7cb27f613b52dd0b056f6973ead05ffe1c14a