mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-10 10:15:01 +00:00
Compare commits
42 Commits
feature/bu
...
hotfix/ssh
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
77c0df5d55 | ||
|
|
c7691fa102 | ||
|
|
428f9f34bd | ||
|
|
78e49871c6 | ||
|
|
12e81af9e6 | ||
|
|
544a7a2d73 | ||
|
|
1d843c6c89 | ||
|
|
c72db72e7e | ||
|
|
9e588f4da5 | ||
|
|
4c466b425c | ||
|
|
d0aed1c1c5 | ||
|
|
bf966121f9 | ||
|
|
ecadb439b2 | ||
|
|
8c1553a026 | ||
|
|
9755724342 | ||
|
|
4d25c420e5 | ||
|
|
3190dacdf8 | ||
|
|
44add9aac6 | ||
|
|
5bb6405874 | ||
|
|
fed3d7e13a | ||
|
|
af848b9ca4 | ||
|
|
b52c13d8e8 | ||
|
|
26f9118154 | ||
|
|
bba3c347c6 | ||
|
|
be96adcc06 | ||
|
|
b245016420 | ||
|
|
19f2c6aa79 | ||
|
|
533ca05ac2 | ||
|
|
9c7777fbaa | ||
|
|
5530c91b75 | ||
|
|
67e0378806 | ||
|
|
1c5aca03d2 | ||
|
|
6f5fa2c3b8 | ||
|
|
3d760cbedc | ||
|
|
d713abf614 | ||
|
|
a64b5240ad | ||
|
|
c528fecb9a | ||
|
|
355e9cde12 | ||
|
|
1df8d3f617 | ||
|
|
2f1caff815 | ||
|
|
4da2f25c3d | ||
|
|
d6334538c0 |
14
.github/workflows/docker.yml
vendored
14
.github/workflows/docker.yml
vendored
@@ -65,13 +65,13 @@ jobs:
|
|||||||
run: Write-Output "$($Env:VERSION)" | Out-File -FilePath "$($Env:GITHUB_HOME)\output\version.txt"
|
run: Write-Output "$($Env:VERSION)" | Out-File -FilePath "$($Env:GITHUB_HOME)\output\version.txt"
|
||||||
# Upload the build output as an artifact
|
# Upload the build output as an artifact
|
||||||
- name: Upload Build Output
|
- name: Upload Build Output
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Build
|
name: Build
|
||||||
path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip
|
path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip
|
||||||
# Upload the Version file as an artifact
|
# Upload the Version file as an artifact
|
||||||
- name: Upload version.txt
|
- name: Upload version.txt
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Version
|
name: Version
|
||||||
path: ${{env.GITHUB_HOME}}\output\version.txt
|
path: ${{env.GITHUB_HOME}}\output\version.txt
|
||||||
@@ -101,20 +101,18 @@ jobs:
|
|||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
steps:
|
steps:
|
||||||
- name: Download Build Version Info
|
- name: Download Build Version Info
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Version
|
name: Version
|
||||||
- name: Set Version Number
|
- name: Set Version Number
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
Get-ChildItem "./Version"
|
$version = Get-Content -Path ./version.txt
|
||||||
$version = Get-Content -Path ./Version/version.txt
|
|
||||||
Write-Host "Version: $version"
|
Write-Host "Version: $version"
|
||||||
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
Remove-Item -Path ./Version/version.txt
|
Remove-Item -Path ./version.txt
|
||||||
Remove-Item -Path ./Version
|
|
||||||
- name: Download Build output
|
- name: Download Build output
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Build
|
name: Build
|
||||||
path: ./
|
path: ./
|
||||||
|
|||||||
14
.github/workflows/main.yml
vendored
14
.github/workflows/main.yml
vendored
@@ -59,13 +59,13 @@ jobs:
|
|||||||
run: Write-Output "$($Env:VERSION)" | Out-File -FilePath "$($Env:GITHUB_HOME)\output\version.txt"
|
run: Write-Output "$($Env:VERSION)" | Out-File -FilePath "$($Env:GITHUB_HOME)\output\version.txt"
|
||||||
# Upload the build output as an artifact
|
# Upload the build output as an artifact
|
||||||
- name: Upload Build Output
|
- name: Upload Build Output
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Build
|
name: Build
|
||||||
path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip
|
path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip
|
||||||
# Upload the Version file as an artifact
|
# Upload the Version file as an artifact
|
||||||
- name: Upload version.txt
|
- name: Upload version.txt
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Version
|
name: Version
|
||||||
path: ${{env.GITHUB_HOME}}\output\version.txt
|
path: ${{env.GITHUB_HOME}}\output\version.txt
|
||||||
@@ -85,20 +85,18 @@ jobs:
|
|||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
steps:
|
steps:
|
||||||
- name: Download Build Version Info
|
- name: Download Build Version Info
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Version
|
name: Version
|
||||||
- name: Set Version Number
|
- name: Set Version Number
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
Get-ChildItem "./Version"
|
$version = Get-Content -Path ./version.txt
|
||||||
$version = Get-Content -Path ./Version/version.txt
|
|
||||||
Write-Host "Version: $version"
|
Write-Host "Version: $version"
|
||||||
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
Remove-Item -Path ./Version/version.txt
|
Remove-Item -Path ./version.txt
|
||||||
Remove-Item -Path ./Version
|
|
||||||
- name: Download Build output
|
- name: Download Build output
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Build
|
name: Build
|
||||||
path: ./
|
path: ./
|
||||||
|
|||||||
@@ -91,8 +91,8 @@ we receive and the availability of resources to evaluate contributions, we antic
|
|||||||
project remains dynamic and relevant. This may affect our responsiveness and ability to accept pull requests
|
project remains dynamic and relevant. This may affect our responsiveness and ability to accept pull requests
|
||||||
quickly. This does not mean we are ignoring them.
|
quickly. This does not mean we are ignoring them.
|
||||||
- Not all innovative ideas need to be accepted as pull requests into this GitHub project to be valuable to the community.
|
- Not all innovative ideas need to be accepted as pull requests into this GitHub project to be valuable to the community.
|
||||||
There may be times when we recommend that you just share your code for some enhancement to Ghidra from your own
|
There may be times when we recommend that you just share your code for some enhancement to Essentials from your own
|
||||||
repository. As we identify and recognize extensions that are of general interest to the reverse engineering community, we
|
repository. As we identify and recognize extensions that are of general interest to Essentials, we
|
||||||
may seek to incorporate them with our baseline.
|
may seek to incorporate them with our baseline.
|
||||||
|
|
||||||
## Legal
|
## Legal
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
catch (NullReferenceException)
|
catch (NullReferenceException)
|
||||||
{
|
{
|
||||||
Debug.ConsoleWithLog(0, this,
|
Debug.ConsoleWithLog(0, this,
|
||||||
"Please update the bridge config to use EiscBridgeAdvanced with this device: {0}", device.Key);
|
"Please update the bridge config to use eiscApiAdvanced with this device: {0}", device.Key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Debug.Console(1, this, "Devices Linked.");
|
Debug.Console(1, this, "Devices Linked.");
|
||||||
|
|||||||
@@ -20,6 +20,18 @@ namespace PepperDash.Essentials.Core.Bridges
|
|||||||
public JoinDataComplete AutomaticInputRoutingEnabled = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
|
public JoinDataComplete AutomaticInputRoutingEnabled = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
|
||||||
new JoinMetadata { Description = "Air Media Automatic Input Routing Enable(d)", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
new JoinMetadata { Description = "Air Media Automatic Input Routing Enable(d)", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("HdmiInHdcpSupportOn")]
|
||||||
|
public JoinDataComplete HdmiInHdcpSupportOn = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Turns on HDCP support for HDMI in. Reports state as FB", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("HdmiInHdcpSupportOff")]
|
||||||
|
public JoinDataComplete HdmiInHdcpSupportOff = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Turns off HDCP support for HDMI in. Reports state as FB", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
|
[JoinName("HdmiInDisabledByHdcp")]
|
||||||
|
public JoinDataComplete HdmiInDisabledByHdcp = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 },
|
||||||
|
new JoinMetadata { Description = "Reports if ", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||||
|
|
||||||
[JoinName("VideoOut")]
|
[JoinName("VideoOut")]
|
||||||
public JoinDataComplete VideoOut = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
|
public JoinDataComplete VideoOut = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
|
||||||
new JoinMetadata { Description = "Air Media Video Route Select / Feedback", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
new JoinMetadata { Description = "Air Media Video Route Select / Feedback", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using Crestron.SimplSharpPro;
|
||||||
|
using Crestron.SimplSharpPro.GeneralIO;
|
||||||
|
using PepperDash.Core;
|
||||||
|
using PepperDash.Essentials.Core.Config;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core.CrestronIO
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Wrapper class for CEN-IO-COM-Xxx expander module
|
||||||
|
/// </summary>
|
||||||
|
[Description("Wrapper class for the CEN-IO-COM-102 & CEN-IO-COM-202 expander module")]
|
||||||
|
public class CenIoComController : CrestronGenericBaseDevice, IComPorts
|
||||||
|
{
|
||||||
|
private readonly CenIoCom _cenIoCom;
|
||||||
|
|
||||||
|
public CenIoComController(string key, string name, CenIoCom cenIo)
|
||||||
|
:base(key, name, cenIo)
|
||||||
|
{
|
||||||
|
_cenIoCom = cenIo;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Implementation of IComPorts
|
||||||
|
|
||||||
|
public CrestronCollection<ComPort> ComPorts
|
||||||
|
{
|
||||||
|
get { return _cenIoCom.ComPorts; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public int NumberOfComPorts
|
||||||
|
{
|
||||||
|
get { return _cenIoCom.NumberOfComPorts; }
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CenIoCom102ControllerFactory : EssentialsDeviceFactory<CenIoComController>
|
||||||
|
{
|
||||||
|
private const string CenIoCom102Type = "ceniocom102";
|
||||||
|
private const string CenIoCom202Type = "ceniocom202";
|
||||||
|
|
||||||
|
public CenIoCom102ControllerFactory()
|
||||||
|
{
|
||||||
|
TypeNames = new List<string> { CenIoCom102Type, CenIoCom202Type };
|
||||||
|
}
|
||||||
|
|
||||||
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
|
{
|
||||||
|
Debug.Console(1, "Factory Attempting to create new CEN-IO-COM-Xxx Device");
|
||||||
|
|
||||||
|
var control = CommFactory.GetControlPropertiesConfig(dc);
|
||||||
|
if (control == null)
|
||||||
|
{
|
||||||
|
Debug.Console(1, "Factory failed to create a new CEN-IO-COM-Xxx Device, control properties not found");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var ipid = control.IpIdInt;
|
||||||
|
if (ipid < 2)
|
||||||
|
{
|
||||||
|
Debug.Console(1, "Factory failed to create a new CEN-IO-COM-Xxx Device, invalid IP-ID found");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (dc.Type)
|
||||||
|
{
|
||||||
|
case CenIoCom102Type:
|
||||||
|
{
|
||||||
|
return new CenIoComController(dc.Key, dc.Name, new CenIoCom102(ipid, Global.ControlSystem));
|
||||||
|
}
|
||||||
|
case CenIoCom202Type:
|
||||||
|
{
|
||||||
|
return new CenIoComController(dc.Key, dc.Name, new CenIoCom202(ipid, Global.ControlSystem));
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
Debug.Console(1, "Factory failed to create a new CEN-IO-COM-Xxx Device, invalid type '{0}'", dc.Type);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -83,9 +83,9 @@
|
|||||||
<HintPath>..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath>
|
<HintPath>..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="mscorlib" />
|
<Reference Include="mscorlib" />
|
||||||
<Reference Include="PepperDash_Core, Version=1.2.1.30543, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="PepperDash_Core, Version=1.3.3.26212, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\packages\PepperDashCore\lib\net35\PepperDash_Core.dll</HintPath>
|
<HintPath>..\..\..\packages\PepperDash.Core-1.3.3-hotfix-445\lib\net35\PepperDash_Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
@@ -185,6 +185,7 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Crestron IO\Cards\CenCi33Controller.cs" />
|
<Compile Include="Crestron IO\Cards\CenCi33Controller.cs" />
|
||||||
<Compile Include="Crestron IO\Cards\InternalCardCageController.cs" />
|
<Compile Include="Crestron IO\Cards\InternalCardCageController.cs" />
|
||||||
|
<Compile Include="Crestron IO\CenIoCom\CenIoComController.cs" />
|
||||||
<Compile Include="Crestron IO\DinCenCn\DinCenCnController.cs" />
|
<Compile Include="Crestron IO\DinCenCn\DinCenCnController.cs" />
|
||||||
<Compile Include="Crestron IO\DinCenCn\IHasCresnetBranches.cs" />
|
<Compile Include="Crestron IO\DinCenCn\IHasCresnetBranches.cs" />
|
||||||
<Compile Include="Crestron IO\DinIo8\DinIo8Controller.cs" />
|
<Compile Include="Crestron IO\DinIo8\DinIo8Controller.cs" />
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ namespace PepperDash.Essentials.Core.Touchpanels
|
|||||||
InitializeButton(buttonKey, buttonConfig);
|
InitializeButton(buttonKey, buttonConfig);
|
||||||
InitializeButtonFeedback(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);
|
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>
|
/// <summary>
|
||||||
|
|||||||
@@ -43,11 +43,12 @@ namespace PepperDash.Essentials.DM.AirMedia
|
|||||||
public BoolFeedback HdmiVideoSyncDetectedFeedback { get; private set; }
|
public BoolFeedback HdmiVideoSyncDetectedFeedback { get; private set; }
|
||||||
public StringFeedback SerialNumberFeedback { get; private set; }
|
public StringFeedback SerialNumberFeedback { get; private set; }
|
||||||
public BoolFeedback AutomaticInputRoutingEnabledFeedback { get; private set; }
|
public BoolFeedback AutomaticInputRoutingEnabledFeedback { get; private set; }
|
||||||
|
public BoolFeedback HdmiInHdcpSupportOnFeedback { get; private set; }
|
||||||
|
public BoolFeedback HdmiInDisabledByHdcpFeedback { get; private set; }
|
||||||
|
|
||||||
public AirMediaController(string key, string name, Am3x00 device, DeviceConfig dc, AirMediaPropertiesConfig props)
|
public AirMediaController(string key, string name, Am3x00 device, DeviceConfig dc, AirMediaPropertiesConfig props)
|
||||||
: base(key, name, device)
|
: base(key, name, device)
|
||||||
{
|
{
|
||||||
|
|
||||||
AirMedia = device;
|
AirMedia = device;
|
||||||
|
|
||||||
DeviceConfig = dc;
|
DeviceConfig = dc;
|
||||||
@@ -101,6 +102,8 @@ namespace PepperDash.Essentials.DM.AirMedia
|
|||||||
LoginCodeFeedback = new IntFeedback(() => AirMedia.AirMedia.LoginCodeFeedback.UShortValue);
|
LoginCodeFeedback = new IntFeedback(() => AirMedia.AirMedia.LoginCodeFeedback.UShortValue);
|
||||||
ConnectionAddressFeedback = new StringFeedback(() => AirMedia.AirMedia.ConnectionAddressFeedback.StringValue);
|
ConnectionAddressFeedback = new StringFeedback(() => AirMedia.AirMedia.ConnectionAddressFeedback.StringValue);
|
||||||
HostnameFeedback = new StringFeedback(() => AirMedia.AirMedia.HostNameFeedback.StringValue);
|
HostnameFeedback = new StringFeedback(() => AirMedia.AirMedia.HostNameFeedback.StringValue);
|
||||||
|
HdmiInHdcpSupportOnFeedback = new BoolFeedback(() => AirMedia.HdmiIn.HdcpSupportOnFeedback.BoolValue);
|
||||||
|
HdmiInDisabledByHdcpFeedback = new BoolFeedback(() => AirMedia.HdmiIn.DisabledByHdcpFeedback.BoolValue);
|
||||||
|
|
||||||
// TODO: Figure out if we can actually get the TSID/Serial
|
// TODO: Figure out if we can actually get the TSID/Serial
|
||||||
SerialNumberFeedback = new StringFeedback(() => "unknown");
|
SerialNumberFeedback = new StringFeedback(() => "unknown");
|
||||||
@@ -178,6 +181,13 @@ namespace PepperDash.Essentials.DM.AirMedia
|
|||||||
ConnectionAddressFeedback.LinkInputSig(trilist.StringInput[joinMap.ConnectionAddressFB.JoinNumber]);
|
ConnectionAddressFeedback.LinkInputSig(trilist.StringInput[joinMap.ConnectionAddressFB.JoinNumber]);
|
||||||
HostnameFeedback.LinkInputSig(trilist.StringInput[joinMap.HostnameFB.JoinNumber]);
|
HostnameFeedback.LinkInputSig(trilist.StringInput[joinMap.HostnameFB.JoinNumber]);
|
||||||
SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumberFeedback.JoinNumber]);
|
SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumberFeedback.JoinNumber]);
|
||||||
|
|
||||||
|
trilist.SetSigFalseAction(joinMap.HdmiInHdcpSupportOn.JoinNumber, () => SetHcdpSupport(true));
|
||||||
|
HdmiInHdcpSupportOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.HdmiInHdcpSupportOn.JoinNumber]);
|
||||||
|
trilist.SetSigFalseAction(joinMap.HdmiInHdcpSupportOff.JoinNumber, () => SetHcdpSupport(false));
|
||||||
|
HdmiInHdcpSupportOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.HdmiInHdcpSupportOff.JoinNumber]);
|
||||||
|
|
||||||
|
HdmiInDisabledByHdcpFeedback.LinkInputSig(trilist.BooleanInput[joinMap.HdmiInDisabledByHdcp.JoinNumber]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -248,6 +258,14 @@ namespace PepperDash.Essentials.DM.AirMedia
|
|||||||
{
|
{
|
||||||
if (args.EventId == DMInputEventIds.SourceSyncEventId)
|
if (args.EventId == DMInputEventIds.SourceSyncEventId)
|
||||||
HdmiVideoSyncDetectedFeedback.FireUpdate();
|
HdmiVideoSyncDetectedFeedback.FireUpdate();
|
||||||
|
else if (args.EventId == DMInputEventIds.HdcpSupportOnEventId)
|
||||||
|
{
|
||||||
|
HdmiInHdcpSupportOnFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
else if (args.EventId == DMInputEventIds.DisabledByHdcpEventId)
|
||||||
|
{
|
||||||
|
HdmiInDisabledByHdcpFeedback.FireUpdate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -296,6 +314,14 @@ namespace PepperDash.Essentials.DM.AirMedia
|
|||||||
AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.AirBoard;
|
AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.AirBoard;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetHcdpSupport(bool on)
|
||||||
|
{
|
||||||
|
if (on)
|
||||||
|
AirMedia.HdmiIn.HdcpSupportOn();
|
||||||
|
else
|
||||||
|
AirMedia.HdmiIn.HdcpSupportOff();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reboots the device
|
/// Reboots the device
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -0,0 +1,185 @@
|
|||||||
|
using Crestron.SimplSharp;
|
||||||
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
|
using Crestron.SimplSharpPro.DM;
|
||||||
|
using PepperDash.Core;
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
|
namespace PepperDash_Essentials_DM.Chassis
|
||||||
|
{
|
||||||
|
public class HdPsXxxAnalogAuxMixerController : IKeyed,
|
||||||
|
IHasVolumeControlWithFeedback, IHasMuteControlWithFeedback
|
||||||
|
{
|
||||||
|
public string Key { get; private set; }
|
||||||
|
|
||||||
|
private readonly HdPsXxxAnalogAuxMixer _mixer;
|
||||||
|
|
||||||
|
public HdPsXxxAnalogAuxMixerController(string parent, uint mixer, HdPsXxx chassis)
|
||||||
|
{
|
||||||
|
Key = string.Format("{0}-analogMixer{1}", parent, mixer);
|
||||||
|
|
||||||
|
_mixer = chassis.AnalogAuxiliaryMixer[mixer];
|
||||||
|
|
||||||
|
_mixer.AuxMixerPropertyChange += OnAuxMixerPropertyChange;
|
||||||
|
_mixer.AuxiliaryMuteControl.MuteAndVolumeControlPropertyChange += OnMuteAndVolumeControlPropertyChange;
|
||||||
|
|
||||||
|
VolumeLevelFeedback = new IntFeedback(() => VolumeLevel);
|
||||||
|
MuteFeedback = new BoolFeedback(() => IsMuted);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Volume
|
||||||
|
|
||||||
|
private void OnAuxMixerPropertyChange(object sender, GenericEventArgs args)
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "OnAuxMixerPropertyChange: {0} > Index-{1}, EventId-{2}", sender.ToString(), args.Index, args.EventId);
|
||||||
|
|
||||||
|
switch (args.EventId)
|
||||||
|
{
|
||||||
|
case MuteAndVolumeContorlEventIds.VolumeFeedbackEventId:
|
||||||
|
{
|
||||||
|
VolumeLevel = _mixer.VolumeFeedback.ShortValue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case MuteAndVolumeContorlEventIds.MuteOnEventId:
|
||||||
|
case MuteAndVolumeContorlEventIds.MuteOffEventId:
|
||||||
|
{
|
||||||
|
IsMuted = _mixer.AuxiliaryMuteControl.MuteOnFeedback.BoolValue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
Debug.Console(1, this, "OnAuxMixerPropertyChange: {0} > Index-{1}, EventId-{2} - unhandled eventId", sender.ToString(), args.Index, args.EventId);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private const ushort CrestronLevelMin = 0;
|
||||||
|
private const ushort CrestronLevelMax = 65535;
|
||||||
|
|
||||||
|
private const int DeviceLevelMin = -800;
|
||||||
|
private const int DeviceLevelMax = 200;
|
||||||
|
|
||||||
|
private const int RampTime = 5000;
|
||||||
|
|
||||||
|
private int _volumeLevel;
|
||||||
|
|
||||||
|
public int VolumeLevel
|
||||||
|
{
|
||||||
|
get { return _volumeLevel; }
|
||||||
|
private set
|
||||||
|
{
|
||||||
|
var level = value;
|
||||||
|
|
||||||
|
_volumeLevel = CrestronEnvironment.ScaleWithLimits(level, DeviceLevelMax, DeviceLevelMin, CrestronLevelMax, CrestronLevelMin);
|
||||||
|
|
||||||
|
Debug.Console(1, this, "VolumeFeedback: level-'{0}', scaled-'{1}'", level, _volumeLevel);
|
||||||
|
|
||||||
|
VolumeLevelFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public IntFeedback VolumeLevelFeedback { get; private set; }
|
||||||
|
|
||||||
|
public void SetVolume(ushort level)
|
||||||
|
{
|
||||||
|
var levelScaled = CrestronEnvironment.ScaleWithLimits(level, CrestronLevelMax, CrestronLevelMin, DeviceLevelMax, DeviceLevelMin);
|
||||||
|
|
||||||
|
Debug.Console(1, this, "SetVolume: level-'{0}', levelScaled-'{1}'", level, levelScaled);
|
||||||
|
|
||||||
|
_mixer.Volume.ShortValue = (short)levelScaled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void VolumeUp(bool pressRelease)
|
||||||
|
{
|
||||||
|
if (pressRelease)
|
||||||
|
{
|
||||||
|
_mixer.Volume.CreateSignedRamp(DeviceLevelMax, RampTime);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_mixer.Volume.StopRamp();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void VolumeDown(bool pressRelease)
|
||||||
|
{
|
||||||
|
if (pressRelease)
|
||||||
|
{
|
||||||
|
_mixer.Volume.CreateSignedRamp(DeviceLevelMin, RampTime);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_mixer.Volume.StopRamp();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#region Mute
|
||||||
|
|
||||||
|
private void OnMuteAndVolumeControlPropertyChange(MuteControl device, GenericEventArgs args)
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "OnMuteAndVolumeControlPropertyChange: {0} > Index-{1}, EventId-{2}", device.ToString(), args.Index, args.EventId);
|
||||||
|
|
||||||
|
switch (args.EventId)
|
||||||
|
{
|
||||||
|
case MuteAndVolumeContorlEventIds.VolumeFeedbackEventId:
|
||||||
|
{
|
||||||
|
VolumeLevel = _mixer.VolumeFeedback.ShortValue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case MuteAndVolumeContorlEventIds.MuteOnEventId:
|
||||||
|
case MuteAndVolumeContorlEventIds.MuteOffEventId:
|
||||||
|
{
|
||||||
|
IsMuted = _mixer.AuxiliaryMuteControl.MuteOnFeedback.BoolValue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
Debug.Console(1, this, "OnMuteAndVolumeControlPropertyChange: {0} > Index-{1}, EventId-{2} - unhandled eventId", device.ToString(), args.Index, args.EventId);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool _isMuted;
|
||||||
|
|
||||||
|
public bool IsMuted
|
||||||
|
{
|
||||||
|
get { return _isMuted; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_isMuted = value;
|
||||||
|
|
||||||
|
Debug.Console(1, this, "IsMuted: _isMuted-'{0}'", _isMuted);
|
||||||
|
|
||||||
|
MuteFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public BoolFeedback MuteFeedback { get; private set; }
|
||||||
|
|
||||||
|
public void MuteOn()
|
||||||
|
{
|
||||||
|
_mixer.AuxiliaryMuteControl.MuteOn();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void MuteOff()
|
||||||
|
{
|
||||||
|
_mixer.AuxiliaryMuteControl.MuteOff();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void MuteToggle()
|
||||||
|
{
|
||||||
|
if (IsMuted)
|
||||||
|
MuteOff();
|
||||||
|
else
|
||||||
|
MuteOn();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -82,6 +82,19 @@ namespace PepperDash_Essentials_DM.Chassis
|
|||||||
|
|
||||||
OutputNames = props.Outputs;
|
OutputNames = props.Outputs;
|
||||||
SetupOutputs(OutputNames);
|
SetupOutputs(OutputNames);
|
||||||
|
|
||||||
|
foreach (var item in _chassis.HdmiDmLiteOutputs)
|
||||||
|
{
|
||||||
|
var audioDevice = new HdPsXxxOutputAudioController(Key, item.Number, _chassis);
|
||||||
|
Debug.Console(2, this, "Adding HdPsXxxOutputAudioController '{0}' for output '{1}'", audioDevice.Key, item.Number);
|
||||||
|
DeviceManager.AddDevice(audioDevice);
|
||||||
|
}
|
||||||
|
foreach (var item in _chassis.AnalogAuxiliaryMixer)
|
||||||
|
{
|
||||||
|
var audioDevice = new HdPsXxxAnalogAuxMixerController(Key, item.MixerNumber, _chassis);
|
||||||
|
Debug.Console(2, this, "Adding HdPsXxAnalogAuxMixerCOntorller '{0}' for output '{1}'", audioDevice.Key, item.MixerNumber);
|
||||||
|
DeviceManager.AddDevice(audioDevice);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// get input priorities
|
// get input priorities
|
||||||
@@ -125,7 +138,7 @@ namespace PepperDash_Essentials_DM.Chassis
|
|||||||
() => input.InputPort.HdcpSupportOnFeedback.BoolValue));
|
() => input.InputPort.HdcpSupportOnFeedback.BoolValue));
|
||||||
|
|
||||||
VideoInputSyncFeedbacks.Add(new BoolFeedback(index.ToString(CultureInfo.InvariantCulture),
|
VideoInputSyncFeedbacks.Add(new BoolFeedback(index.ToString(CultureInfo.InvariantCulture),
|
||||||
() => input.VideoDetectedFeedback.BoolValue));
|
() => input.InputPort.SyncDetectedFeedback.BoolValue));
|
||||||
}
|
}
|
||||||
|
|
||||||
// iterate through DM Lite inputs
|
// iterate through DM Lite inputs
|
||||||
@@ -154,7 +167,7 @@ namespace PepperDash_Essentials_DM.Chassis
|
|||||||
() => input.InputPort.HdcpSupportOnFeedback.BoolValue));
|
() => input.InputPort.HdcpSupportOnFeedback.BoolValue));
|
||||||
|
|
||||||
VideoInputSyncFeedbacks.Add(new BoolFeedback(index.ToString(CultureInfo.InvariantCulture),
|
VideoInputSyncFeedbacks.Add(new BoolFeedback(index.ToString(CultureInfo.InvariantCulture),
|
||||||
() => input.VideoDetectedFeedback.BoolValue));
|
() => input.InputPort.SyncDetectedFeedback.BoolValue));
|
||||||
}
|
}
|
||||||
|
|
||||||
_chassis.DMInputChange += _chassis_InputChange;
|
_chassis.DMInputChange += _chassis_InputChange;
|
||||||
@@ -174,7 +187,7 @@ namespace PepperDash_Essentials_DM.Chassis
|
|||||||
var output = item;
|
var output = item;
|
||||||
var index = item.Number;
|
var index = item.Number;
|
||||||
var name = string.IsNullOrEmpty(OutputNames[index])
|
var name = string.IsNullOrEmpty(OutputNames[index])
|
||||||
? string.Format("Output {0}", index)
|
? string.Format("Port {0}", index)
|
||||||
: OutputNames[index];
|
: OutputNames[index];
|
||||||
|
|
||||||
output.Name.StringValue = name;
|
output.Name.StringValue = name;
|
||||||
@@ -185,7 +198,7 @@ namespace PepperDash_Essentials_DM.Chassis
|
|||||||
FeedbackMatchObject = output,
|
FeedbackMatchObject = output,
|
||||||
Port = output.HdmiOutput.HdmiOutputPort
|
Port = output.HdmiOutput.HdmiOutputPort
|
||||||
};
|
};
|
||||||
Debug.Console(1, this, "Adding Output port: {0} - {1}", hdmiPort.Key, name);
|
Debug.Console(1, this, "Adding Port port: {0} - {1}", hdmiPort.Key, name);
|
||||||
OutputPorts.Add(hdmiPort);
|
OutputPorts.Add(hdmiPort);
|
||||||
|
|
||||||
var dmLiteKey = string.Format("dmLiteOut{0}", index);
|
var dmLiteKey = string.Format("dmLiteOut{0}", index);
|
||||||
@@ -194,7 +207,7 @@ namespace PepperDash_Essentials_DM.Chassis
|
|||||||
FeedbackMatchObject = output,
|
FeedbackMatchObject = output,
|
||||||
Port = output.DmLiteOutput.DmLiteOutputPort
|
Port = output.DmLiteOutput.DmLiteOutputPort
|
||||||
};
|
};
|
||||||
Debug.Console(1, this, "Adding Output port: {0} - {1}", dmLitePort.Key, name);
|
Debug.Console(1, this, "Adding Port port: {0} - {1}", dmLitePort.Key, name);
|
||||||
OutputPorts.Add(dmLitePort);
|
OutputPorts.Add(dmLitePort);
|
||||||
|
|
||||||
OutputRouteNameFeedback.Add(new StringFeedback(index.ToString(CultureInfo.InvariantCulture),
|
OutputRouteNameFeedback.Add(new StringFeedback(index.ToString(CultureInfo.InvariantCulture),
|
||||||
@@ -203,7 +216,14 @@ namespace PepperDash_Essentials_DM.Chassis
|
|||||||
VideoOutputRouteFeedbacks.Add(new IntFeedback(index.ToString(CultureInfo.InvariantCulture),
|
VideoOutputRouteFeedbacks.Add(new IntFeedback(index.ToString(CultureInfo.InvariantCulture),
|
||||||
() => output.VideoOutFeedback == null ? 0 : (int)output.VideoOutFeedback.Number));
|
() => output.VideoOutFeedback == null ? 0 : (int)output.VideoOutFeedback.Number));
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
Debug.Console(2, this, "----> AnalogAuxillaryMixer.Count-{0}", _chassis.AnalogAuxiliaryMixer.Count);
|
||||||
|
foreach (var item in _chassis.AnalogAuxiliaryMixer)
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "----> AnalogAuxillaryMixer[{0}].LineMuteVolumeControl.Count-{1}", item.MixerNumber, item.LineMuteVolumeControl.Count);
|
||||||
|
Debug.Console(2, this, "----> AnalogAuxillaryMixer[{0}].SourceMuteVolumeControl.Count-{1}", item.MixerNumber, item.SourceMuteVolumeControl.Count);
|
||||||
|
}
|
||||||
|
*/
|
||||||
_chassis.DMOutputChange += _chassis_OutputChange;
|
_chassis.DMOutputChange += _chassis_OutputChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -224,7 +244,7 @@ Selector: {4}
|
|||||||
|
|
||||||
foreach (var port in OutputPorts)
|
foreach (var port in OutputPorts)
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, @"Output Port Key: {0}
|
Debug.Console(0, this, @"Port Port Key: {0}
|
||||||
Port: {1}
|
Port: {1}
|
||||||
Type: {2}
|
Type: {2}
|
||||||
ConnectionType: {3}
|
ConnectionType: {3}
|
||||||
@@ -413,6 +433,8 @@ Selector: {4}
|
|||||||
_chassis.AutoRouteOff();
|
_chassis.AutoRouteOff();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region Events
|
#region Events
|
||||||
|
|
||||||
|
|
||||||
@@ -434,24 +456,37 @@ Selector: {4}
|
|||||||
// _chassis input change event
|
// _chassis input change event
|
||||||
private void _chassis_InputChange(Switch device, DMInputEventArgs args)
|
private void _chassis_InputChange(Switch device, DMInputEventArgs args)
|
||||||
{
|
{
|
||||||
var eventId = args.EventId;
|
switch (args.EventId)
|
||||||
|
|
||||||
switch (eventId)
|
|
||||||
{
|
{
|
||||||
case DMInputEventIds.VideoDetectedEventId:
|
case DMInputEventIds.RemoteTransmitterDetectedEventId:
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Event ID {0}: Updating VideoInputSyncFeedbacks", eventId);
|
// signal found on HD-PSXxx > Inputs > Inputs DM Lite X
|
||||||
foreach (var item in VideoInputSyncFeedbacks)
|
Debug.Console(2, this, "{0} DM Input Event ID {1}-RemoteTransmitterDetected | Number {2}",
|
||||||
{
|
device.ToString(), args.EventId, args.Number);
|
||||||
item.FireUpdate();
|
break;
|
||||||
}
|
}
|
||||||
|
case DMInputEventIds.SourceSyncEventId: // id-14
|
||||||
|
case DMInputEventIds.VideoDetectedEventId: // id-9
|
||||||
|
{
|
||||||
|
// signal found on HD-PSXxx > Inputs > HDMI/DM Lite X
|
||||||
|
Debug.Console(1, this, "{0} DM Input Event ID {1} | Number {2}: Updating VideoInputSyncFeedbacks",
|
||||||
|
device.Name, args.EventId, args.Number);
|
||||||
|
|
||||||
|
var input = args.Number;
|
||||||
|
|
||||||
|
var feedback = VideoInputSyncFeedbacks[(int)input];
|
||||||
|
if (feedback == null) return;
|
||||||
|
|
||||||
|
feedback.FireUpdate();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DMInputEventIds.InputNameFeedbackEventId:
|
case DMInputEventIds.InputNameFeedbackEventId:
|
||||||
case DMInputEventIds.InputNameEventId:
|
case DMInputEventIds.InputNameEventId:
|
||||||
case DMInputEventIds.NameFeedbackEventId:
|
case DMInputEventIds.NameFeedbackEventId:
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Event ID {0}: Updating name feedbacks", eventId);
|
Debug.Console(1, this, "{0} DM Input Event ID {1}-Name | Number {2}: Updating name feedbacks",
|
||||||
|
device.Name, args.EventId, args.Number);
|
||||||
|
|
||||||
var input = args.Number;
|
var input = args.Number;
|
||||||
var name = _chassis.HdmiInputs[input].NameFeedback.StringValue;
|
var name = _chassis.HdmiInputs[input].NameFeedback.StringValue;
|
||||||
@@ -461,7 +496,8 @@ Selector: {4}
|
|||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
Debug.Console(1, this, "Uhandled DM Input Event ID {0}", eventId);
|
Debug.Console(1, this, "{0} DM Input Event ID {1} | Number {2}: Uhandled",
|
||||||
|
device.Name, args.EventId, args.Number);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -469,33 +505,53 @@ Selector: {4}
|
|||||||
OnDmInputChange(args);
|
OnDmInputChange(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// _chassis output change event
|
// _chassis output change event
|
||||||
private void _chassis_OutputChange(Switch device, DMOutputEventArgs args)
|
private void _chassis_OutputChange(Switch device, DMOutputEventArgs args)
|
||||||
{
|
{
|
||||||
if (args.EventId != DMOutputEventIds.VideoOutEventId) return;
|
switch (args.EventId)
|
||||||
|
{
|
||||||
|
case DMOutputEventIds.VideoOutEventId:
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "{0} DM Output Event Id {1} | Number {2} | Index {3}: VideoOutEventId",
|
||||||
|
device.Name, args.EventId, args.Number, args.Index);
|
||||||
|
|
||||||
var output = args.Number;
|
var output = args.Number;
|
||||||
|
|
||||||
var input = _chassis.HdmiDmLiteOutputs[output].VideoOutFeedback == null
|
var input = _chassis.HdmiDmLiteOutputs[output].VideoOutFeedback == null
|
||||||
? 0
|
? 0
|
||||||
: _chassis.HdmiDmLiteOutputs[output].VideoOutFeedback.Number;
|
: _chassis.HdmiDmLiteOutputs[output].VideoOutFeedback.Number;
|
||||||
|
|
||||||
var outputName = OutputNames[output];
|
var outputName = OutputNames[output];
|
||||||
|
|
||||||
var feedback = VideoOutputRouteFeedbacks[outputName];
|
var feedback = VideoOutputRouteFeedbacks[outputName];
|
||||||
if (feedback == null) return;
|
if (feedback == null) return;
|
||||||
|
|
||||||
var inputPort = InputPorts.FirstOrDefault(
|
var inputPort = InputPorts.FirstOrDefault(
|
||||||
p => p.FeedbackMatchObject == _chassis.HdmiDmLiteOutputs[output].VideoOutFeedback);
|
p => p.FeedbackMatchObject == _chassis.HdmiDmLiteOutputs[output].VideoOutFeedback);
|
||||||
|
|
||||||
var outputPort = OutputPorts.FirstOrDefault(
|
var outputPort = OutputPorts.FirstOrDefault(
|
||||||
p => p.FeedbackMatchObject == _chassis.HdmiDmLiteOutputs[output]);
|
p => p.FeedbackMatchObject == _chassis.HdmiDmLiteOutputs[output]);
|
||||||
|
|
||||||
feedback.FireUpdate();
|
feedback.FireUpdate();
|
||||||
|
|
||||||
OnSwitchChange(new RoutingNumericEventArgs(
|
OnSwitchChange(new RoutingNumericEventArgs(output, input, outputPort, inputPort, eRoutingSignalType.AudioVideo));
|
||||||
output, input, outputPort, inputPort, eRoutingSignalType.AudioVideo));
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case DMOutputEventIds.RemoteReceiverDetectedEventId:
|
||||||
|
{
|
||||||
|
// signal found on HD-PSXxx > Output[s] > Output [X] > DM Lite [X]
|
||||||
|
Debug.Console(2, this, "{0} DM Output Event Id {1} | Number {2} | Index {3}: RemoteRecevierDetectedEventId",
|
||||||
|
device.Name, args.EventId, args.Number, args.Index);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "{0} DM Output Event Id {1} | Number {2} | Index:{3}: Unhandled",
|
||||||
|
device.Name, args.EventId, args.Number, args.Index);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -517,14 +573,15 @@ Selector: {4}
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region Factory
|
#region Factory
|
||||||
|
|
||||||
|
|
||||||
public class HdSp401ControllerFactory : EssentialsDeviceFactory<HdPsXxxController>
|
public class HdPsXxxControllerFactory : EssentialsDeviceFactory<HdPsXxxController>
|
||||||
{
|
{
|
||||||
public HdSp401ControllerFactory()
|
public HdPsXxxControllerFactory()
|
||||||
{
|
{
|
||||||
TypeNames = new List<string>() { "hdps401", "hdps402", "hdps621", "hdps622" };
|
TypeNames = new List<string> { "hdps401", "hdps402", "hdps621", "hdps622" };
|
||||||
}
|
}
|
||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,167 @@
|
|||||||
|
using Crestron.SimplSharp;
|
||||||
|
using Crestron.SimplSharpPro.DM;
|
||||||
|
using PepperDash.Core;
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
|
namespace PepperDash_Essentials_DM.Chassis
|
||||||
|
{
|
||||||
|
public class HdPsXxxOutputAudioController : IKeyed,
|
||||||
|
IHasVolumeControlWithFeedback, IHasMuteControlWithFeedback
|
||||||
|
{
|
||||||
|
public string Key { get; private set; }
|
||||||
|
|
||||||
|
private readonly HdPsXxxHdmiDmLiteOutputMixer _mixer; // volume/volumeFeedback
|
||||||
|
private readonly HdPsXxxOutputPort _port; // mute/muteFeedback
|
||||||
|
|
||||||
|
public HdPsXxxOutputAudioController(string parent, uint output, HdPsXxx chassis)
|
||||||
|
{
|
||||||
|
Key = string.Format("{0}-audioOut{1}", parent, output);
|
||||||
|
|
||||||
|
_port = chassis.HdmiDmLiteOutputs[output].OutputPort;
|
||||||
|
_mixer = chassis.HdmiDmLiteOutputs[output].Mixer;
|
||||||
|
|
||||||
|
chassis.DMOutputChange += ChassisOnDmOutputChange;
|
||||||
|
|
||||||
|
VolumeLevelFeedback = new IntFeedback(() => VolumeLevel);
|
||||||
|
MuteFeedback = new BoolFeedback(() => IsMuted);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ChassisOnDmOutputChange(Switch device, DMOutputEventArgs args)
|
||||||
|
{
|
||||||
|
switch (args.EventId)
|
||||||
|
{
|
||||||
|
case (DMOutputEventIds.VolumeEventId):
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "HdPsXxxOutputAudioController: {0} > Index-{1}, Number-{3}, EventId-{2} - AudioMute/UnmuteEventId",
|
||||||
|
device.ToString(), args.Index, args.EventId, args.Number);
|
||||||
|
|
||||||
|
VolumeLevel = _mixer.VolumeFeedback.ShortValue;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case DMOutputEventIds.MuteOnEventId:
|
||||||
|
case DMOutputEventIds.MuteOffEventId:
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "HdPsXxxOutputAudioController: {0} > Index-{1}, Number-{3}, EventId-{2} - MuteOnEventId/MuteOffEventId",
|
||||||
|
device.ToString(), args.Index, args.EventId, args.Number);
|
||||||
|
|
||||||
|
IsMuted = _port.MuteOnFeedback.BoolValue;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
Debug.Console(1, this, "HdPsXxxOutputAudioController: {0} > Index-{1}, Number-{3}, EventId-{2} - unhandled eventId",
|
||||||
|
device.ToString(), args.Index, args.EventId, args.Number);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Volume
|
||||||
|
|
||||||
|
private const ushort CrestronLevelMin = 0;
|
||||||
|
private const ushort CrestronLevelMax = 65535;
|
||||||
|
|
||||||
|
private const int DeviceLevelMin = -800;
|
||||||
|
private const int DeviceLevelMax = 200;
|
||||||
|
|
||||||
|
private const int RampTime = 5000;
|
||||||
|
|
||||||
|
private int _volumeLevel;
|
||||||
|
|
||||||
|
public int VolumeLevel
|
||||||
|
{
|
||||||
|
get { return _volumeLevel; }
|
||||||
|
private set
|
||||||
|
{
|
||||||
|
var level = value;
|
||||||
|
|
||||||
|
_volumeLevel = CrestronEnvironment.ScaleWithLimits(level, DeviceLevelMax, DeviceLevelMin, CrestronLevelMax, CrestronLevelMin);
|
||||||
|
|
||||||
|
Debug.Console(2, this, "VolumeFeedback: level-'{0}', scaled-'{1}'", level, _volumeLevel);
|
||||||
|
|
||||||
|
VolumeLevelFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public IntFeedback VolumeLevelFeedback { get; private set; }
|
||||||
|
|
||||||
|
public void SetVolume(ushort level)
|
||||||
|
{
|
||||||
|
var levelScaled = CrestronEnvironment.ScaleWithLimits(level, CrestronLevelMax, CrestronLevelMin, DeviceLevelMax, DeviceLevelMin);
|
||||||
|
|
||||||
|
Debug.Console(1, this, "SetVolume: level-'{0}', levelScaled-'{1}'", level, levelScaled);
|
||||||
|
|
||||||
|
_mixer.Volume.ShortValue = (short)levelScaled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void VolumeUp(bool pressRelease)
|
||||||
|
{
|
||||||
|
if (pressRelease)
|
||||||
|
{
|
||||||
|
_mixer.Volume.CreateSignedRamp(DeviceLevelMax, RampTime);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_mixer.Volume.StopRamp();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void VolumeDown(bool pressRelease)
|
||||||
|
{
|
||||||
|
if (pressRelease)
|
||||||
|
{
|
||||||
|
_mixer.Volume.CreateSignedRamp(DeviceLevelMin, RampTime);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_mixer.Volume.StopRamp();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#region Mute
|
||||||
|
|
||||||
|
private bool _isMuted;
|
||||||
|
|
||||||
|
public bool IsMuted
|
||||||
|
{
|
||||||
|
get { return _isMuted; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_isMuted = value;
|
||||||
|
|
||||||
|
Debug.Console(1, this, "IsMuted: _isMuted-'{0}'", _isMuted);
|
||||||
|
|
||||||
|
MuteFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public BoolFeedback MuteFeedback { get; private set; }
|
||||||
|
|
||||||
|
public void MuteOn()
|
||||||
|
{
|
||||||
|
_port.MuteOn();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void MuteOff()
|
||||||
|
{
|
||||||
|
_port.MuteOff();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void MuteToggle()
|
||||||
|
{
|
||||||
|
if (IsMuted)
|
||||||
|
MuteOff();
|
||||||
|
else
|
||||||
|
MuteOn();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,6 +15,9 @@ namespace PepperDash_Essentials_DM.Config
|
|||||||
[JsonProperty("outputs")]
|
[JsonProperty("outputs")]
|
||||||
public Dictionary<uint, string> Outputs { get; set; }
|
public Dictionary<uint, string> Outputs { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("volumeMixerId")]
|
||||||
|
public uint VolumeMixerId { get; set; }
|
||||||
|
|
||||||
// "inputPriorities": "1,4,3,2"
|
// "inputPriorities": "1,4,3,2"
|
||||||
[JsonProperty("inputPriorities")]
|
[JsonProperty("inputPriorities")]
|
||||||
public string InputPriorities { get; set; }
|
public string InputPriorities { get; set; }
|
||||||
|
|||||||
@@ -104,7 +104,9 @@
|
|||||||
<Compile Include="Chassis\HdMd8xNController.cs" />
|
<Compile Include="Chassis\HdMd8xNController.cs" />
|
||||||
<Compile Include="Chassis\HdMdNxM4kEBridgeableController.cs" />
|
<Compile Include="Chassis\HdMdNxM4kEBridgeableController.cs" />
|
||||||
<Compile Include="Chassis\HdMdNxM4kEController.cs" />
|
<Compile Include="Chassis\HdMdNxM4kEController.cs" />
|
||||||
|
<Compile Include="Chassis\HdPsXxxAnalogAuxMixerController.cs" />
|
||||||
<Compile Include="Chassis\HdPsXxxController.cs" />
|
<Compile Include="Chassis\HdPsXxxController.cs" />
|
||||||
|
<Compile Include="Chassis\HdPsXxxOutputAudioController.cs" />
|
||||||
<Compile Include="Config\HdPsXxxPropertiesConfig.cs" />
|
<Compile Include="Config\HdPsXxxPropertiesConfig.cs" />
|
||||||
<Compile Include="Config\InputPropertiesConfig.cs" />
|
<Compile Include="Config\InputPropertiesConfig.cs" />
|
||||||
<Compile Include="Endpoints\EndpointInterfaces.cs" />
|
<Compile Include="Endpoints\EndpointInterfaces.cs" />
|
||||||
|
|||||||
@@ -994,7 +994,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
//Special Change for protected directory clear
|
//Special Change for protected directory clear
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinMap.DirectoryClearSelected.JoinNumber, (b) => SelectDirectoryEntry(_directoryCodec, 0, _directoryTrilist, _directoryJoinmap));
|
trilist.SetBoolSigAction(joinMap.DirectoryClearSelected.JoinNumber, (b) => SelectDirectoryEntry(codec, 0, trilist, joinMap));
|
||||||
|
|
||||||
// Report feedback for number of contact methods for selected contact
|
// Report feedback for number of contact methods for selected contact
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="PepperDashCore" version="1.3.1" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
|
<package id="PepperDashCore" version="1.3.3-hotfix-449" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
|
||||||
</packages>
|
</packages>
|
||||||
|
|||||||
Reference in New Issue
Block a user