feat: create branch to add volume control

This commit is contained in:
jkdevito
2023-11-02 11:54:44 -05:00
parent 2f1caff815
commit 1df8d3f617
2 changed files with 36 additions and 2 deletions

View File

@@ -16,9 +16,11 @@ using PepperDash_Essentials_DM.Config;
namespace PepperDash_Essentials_DM.Chassis
{
[Description("Wrapper class for all HdPsXxx switchers")]
public class HdPsXxxController : CrestronGenericBridgeableBaseDevice, IRoutingNumericWithFeedback, IRoutingHasVideoInputSyncFeedbacks
public class HdPsXxxController : CrestronGenericBridgeableBaseDevice, IRoutingNumericWithFeedback, IRoutingHasVideoInputSyncFeedbacks, IHasVolumeControlWithFeedback
{
private readonly HdPsXxx _chassis;
private readonly string _defaultAudioKey = "";
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
@@ -82,6 +84,9 @@ namespace PepperDash_Essentials_DM.Chassis
OutputNames = props.Outputs;
SetupOutputs(OutputNames);
if (!string.IsNullOrEmpty(props.DefaultAudioKey))
_defaultAudioKey = props.DefaultAudioKey;
}
// get input priorities
@@ -413,6 +418,31 @@ Selector: {4}
_chassis.AutoRouteOff();
}
#region IHasVolumeWithFeedback Members
public void VolumeUp(bool pressRelease)
{
}
public void VolumeDown(bool pressRelease)
{
throw new NotImplementedException();
}
public void SetVolume(ushort level)
{
throw new NotImplementedException();
}
public IntFeedback VolumeLevelFeedback { get; private set; }
#endregion
#region Events
@@ -517,6 +547,7 @@ Selector: {4}
#endregion
#region Factory
@@ -571,7 +602,7 @@ Selector: {4}
}
#endregion
#endregion
}

View File

@@ -15,6 +15,9 @@ namespace PepperDash_Essentials_DM.Config
[JsonProperty("outputs")]
public Dictionary<uint, string> Outputs { get; set; }
[JsonProperty("defaultAudioKey")]
public string DefaultAudioKey { get; set; }
// "inputPriorities": "1,4,3,2"
[JsonProperty("inputPriorities")]
public string InputPriorities { get; set; }