diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmTxControllerJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmTxControllerJoinMap.cs index 7032bad7..8b59bd42 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmTxControllerJoinMap.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/DmTxControllerJoinMap.cs @@ -1,9 +1,9 @@ -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Core.Bridges -{ - public class DmTxControllerJoinMap : JoinMapBaseAdvanced - { +using PepperDash.Essentials.Core; + +namespace PepperDash.Essentials.Core.Bridges +{ + public class DmTxControllerJoinMap : JoinMapBaseAdvanced + { [JoinName("IsOnline")] public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 }, new JoinMetadata() { Label = "DM TX Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); @@ -16,6 +16,18 @@ namespace PepperDash.Essentials.Core.Bridges public JoinDataComplete FreeRunEnabled = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 }, new JoinMetadata() { Label = "DM TX Enable Free Run Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital }); + [JoinName("Input1VideoSyncStatus")] + public JoinDataComplete Input1VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 }, + new JoinMetadata() { Label = "Input 1 Video Sync Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Input2VideoSyncStatus")] + public JoinDataComplete Input2VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 }, + new JoinMetadata() { Label = "Input 2 Video Sync Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + + [JoinName("Input3VideoSyncStatus")] + public JoinDataComplete Input3VideoSyncStatus = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 }, + new JoinMetadata() { Label = "Input 3 Video Sync Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital }); + [JoinName("CurrentInputResolution")] public JoinDataComplete CurrentInputResolution = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 }, new JoinMetadata() { Label = "DM TX Current Input Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial }); @@ -53,7 +65,5 @@ namespace PepperDash.Essentials.Core.Bridges : base(joinStart, typeof(DmTxControllerJoinMap)) { } - - - } + } } \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx200Controller.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx200Controller.cs index 923a7600..e75a9d55 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx200Controller.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx200Controller.cs @@ -33,6 +33,8 @@ namespace PepperDash.Essentials.DM public IntFeedback VideoSourceNumericFeedback { get; protected set; } public IntFeedback AudioSourceNumericFeedback { get; protected set; } public IntFeedback HdmiInHdcpCapabilityFeedback { get; protected set; } + public BoolFeedback HdmiVideoSyncFeedback { get; protected set; } + public BoolFeedback VgaVideoSyncFeedback { get; protected set; } public BoolFeedback FreeRunEnabledFeedback { get; protected set; } @@ -127,6 +129,16 @@ namespace PepperDash.Essentials.DM HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport; + HdmiVideoSyncFeedback = new BoolFeedback(() => + { + return (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue; + }); + + VgaVideoSyncFeedback = new BoolFeedback(() => + { + return (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue; + }); + FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled); VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue); @@ -174,7 +186,8 @@ namespace PepperDash.Essentials.DM AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback, AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback, AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback, - AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiInHdcpCapabilityFeedback); + AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiInHdcpCapabilityFeedback, HdmiVideoSyncFeedback, + VgaVideoSyncFeedback); // Set Ports for CEC HdmiInput.Port = Tx.HdmiInput; @@ -220,7 +233,18 @@ namespace PepperDash.Essentials.DM public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { - LinkDmTxToApi(this, trilist, joinStart, joinMapKey, bridge); + DmTxControllerJoinMap joinMap = GetDmTxJoinMap(joinStart, joinMapKey); + + if (HdmiVideoSyncFeedback != null) + { + HdmiVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]); + } + if (VgaVideoSyncFeedback != null) + { + VgaVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]); + } + + LinkDmTxToApi(this, trilist, joinMap, bridge); } /// diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201CController.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201CController.cs index e68a6fc5..54be5720 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201CController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx201CController.cs @@ -34,6 +34,8 @@ namespace PepperDash.Essentials.DM public IntFeedback VideoSourceNumericFeedback { get; protected set; } public IntFeedback AudioSourceNumericFeedback { get; protected set; } public IntFeedback HdmiInHdcpCapabilityFeedback { get; protected set; } + public BoolFeedback HdmiVideoSyncFeedback { get; protected set; } + public BoolFeedback VgaVideoSyncFeedback { get; protected set; } public BoolFeedback FreeRunEnabledFeedback { get; protected set; } @@ -126,6 +128,16 @@ namespace PepperDash.Essentials.DM return 0; }); + HdmiVideoSyncFeedback = new BoolFeedback(() => + { + return (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue; + }); + + VgaVideoSyncFeedback = new BoolFeedback(() => + { + return (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue; + }); + FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled); VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue); @@ -176,7 +188,8 @@ namespace PepperDash.Essentials.DM AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback, AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback, AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback, - AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiInHdcpCapabilityFeedback); + AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiInHdcpCapabilityFeedback, HdmiVideoSyncFeedback, + VgaVideoSyncFeedback); // Set Ports for CEC HdmiInput.Port = Tx.HdmiInput; @@ -222,7 +235,18 @@ namespace PepperDash.Essentials.DM public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { - LinkDmTxToApi(this, trilist, joinStart, joinMapKey, bridge); + DmTxControllerJoinMap joinMap = GetDmTxJoinMap(joinStart, joinMapKey); + + if (HdmiVideoSyncFeedback != null) + { + HdmiVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]); + } + if (VgaVideoSyncFeedback != null) + { + VgaVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]); + } + + LinkDmTxToApi(this, trilist, joinMap, bridge); } /// diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx401CController.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx401CController.cs index 25c16281..46cae247 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx401CController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx401CController.cs @@ -35,6 +35,9 @@ namespace PepperDash.Essentials.DM public IntFeedback VideoSourceNumericFeedback { get; protected set; } public IntFeedback AudioSourceNumericFeedback { get; protected set; } public IntFeedback HdmiInHdcpCapabilityFeedback { get; protected set; } + public BoolFeedback DisplayPortVideoSyncFeedback { get; protected set; } + public BoolFeedback HdmiVideoSyncFeedback { get; protected set; } + public BoolFeedback VgaVideoSyncFeedback { get; protected set; } public BoolFeedback FreeRunEnabledFeedback { get; protected set; } @@ -137,6 +140,21 @@ namespace PepperDash.Essentials.DM HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport; + DisplayPortVideoSyncFeedback = new BoolFeedback("DisplayPortVideoSync", () => + { + return (bool)tx.DisplayPortInput.SyncDetectedFeedback.BoolValue; + }); + + HdmiVideoSyncFeedback = new BoolFeedback(() => + { + return (bool)tx.HdmiInput.SyncDetectedFeedback.BoolValue; + }); + + VgaVideoSyncFeedback = new BoolFeedback(() => + { + return (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue; + }); + FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled); VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue); @@ -193,7 +211,8 @@ namespace PepperDash.Essentials.DM AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback, AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback, AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback, - AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiInHdcpCapabilityFeedback); + AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiInHdcpCapabilityFeedback, DisplayPortVideoSyncFeedback, + HdmiVideoSyncFeedback, VgaVideoSyncFeedback); // Set Ports for CEC DisplayPortIn.Port = Tx.DisplayPortInput; @@ -219,7 +238,18 @@ namespace PepperDash.Essentials.DM public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { - LinkDmTxToApi(this, trilist, joinStart, joinMapKey, bridge); + DmTxControllerJoinMap joinMap = GetDmTxJoinMap(joinStart, joinMapKey); + + if (HdmiVideoSyncFeedback != null) + { + HdmiVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]); + } + if (VgaVideoSyncFeedback != null) + { + VgaVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]); + } + + LinkDmTxToApi(this, trilist, joinMap, bridge); } public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type) diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k100Controller.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k100Controller.cs index c62d0adf..12889528 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k100Controller.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k100Controller.cs @@ -72,7 +72,9 @@ namespace PepperDash.Essentials.DM public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { - LinkDmTxToApi(this, trilist, joinStart, joinMapKey, bridge); + DmTxControllerJoinMap joinMap = GetDmTxJoinMap(joinStart, joinMapKey); + + LinkDmTxToApi(this, trilist, joinMap, bridge); } #region IIROutputPorts Members diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k202CController.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k202CController.cs index 1b5ecf6d..460876b4 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k202CController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k202CController.cs @@ -35,6 +35,8 @@ namespace PepperDash.Essentials.DM public IntFeedback AudioSourceNumericFeedback { get; protected set; } public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; } public IntFeedback HdmiIn2HdcpCapabilityFeedback { get; protected set; } + public BoolFeedback Hdmi1VideoSyncFeedback { get; protected set; } + public BoolFeedback Hdmi2VideoSyncFeedback { get; protected set; } //public override IntFeedback HdcpSupportAllFeedback { get; protected set; } //public override ushort HdcpSupportCapability { get; protected set; } @@ -119,6 +121,16 @@ namespace PepperDash.Essentials.DM HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support; + Hdmi1VideoSyncFeedback = new BoolFeedback(() => + { + return (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue; + }); + + Hdmi2VideoSyncFeedback = new BoolFeedback(() => + { + return (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue; + }); + var combinedFuncs = new VideoStatusFuncsWrapper { HdcpActiveFeedbackFunc = () => @@ -164,7 +176,8 @@ namespace PepperDash.Essentials.DM AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback, AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback, AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback, - AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, HdmiIn2HdcpCapabilityFeedback); + AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, HdmiIn2HdcpCapabilityFeedback, + Hdmi1VideoSyncFeedback, Hdmi2VideoSyncFeedback); // Set Ports for CEC HdmiIn1.Port = Tx.HdmiInputs[1]; @@ -190,7 +203,18 @@ namespace PepperDash.Essentials.DM public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { - LinkDmTxToApi(this, trilist, joinStart, joinMapKey, bridge); + DmTxControllerJoinMap joinMap = GetDmTxJoinMap(joinStart, joinMapKey); + + if (Hdmi1VideoSyncFeedback != null) + { + Hdmi1VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]); + } + if (Hdmi2VideoSyncFeedback != null) + { + Hdmi2VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]); + } + + LinkDmTxToApi(this, trilist, joinMap, bridge); } public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type) diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k302CController.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k302CController.cs index 5d00a32d..7d787051 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k302CController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4k302CController.cs @@ -36,6 +36,9 @@ namespace PepperDash.Essentials.DM public IntFeedback AudioSourceNumericFeedback { get; protected set; } public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; } public IntFeedback HdmiIn2HdcpCapabilityFeedback { get; protected set; } + public BoolFeedback Hdmi1VideoSyncFeedback { get; protected set; } + public BoolFeedback Hdmi2VideoSyncFeedback { get; protected set; } + public BoolFeedback VgaVideoSyncFeedback { get; protected set; } public BoolFeedback FreeRunEnabledFeedback { get; protected set; } @@ -126,6 +129,21 @@ namespace PepperDash.Essentials.DM HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support; + Hdmi1VideoSyncFeedback = new BoolFeedback(() => + { + return (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue; + }); + + Hdmi2VideoSyncFeedback = new BoolFeedback(() => + { + return (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue; + }); + + VgaVideoSyncFeedback = new BoolFeedback(() => + { + return (bool)tx.VgaInput.SyncDetectedFeedback.BoolValue; + }); + FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled); VgaBrightnessFeedback = new IntFeedback(() => tx.VgaInput.VideoControls.BrightnessFeedback.UShortValue); @@ -183,7 +201,8 @@ namespace PepperDash.Essentials.DM AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback, AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback, AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback, - AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, HdmiIn2HdcpCapabilityFeedback); + AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, HdmiIn2HdcpCapabilityFeedback, + Hdmi1VideoSyncFeedback, Hdmi2VideoSyncFeedback, VgaVideoSyncFeedback); // Set Ports for CEC HdmiIn1.Port = Tx.HdmiInputs[1]; @@ -227,7 +246,22 @@ namespace PepperDash.Essentials.DM public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { - LinkDmTxToApi(this, trilist, joinStart, joinMapKey, bridge); + DmTxControllerJoinMap joinMap = GetDmTxJoinMap(joinStart, joinMapKey); + + if (Hdmi1VideoSyncFeedback != null) + { + Hdmi1VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]); + } + if (Hdmi2VideoSyncFeedback != null) + { + Hdmi2VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]); + } + if (VgaVideoSyncFeedback != null) + { + VgaVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input3VideoSyncStatus.JoinNumber]); + } + + LinkDmTxToApi(this, trilist, joinMap, bridge); } /// diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4kz302CController.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4kz302CController.cs index 27340407..1c5703a0 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4kz302CController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTx4kz302CController.cs @@ -36,6 +36,9 @@ namespace PepperDash.Essentials.DM public IntFeedback AudioSourceNumericFeedback { get; protected set; } public IntFeedback HdmiIn1HdcpCapabilityFeedback { get; protected set; } public IntFeedback HdmiIn2HdcpCapabilityFeedback { get; protected set; } + public BoolFeedback Hdmi1VideoSyncFeedback { get; protected set; } + public BoolFeedback Hdmi2VideoSyncFeedback { get; protected set; } + public BoolFeedback DisplayPortVideoSyncFeedback { get; protected set; } //public override IntFeedback HdcpSupportAllFeedback { get; protected set; } //public override ushort HdcpSupportCapability { get; protected set; } @@ -124,6 +127,21 @@ namespace PepperDash.Essentials.DM HdcpSupportCapability = eHdcpCapabilityType.Hdcp2_2Support; + Hdmi1VideoSyncFeedback = new BoolFeedback(() => + { + return (bool)tx.HdmiInputs[1].SyncDetectedFeedback.BoolValue; + }); + + Hdmi2VideoSyncFeedback = new BoolFeedback(() => + { + return (bool)tx.HdmiInputs[2].SyncDetectedFeedback.BoolValue; + }); + + DisplayPortVideoSyncFeedback = new BoolFeedback(() => + { + return (bool)tx.DisplayPortInput.SyncDetectedFeedback.BoolValue; + }); + var combinedFuncs = new VideoStatusFuncsWrapper { @@ -174,7 +192,8 @@ namespace PepperDash.Essentials.DM AddToFeedbackList(ActiveVideoInputFeedback, VideoSourceNumericFeedback, AudioSourceNumericFeedback, AnyVideoInput.VideoStatus.HasVideoStatusFeedback, AnyVideoInput.VideoStatus.HdcpActiveFeedback, AnyVideoInput.VideoStatus.HdcpStateFeedback, AnyVideoInput.VideoStatus.VideoResolutionFeedback, - AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, HdmiIn2HdcpCapabilityFeedback); + AnyVideoInput.VideoStatus.VideoSyncFeedback, HdmiIn1HdcpCapabilityFeedback, HdmiIn2HdcpCapabilityFeedback, + Hdmi1VideoSyncFeedback, Hdmi2VideoSyncFeedback, DisplayPortVideoSyncFeedback); // Set Ports for CEC HdmiIn1.Port = Tx.HdmiInputs[1]; @@ -203,7 +222,22 @@ namespace PepperDash.Essentials.DM public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge) { - LinkDmTxToApi(this, trilist, joinStart, joinMapKey, bridge); + DmTxControllerJoinMap joinMap = GetDmTxJoinMap(joinStart, joinMapKey); + + if (Hdmi1VideoSyncFeedback != null) + { + Hdmi1VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input1VideoSyncStatus.JoinNumber]); + } + if (Hdmi2VideoSyncFeedback != null) + { + Hdmi2VideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input2VideoSyncStatus.JoinNumber]); + } + if (DisplayPortVideoSyncFeedback != null) + { + DisplayPortVideoSyncFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Input3VideoSyncStatus.JoinNumber]); + } + + LinkDmTxToApi(this, trilist, joinMap, bridge); } public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type) diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTxHelpers.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTxHelpers.cs index d8a49717..d5fd9dd2 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTxHelpers.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/Transmitters/DmTxHelpers.cs @@ -171,9 +171,8 @@ namespace PepperDash.Essentials.DM { } - protected void LinkDmTxToApi(DmTxControllerBase tx, BasicTriList trilist, uint joinStart, string joinMapKey, - EiscApiAdvanced bridge) - { + protected DmTxControllerJoinMap GetDmTxJoinMap(uint joinStart, string joinMapKey) + { var joinMap = new DmTxControllerJoinMap(joinStart); var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey); @@ -181,8 +180,11 @@ namespace PepperDash.Essentials.DM if (!string.IsNullOrEmpty(joinMapSerialized)) joinMap = JsonConvert.DeserializeObject(joinMapSerialized); - bridge.AddJoinMap(Key, joinMap); + return joinMap; + } + protected void LinkDmTxToApi(DmTxControllerBase tx, BasicTriList trilist, DmTxControllerJoinMap joinMap, EiscApiAdvanced bridge) + { if (tx.Hardware is DmHDBasedTEndPoint) { Debug.Console(1, tx, "No properties to link. Skipping device {0}", tx.Name);