mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
working on DmpsAudioOutputControllerBridge
This commit is contained in:
@@ -206,8 +206,10 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
|
|
||||||
public class DmChassisControllerJoinMap : JoinMapBase
|
public class DmChassisControllerJoinMap : JoinMapBase
|
||||||
{
|
{
|
||||||
//Digital
|
// Digtal/Analog
|
||||||
public uint SystemId { get; set; }
|
public uint SystemId { get; set; }
|
||||||
|
|
||||||
|
//Digital
|
||||||
public uint IsOnline { get; set; }
|
public uint IsOnline { get; set; }
|
||||||
public uint OutputUsb { get; set; }
|
public uint OutputUsb { get; set; }
|
||||||
public uint InputUsb { get; set; }
|
public uint InputUsb { get; set; }
|
||||||
@@ -233,7 +235,9 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
|
|
||||||
public DmChassisControllerJoinMap()
|
public DmChassisControllerJoinMap()
|
||||||
{
|
{
|
||||||
SystemId = 10;
|
//Digital/Analog
|
||||||
|
SystemId = 10; // Analog sets/gets SystemId, digital input applies and provides feedback of ID change busy
|
||||||
|
|
||||||
//Digital
|
//Digital
|
||||||
IsOnline = 11;
|
IsOnline = 11;
|
||||||
VideoSyncStatus = 100; //101-299
|
VideoSyncStatus = 100; //101-299
|
||||||
@@ -261,8 +265,6 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
OutputEndpointOnline = 700; //701-899
|
OutputEndpointOnline = 700; //701-899
|
||||||
HdcpSupportState = 1000; //1001-1199
|
HdcpSupportState = 1000; //1001-1199
|
||||||
HdcpSupportCapability = 1200; //1201-1399
|
HdcpSupportCapability = 1200; //1201-1399
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
public override void OffsetJoinNumbers(uint joinStart)
|
||||||
|
|||||||
@@ -0,0 +1,59 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
|
using Crestron.SimplSharpPro.DM;
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
using PepperDash.Essentials.DM;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Bridges
|
||||||
|
{
|
||||||
|
public static class DmpsAudioOutputControllerApiExtensions
|
||||||
|
{
|
||||||
|
public static void LinkToApi(this DmpsAudioOutputController dmAudioOutputController, BasicTriList trilis, uint joinStart, string joinMapKey)
|
||||||
|
{
|
||||||
|
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DmpsAudioOutputControllerJoinMap;
|
||||||
|
|
||||||
|
if (joinMap == null)
|
||||||
|
joinMap = new DmpsAudioOutputControllerJoinMap();
|
||||||
|
|
||||||
|
joinMap.OffsetJoinNumbers(joinStart);
|
||||||
|
|
||||||
|
Debug.Console(1, dmAudioOutputController, "Linking to Trilist '{0}'", trilis.ID.ToString("X"));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class DmpsAudioOutputControllerJoinMap: JoinMapBase
|
||||||
|
{
|
||||||
|
// Digital
|
||||||
|
public uint MasterVolumeMute { get; set; }
|
||||||
|
public uint SourceVolumeMute { get; set; }
|
||||||
|
public uint Codec1VolumeMute { get; set; }
|
||||||
|
public uint Codec2VolumeMute { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public DmpsAudioOutputControllerJoinMap()
|
||||||
|
{
|
||||||
|
MasterVolumeMute = 1; // 1-10
|
||||||
|
SourceVolumeMute = 11; // 11-20
|
||||||
|
Codec1VolumeMute = 21; // 21-30
|
||||||
|
Codec2VolumeMute = 31; // 31-40
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OffsetJoinNumbers(uint joinStart)
|
||||||
|
{
|
||||||
|
var joinOffset = joinStart -1;
|
||||||
|
|
||||||
|
MasterVolumeMute = MasterVolumeMute + joinOffset;
|
||||||
|
SourceVolumeMute = SourceVolumeMute + joinOffset;
|
||||||
|
Codec1VolumeMute = Codec1VolumeMute + joinOffset;
|
||||||
|
Codec2VolumeMute = Codec2VolumeMute + joinOffset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -139,7 +139,7 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
|
|
||||||
|
|
||||||
public DmpsRoutingControllerJoinMap()
|
public DmpsRoutingControllerJoinMap()
|
||||||
{;
|
{
|
||||||
OutputVideo = 100; //101-299
|
OutputVideo = 100; //101-299
|
||||||
OutputAudio = 300; //301-499
|
OutputAudio = 300; //301-499
|
||||||
VideoSyncStatus = 100; //101-299
|
VideoSyncStatus = 100; //101-299
|
||||||
@@ -148,8 +148,8 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
OutputCurrentVideoInputNames = 2000; //2001-2199
|
OutputCurrentVideoInputNames = 2000; //2001-2199
|
||||||
OutputCurrentAudioInputNames = 2200; //2201-2399
|
OutputCurrentAudioInputNames = 2200; //2201-2399
|
||||||
InputCurrentResolution = 2400; // 2401-2599
|
InputCurrentResolution = 2400; // 2401-2599
|
||||||
InputEndpointOnline = 500;
|
InputEndpointOnline = 500; //501-699
|
||||||
OutputEndpointOnline = 700;
|
OutputEndpointOnline = 700; //701-899
|
||||||
//HdcpSupport = 1000; //1001-1199
|
//HdcpSupport = 1000; //1001-1199
|
||||||
//HdcpSupportCapability = 1200; //1201-1399
|
//HdcpSupportCapability = 1200; //1201-1399
|
||||||
|
|
||||||
|
|||||||
@@ -121,6 +121,7 @@
|
|||||||
<Compile Include="Bridges\BridgeFactory.cs" />
|
<Compile Include="Bridges\BridgeFactory.cs" />
|
||||||
<Compile Include="Bridges\CameraControllerBridge.cs" />
|
<Compile Include="Bridges\CameraControllerBridge.cs" />
|
||||||
<Compile Include="Bridges\AirMediaControllerBridge.cs" />
|
<Compile Include="Bridges\AirMediaControllerBridge.cs" />
|
||||||
|
<Compile Include="Bridges\DmpsAudioOutputControllerBridge.cs" />
|
||||||
<Compile Include="Bridges\DmpsRoutingControllerBridge.cs" />
|
<Compile Include="Bridges\DmpsRoutingControllerBridge.cs" />
|
||||||
<Compile Include="Bridges\DisplayControllerBridge.cs" />
|
<Compile Include="Bridges\DisplayControllerBridge.cs" />
|
||||||
<Compile Include="Bridges\DigitalLoggerBridge.cs" />
|
<Compile Include="Bridges\DigitalLoggerBridge.cs" />
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ namespace PepperDash.Essentials.DM
|
|||||||
public DmpsAudioOutput SourceVolumeLevel { get; private set; }
|
public DmpsAudioOutput SourceVolumeLevel { get; private set; }
|
||||||
public DmpsAudioOutput Codec1VolumeLevel { get; private set; }
|
public DmpsAudioOutput Codec1VolumeLevel { get; private set; }
|
||||||
public DmpsAudioOutput Codec2VolumeLevel { get; private set; }
|
public DmpsAudioOutput Codec2VolumeLevel { get; private set; }
|
||||||
public Dictionary<int, DmpsAudioOutput> MicVolumeLevels { get; private set; }
|
|
||||||
|
|
||||||
public DmpsAudioOutputController(string key, string name, Card.Dmps3OutputBase card)
|
public DmpsAudioOutputController(string key, string name, Card.Dmps3OutputBase card)
|
||||||
: base(key, name)
|
: base(key, name)
|
||||||
@@ -51,6 +50,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
Codec1VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec1);
|
Codec1VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BaseDevice_DMOutputChange(Switch device, DMOutputEventArgs args)
|
void BaseDevice_DMOutputChange(Switch device, DMOutputEventArgs args)
|
||||||
@@ -111,6 +111,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
public BoolFeedback MuteFeedback { get; private set; }
|
public BoolFeedback MuteFeedback { get; private set; }
|
||||||
public IntFeedback VolumeLevelFeedback { get; private set; }
|
public IntFeedback VolumeLevelFeedback { get; private set; }
|
||||||
|
|
||||||
|
public Dictionary<int, DmpsAudioOutput> MicVolumeLevels { get; private set; }
|
||||||
|
|
||||||
Action MuteOnAction;
|
Action MuteOnAction;
|
||||||
Action MuteOffAction;
|
Action MuteOffAction;
|
||||||
Action<bool> VolumeUpAction;
|
Action<bool> VolumeUpAction;
|
||||||
@@ -120,6 +122,8 @@ namespace PepperDash.Essentials.DM
|
|||||||
{
|
{
|
||||||
Output = output;
|
Output = output;
|
||||||
|
|
||||||
|
Type = type;
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case eDmpsLevelType.Master:
|
case eDmpsLevelType.Master:
|
||||||
@@ -224,6 +228,13 @@ namespace PepperDash.Essentials.DM
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var numberOfMics = Global.ControlSystem.NumberOfMicrophones;
|
||||||
|
|
||||||
|
for (int i = 1; i <= numberOfMics; i++)
|
||||||
|
{
|
||||||
|
// Construct each mic level here
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IBasicVolumeWithFeedback Members
|
#region IBasicVolumeWithFeedback Members
|
||||||
@@ -274,6 +285,7 @@ namespace PepperDash.Essentials.DM
|
|||||||
Source,
|
Source,
|
||||||
MicsMaster,
|
MicsMaster,
|
||||||
Codec1,
|
Codec1,
|
||||||
Codec2
|
Codec2,
|
||||||
|
Mic
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user