Compare commits

...

3 Commits

Author SHA1 Message Date
jkdevito
1df8d3f617 feat: create branch to add volume control 2023-11-02 11:54:44 -05:00
Neil Dorin
2f1caff815 Merge pull request #1154 from PepperDash/hotfix/mpc3-button-list
fix: list available buttons on startup
2023-10-27 12:53:52 -06:00
Jason DeVito
4da2f25c3d fix: list available buttons on startup 2023-10-27 12:14:07 -05:00
3 changed files with 55 additions and 2 deletions

View File

@@ -55,6 +55,8 @@ namespace PepperDash.Essentials.Core.Touchpanels
InitializeButton(buttonKey, buttonConfig);
InitializeButtonFeedback(buttonKey, buttonConfig);
}
ListButtons();
});
}
@@ -318,6 +320,23 @@ namespace PepperDash.Essentials.Core.Touchpanels
foreach (var eventType in button.EventTypes[type]) DeviceJsonApi.DoDeviceAction(eventType);
}
public void ListButtons()
{
var line = new string('-', 35);
Debug.Console(0, this, line);
Debug.Console(0, this, "MPC3 Controller {0} - Available Butons", Key);
foreach (var button in _buttons)
{
Debug.Console(0, this, "Key: {0}", button.Key);
}
Debug.Console(0, this, line);
}
}
/// <summary>

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; }