mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 05:05:00 +00:00
Adds FreeRun support for DM-TX-201-C. Need to test on NYC hardware and then apply to other TX classes.
This commit is contained in:
@@ -19,7 +19,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Controller class for all DM-TX-201C/S/F transmitters
|
/// Controller class for all DM-TX-201C/S/F transmitters
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DmTx201XController : DmTxControllerBase, ITxRouting, IHasFeedback
|
public class DmTx201XController : DmTxControllerBase, ITxRouting, IHasFeedback, IHasFreeRun
|
||||||
{
|
{
|
||||||
public DmTx201S Tx { get; private set; } // uses the 201S class as it is the base class for the 201C
|
public DmTx201S Tx { get; private set; } // uses the 201S class as it is the base class for the 201C
|
||||||
|
|
||||||
@@ -33,8 +33,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
public IntFeedback AudioSourceNumericFeedback { get; protected set; }
|
||||||
public IntFeedback HdmiInHdcpCapabilityFeedback { get; protected set; }
|
public IntFeedback HdmiInHdcpCapabilityFeedback { get; protected set; }
|
||||||
|
|
||||||
//public override IntFeedback HdcpSupportAllFeedback { get; protected set; }
|
public BoolFeedback FreeRunEnabledFeedback { get; protected set; }
|
||||||
//public override ushort HdcpSupportCapability { get; protected set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Helps get the "real" inputs, including when in Auto
|
/// Helps get the "real" inputs, including when in Auto
|
||||||
@@ -122,6 +121,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
FreeRunEnabledFeedback = new BoolFeedback(() => tx.VgaInput.FreeRunFeedback == eDmFreeRunSetting.Enabled);
|
||||||
|
|
||||||
HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport;
|
HdcpSupportCapability = eHdcpCapabilityType.HdcpAutoSupport;
|
||||||
|
|
||||||
var combinedFuncs = new VideoStatusFuncsWrapper
|
var combinedFuncs = new VideoStatusFuncsWrapper
|
||||||
@@ -195,6 +196,28 @@ namespace PepperDash.Essentials.DM
|
|||||||
return base.CustomActivate();
|
return base.CustomActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enables or disables free run
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="enable"></param>
|
||||||
|
public void SetFreeRunEnabled(bool enable)
|
||||||
|
{
|
||||||
|
if (enable)
|
||||||
|
{
|
||||||
|
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Enabled;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Tx.VgaInput.FreeRun = eDmFreeRunSetting.Disabled;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Switches the audio/video source based on the integer value (0-Auto, 1-HDMI, 2-VGA, 3-Disable)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <param name="output"></param>
|
||||||
|
/// <param name="type"></param>
|
||||||
public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
|
public void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type)
|
||||||
{
|
{
|
||||||
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
Debug.Console(2, this, "Executing Numeric Switch to input {0}.", input);
|
||||||
@@ -250,6 +273,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
Debug.Console(2, this, " Audio Source: {0}", Tx.AudioSourceFeedback);
|
||||||
AudioSourceNumericFeedback.FireUpdate();
|
AudioSourceNumericFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
void InputStreamChangeEvent(EndpointInputStream inputStream, EndpointInputStreamEventArgs args)
|
||||||
@@ -264,6 +288,10 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
HdmiInHdcpCapabilityFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
else if (args.EventId == EndpointInputStreamEventIds.FreeRunFeedbackEventId)
|
||||||
|
{
|
||||||
|
FreeRunEnabledFeedback.FireUpdate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.DM
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Defines a device capable of setting the Free Run state of a VGA input and reporting feedback
|
||||||
|
/// </summary>
|
||||||
|
public interface IHasFreeRun
|
||||||
|
{
|
||||||
|
BoolFeedback FreeRunEnabledFeedback { get; }
|
||||||
|
|
||||||
|
void SetFreeRunEnabled(bool enable);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -96,6 +96,7 @@
|
|||||||
<Compile Include="Chassis\DmpsInternalVirtualDmTxController.cs" />
|
<Compile Include="Chassis\DmpsInternalVirtualDmTxController.cs" />
|
||||||
<Compile Include="Chassis\DmpsRoutingController.cs" />
|
<Compile Include="Chassis\DmpsRoutingController.cs" />
|
||||||
<Compile Include="Chassis\HdMdNxM4kEController.cs" />
|
<Compile Include="Chassis\HdMdNxM4kEController.cs" />
|
||||||
|
<Compile Include="Endpoints\Transmitters\IFreeRunEnabled.cs" />
|
||||||
<Compile Include="IDmSwitch.cs" />
|
<Compile Include="IDmSwitch.cs" />
|
||||||
<Compile Include="Config\DmpsRoutingConfig.cs" />
|
<Compile Include="Config\DmpsRoutingConfig.cs" />
|
||||||
<Compile Include="Config\DmRmcConfig.cs" />
|
<Compile Include="Config\DmRmcConfig.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user