From eb388d28db32a18cd6e8168c1120be07d09cbdc0 Mon Sep 17 00:00:00 2001 From: mhengeli Date: Fri, 21 Jun 2024 15:37:28 -0400 Subject: [PATCH] feat: add scaler mode for videowall set rmc 4kz scaler c --- .../JoinMaps/DmRmcControllerJoinMap.cs | 4 ++- .../Endpoints/EndpointInterfaces.cs | 6 +++++ .../Receivers/DmRmc4kZScalerCController.cs | 26 +++++++++++++++++-- .../Receivers/DmRmcScalerCController.cs | 1 + 4 files changed, 34 insertions(+), 3 deletions(-) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmRmcControllerJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmRmcControllerJoinMap.cs index c0e7141f..06dbd578 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmRmcControllerJoinMap.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmRmcControllerJoinMap.cs @@ -68,7 +68,9 @@ namespace PepperDash.Essentials.Core.Bridges public JoinDataComplete HdcpInputPortCount = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, new JoinMetadata { Description = "Number of Input Ports that support HDCP", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); - + [JoinName("ScalerOutWallMode")] + public JoinDataComplete ScalerOutWallMode = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, + new JoinMetadata { Description = "Number of Input Ports that support HDCP", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog }); /// /// Constructor to use when instantiating this Join Map without inheriting from it diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/EndpointInterfaces.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/EndpointInterfaces.cs index 085d379b..489880f6 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/EndpointInterfaces.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/EndpointInterfaces.cs @@ -87,5 +87,11 @@ namespace PepperDash_Essentials_DM public interface IHasDisplayPortInHdcp : IHasDisplayPortInHdcpGet, IHasDisplayPortInHdcpSet { eHdcpCapabilityType DisplayPortInHdcpCapability { get; } + } + + public interface IhasWallMode + { + void SeteWallMode(ushort walLMode); } + } \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4kZScalerCController.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4kZScalerCController.cs index fd48a904..6762687a 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4kZScalerCController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmc4kZScalerCController.cs @@ -10,12 +10,13 @@ using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; using PepperDash.Core; using PepperDash_Essentials_DM; +using System.Collections.Generic; namespace PepperDash.Essentials.DM { [Description("Wrapper Class for DM-RMC-4K-Z-SCALER-C")] public class DmRmc4kZScalerCController : DmRmcControllerBase, IRmcRoutingWithFeedback, - IIROutputPorts, IComPorts, ICec, IRelayPorts, IHasDmInHdcp, IHasHdmiInHdcp + IIROutputPorts, IComPorts, ICec, IRelayPorts, IHasDmInHdcp, IHasHdmiInHdcp, IhasWallMode { private readonly DmRmc4kzScalerC _rmc; @@ -28,7 +29,7 @@ namespace PepperDash.Essentials.DM public BoolFeedback HdmiVideoSyncFeedback { get; private set; } - + private Dictionary WallModes; /// /// The value of the current video source for the HDMI output on the receiver @@ -101,6 +102,15 @@ namespace PepperDash.Essentials.DM HdmiOut.Port = _rmc.HdmiOutput; AudioVideoSourceNumericFeedback = new IntFeedback(() => (ushort)(_rmc.SelectedSourceFeedback)); + + WallModes = new Dictionary() + { + {0, EndpointScalerOutput.eWall.Disabled}, + {2211, EndpointScalerOutput.eWall.Mode11}, + {2212, EndpointScalerOutput.eWall.Mode12}, + {2221, EndpointScalerOutput.eWall.Mode13}, + {2222, EndpointScalerOutput.eWall.Mode14} + }; } void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args) @@ -241,5 +251,17 @@ namespace PepperDash.Essentials.DM _rmc.HdmiIn.HdcpCapability = hdcpState; } + + #region IhasWallMode Members + + public void SeteWallMode(ushort walLMode) + { + EndpointScalerOutput.eWall wallvalue; + + if (WallModes.TryGetValue(walLMode, out wallvalue)) + _rmc.Scaler.WallMode = wallvalue; + } + + #endregion } } \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcScalerCController.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcScalerCController.cs index d1f2daa1..169995d8 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcScalerCController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Receivers/DmRmcScalerCController.cs @@ -51,6 +51,7 @@ namespace PepperDash.Essentials.DM InputPorts = new RoutingPortCollection {DmIn}; OutputPorts = new RoutingPortCollection {HdmiOut}; + // Set Ports for CEC HdmiOut.Port = _rmc.HdmiOutput; }