Compare commits

..

28 Commits

Author SHA1 Message Date
Nick Genovese
4f562e0d8e Merge branch 'development' into feature/add-queues 2020-08-31 15:39:26 -04:00
Nick Genovese
fdae50a972 Adds a generic queue and string/byte implementations. Also adds a class that processes string responses from a IBasicCommunication or Gather 2020-08-31 15:38:06 -04:00
Andrew Welker
75c407ca01 Merge pull request #395 from PepperDash/feature/Expose-HRx50-Buttons
Exposes buttons for HR-xx0 remotes to Essentials
2020-08-29 16:18:30 -04:00
Andrew Welker
2b40c5a55c Merge branch 'development' into feature/Expose-HRx50-Buttons 2020-08-29 15:10:17 -04:00
Trevor Payne
cffe55428a Exposes buttons for HR-xx0 remotes to essentials
Resolves #394
2020-08-28 14:57:09 -05:00
Andrew Welker
f51708e01d Merge pull request #393 from PepperDash/hotfix/add-vc-camera-control-to-sg-ui
Hotfix/add vc camera control to sg ui
2020-08-28 14:58:09 -04:00
Andrew Welker
25faa7e702 Merge branch 'main' into hotfix/add-vc-camera-control-to-sg-ui 2020-08-28 14:17:55 -04:00
Andrew Welker
c6dab1fe9a added SO event handler 2020-08-28 12:02:53 -06:00
Neil Dorin
c9178aef76 Everything working except the actions to select cameras 2020-08-28 00:12:01 -06:00
Andrew Welker
aa8b349711 Merge pull request #388 from PepperDash/hotfix/fix-joinedsiginterlock-nullref
Fix odd merge issues with Screensaver controller class
2020-08-27 20:51:33 -04:00
Andrew Welker
6194948259 Merge pull request #391 from PepperDash/hotfix/fix-joinedsiginterlock-nullref
Hotfix/fix joinedsiginterlock nullref
2020-08-27 20:51:18 -04:00
Neil Dorin
ff6e898091 More testing. Only remaining issue is camera selection 2020-08-27 18:14:11 -06:00
Neil Dorin
c43503eb27 Tested locally. Most funtions working correclty 2020-08-27 17:58:45 -06:00
Andrew Welker
2373d0ace7 Merge pull request #390 from PepperDash/hotfix/fix-hdcp-issues-on-specific-inputcard-types
Hotfix/fix hdcp issues on specific inputcard types
2020-08-27 19:16:21 -04:00
Andrew Welker
f10ac6da06 Merge branch 'main' into hotfix/fix-joinedsiginterlock-nullref 2020-08-27 19:15:58 -04:00
Neil Dorin
e90b9fe5e3 Merge remote-tracking branch 'origin/hotfix/fix-joinedsiginterlock-nullref' into hotfix/add-vc-camera-control-to-sg-ui 2020-08-27 16:39:09 -06:00
Neil Dorin
da73365c2f Camera Control implemented and ready to test 2020-08-27 16:24:05 -06:00
Andrew Welker
3f9253a550 Merge pull request #389 from PepperDash/hotfix/fix-hdcp-issues-on-specific-inputcard-types
Hotfix/fix hdcp issues on specific inputcard types
2020-08-27 16:54:08 -04:00
Neil Dorin
0ed316eaa4 cast as correct base type and change port to HdmiInput 2020-08-27 13:31:00 -06:00
Neil Dorin
5f80e12faf Handles scenario where Dmc4kHdDspBase may not support Hdcp2 2020-08-27 13:22:54 -06:00
Neil Dorin
64d92fdfce adds extra event handler 2020-08-27 13:09:28 -06:00
Neil Dorin
6c400c80a2 Fixes issue where true was always being passed into SetHdcpStateAction method 2020-08-27 12:58:43 -06:00
Neil Dorin
9846d87a40 Adds case to handle misisng eventId for HdcpSupportOffEventId 2020-08-27 12:25:08 -06:00
Neil Dorin
e952f3d775 Adds missing case for Dmc4kHdDspBase 2020-08-27 11:51:06 -06:00
Andrew Welker
726f2083db Merge pull request #385 from PepperDash/release/1.6.2
Release/1.6.2
2020-08-26 18:48:39 -04:00
Andrew Welker
436db82006 fix weird merge conflicts 2020-08-26 14:49:11 -06:00
Andrew Welker
5938869e7a fix show & hide methods 2020-08-26 14:26:59 -06:00
Andrew Welker
4bad8585e5 add null check to popup handler method 2020-08-26 14:24:20 -06:00
16 changed files with 1498 additions and 43 deletions

View File

@@ -120,14 +120,22 @@ namespace PepperDash.Essentials
/// 1206
/// </summary>
public const uint VCRecentsVisible = 1206;
/// <summary>
/// 1207
/// </summary>
public const uint VCCameraVisible = 1207;
/// <summary>
/// 1208
/// </summary>
public const uint VCSelfViewLayoutVisible = 1208;
public const uint VCCameraAutoVisible = 1208;
/// <summary>
/// 1209
/// </summary>
public const uint VCCameraManualVisible = 1209;
/// <summary>
/// 1210
/// </summary>
public const uint VCCameraOffVisible = 1210;
/// <summary>
/// 1211 - 1215
/// </summary>
@@ -225,6 +233,45 @@ namespace PepperDash.Essentials
/// </summary>
public const uint VCMinMaxEnable = 1256;
/// <summary>
/// 1260
/// </summary>
public const uint VCCameraModeBarVisible = 1260;
/// <summary>
/// 1261
/// </summary>
public const uint VCCameraSelectBarWithoutModeVisible = 1261;
/// <summary>
/// 1271
/// </summary>
public const uint VCCameraZoomIn = 1271;
/// <summary>
/// 1272
/// </summary>
public const uint VCCameraZoomOut = 1272;
/// <summary>
/// 1280
/// </summary>
public const uint VCCameraPresetSavedLabelVisible = 1280;
/// <summary>
/// 1281
/// </summary>
public const uint VCCameraPreset1 = 1281;
/// <summary>
/// 1282
/// </summary>
public const uint VCCameraPreset2 = 1282;
/// <summary>
/// 1283
/// </summary>
public const uint VCCameraPreset3 = 1283;
// Letter joins start at 2921;
//******************************************************

View File

@@ -33,6 +33,21 @@
/// </summary>
public const uint VCLayoutsList = 1205;
/// <summary>
/// 1206 VC Camera Mode horizontal list
/// </summary>
public const uint VCCameraMode = 1206;
/// <summary>
/// 1207 VC Camera Mode Dpad
/// </summary>
public const uint VCCameraDpad = 1207;
/// <summary>
/// 1208 VC Camera Select
/// </summary>
public const uint VCCameraSelect = 1208;
//******************************************************
// General

View File

@@ -41,6 +41,21 @@ namespace PepperDash.Essentials
public const uint VCRecentListTimeTextStart = 1231;
// RANGE IN USE
public const uint VCRecentListTimeTextEnd = 1260;
/// <summary>
/// 1281
/// </summary>
public const uint VCCameraPresetLabel1 = 1281;
/// <summary>
/// 1282
/// </summary>
public const uint VCCameraPresetLabel2 = 1282;
/// <summary>
/// 1283
/// </summary>
public const uint VCCameraPresetLabel3 = 1283;
/// <summary>
/// 1291 - the current layout mode
/// </summary>

View File

@@ -349,7 +349,7 @@ namespace PepperDash.Essentials
// Check if the popup interlock is shown, and if one of the header popups is current, then show the carets subpage
if (e.IsShown)
{
if (e.NewJoin == Parent.EnvironmentDriver.BackgroundSubpageJoin)
if (Parent.EnvironmentDriver != null && e.NewJoin == Parent.EnvironmentDriver.BackgroundSubpageJoin)
headerPopupShown = true;
else if (e.NewJoin == UIBoolJoin.HeaderActiveCallsListVisible)
headerPopupShown = true;

View File

@@ -18,7 +18,7 @@ namespace PepperDash.Essentials
/// <summary>
/// The parent driver for this
/// </summary>
EssentialsPanelMainInterfaceDriver Parent;
private readonly EssentialsPanelMainInterfaceDriver _parent;
CTimer PositionTimer;
@@ -32,34 +32,46 @@ namespace PepperDash.Essentials
public ScreenSaverController(EssentialsPanelMainInterfaceDriver parent, CrestronTouchpanelPropertiesConfig config)
: base(parent.TriList)
{
Parent = parent;
_parent = parent;
PositionTimeoutMs = config.ScreenSaverMovePositionIntervalMs;
TriList.SetSigFalseAction(UIBoolJoin.MCScreenSaverClosePress, () => this.Hide());
PositionJoins = new List<uint>() { UIBoolJoin.MCScreenSaverPosition1Visible, UIBoolJoin.MCScreenSaverPosition2Visible, UIBoolJoin.MCScreenSaverPosition3Visible, UIBoolJoin.MCScreenSaverPosition4Visible };
var cmdName = String.Format("shwscrsvr-{0}", config.IpId);
CrestronConsole.AddNewConsoleCommand((o) => Show(), cmdName, "Shows Panel Screensaver", ConsoleAccessLevelEnum.AccessOperator);
TriList.SetSigFalseAction(UIBoolJoin.MCScreenSaverClosePress, Hide);
}
public override void Show()
{
TriList.SetBool(UIBoolJoin.MCScreenSaverVisible, true);
Parent.AvDriver.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.MCScreenSaverVisible);
//TriList.SetBool(UIBoolJoin.MCScreenSaverVisible, true);
_parent.AvDriver.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.MCScreenSaverVisible);
CurrentPositionIndex = 0;
SetCurrentPosition();
StartPositionTimer();
base.Show();
}
public override void Hide()
{
if (PositionTimer != null)
{
PositionTimer.Stop();
PositionTimer.Dispose();
PositionTimer = null;
}
ClearAllPositions();
TriList.SetBool(UIBoolJoin.MCScreenSaverVisible, false);
Parent.AvDriver.PopupInterlock.HideAndClear();
//TriList.SetBool(UIBoolJoin.MCScreenSaverVisible, false);
_parent.AvDriver.PopupInterlock.HideAndClear();
base.Hide();
}
void StartPositionTimer()
{
if (PositionTimer == null)

View File

@@ -4,6 +4,7 @@ using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core;
@@ -13,6 +14,7 @@ using PepperDash.Essentials.Core.SmartObjects;
using PepperDash.Essentials.Core.Touchpanels.Keyboards;
using PepperDash.Essentials.Devices.Common.Codec;
using PepperDash.Essentials.Devices.Common.VideoCodec;
using PepperDash.Essentials.Devices.Common.Cameras;
namespace PepperDash.Essentials.UIDrivers.VC
{
@@ -41,6 +43,11 @@ namespace PepperDash.Essentials.UIDrivers.VC
/// </summary>
JoinedSigInterlock VCControlsInterlock;
/// <summary>
/// For the camera control mode (auto/manual/off)
/// </summary>
JoinedSigInterlock VCCameraControlModeInterlock;
/// <summary>
/// For the different staging bars: Active, inactive
/// </summary>
@@ -58,6 +65,12 @@ namespace PepperDash.Essentials.UIDrivers.VC
SmartObjectDynamicList RecentCallsList;
SmartObjectDynamicList DirectoryList;
SmartObjectDPad CameraPtzPad;
SmartObjectDynamicList CameraModeList;
SmartObjectDynamicList CameraSelectList;
BoolFeedback DirectoryBackButtonVisibleFeedback;
@@ -76,6 +89,8 @@ namespace PepperDash.Essentials.UIDrivers.VC
bool CodecHasFavorites;
bool ShowCameraModeControls;
CTimer BackspaceTimer;
@@ -118,6 +133,9 @@ namespace PepperDash.Essentials.UIDrivers.VC
LocalPrivacyIsMuted = new BoolFeedback(() => false);
VCControlsInterlock = new JoinedSigInterlock(triList);
VCCameraControlModeInterlock = new JoinedSigInterlock(triList);
if (CodecHasFavorites)
VCControlsInterlock.SetButDontShow(UIBoolJoin.VCKeypadWithFavoritesVisible);
else
@@ -161,6 +179,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
SetupDirectoryList();
SearchStringBackspaceVisibleFeedback = new BoolFeedback(() => SearchStringBuilder.Length > 0);
SearchStringBackspaceVisibleFeedback.LinkInputSig(triList.BooleanInput[UIBoolJoin.VCDirectoryBackspaceVisible]);
@@ -196,6 +215,8 @@ namespace PepperDash.Essentials.UIDrivers.VC
if(HeaderDriver.HeaderButtonsAreSetUp)
HeaderDriver.ComputeHeaderCallStatus(Codec);
SetupCameraControls();
}
void SetupAddresses()
@@ -450,6 +471,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
TriList.SetSigFalseAction(UIBoolJoin.VCStagingDirectoryPress, ShowDirectory);
TriList.SetSigFalseAction(UIBoolJoin.VCStagingKeypadPress, ShowKeypad);
TriList.SetSigFalseAction(UIBoolJoin.VCStagingRecentsPress, ShowRecents);
TriList.SetSigFalseAction(UIBoolJoin.VCStagingCameraPress, ShowCameraControls);
TriList.SetSigFalseAction(UIBoolJoin.VCStagingConnectPress, ConnectPress);
TriList.SetSigFalseAction(UIBoolJoin.CallEndPress, () =>
{
@@ -467,6 +489,365 @@ namespace PepperDash.Essentials.UIDrivers.VC
});
}
void SetupCameraControls()
{
CameraPtzPad = new SmartObjectDPad(TriList.SmartObjects[UISmartObjectJoin.VCCameraDpad], true);
// If the codec supports camera auto or off, we need to show the mode selector subpage
ShowCameraModeControls = Codec is IHasCameraAutoMode || Codec is IHasCameraOff;
if (ShowCameraModeControls)
{
CameraModeList = new SmartObjectDynamicList(TriList.SmartObjects[UISmartObjectJoin.VCCameraMode], true, 0);
VCControlsInterlock.StatusChanged += new EventHandler<StatusChangedEventArgs>(VCControlsInterlock_StatusChanged);
var codecOffCameras = Codec as IHasCameraOff;
var codecAutoCameras = Codec as IHasCameraAutoMode;
if (codecAutoCameras != null)
{
CameraModeList.SetItemButtonAction(1,(b) => codecAutoCameras.CameraAutoModeOn());
TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 1 Visible"].BoolValue = true;
codecAutoCameras.CameraAutoModeIsOnFeedback.LinkInputSig(CameraModeList.SmartObject.BooleanInput["Item 1 Selected"]);
//TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanOutput["Item 1 Pressed"].SetSigFalseAction(
//() => codecAutoCameras.CameraAutoModeOn());
codecAutoCameras.CameraAutoModeIsOnFeedback.OutputChange += (o, a) =>
{
if (a.BoolValue)
{
SetCameraManualModeButtonFeedback(false);
if (VCControlsInterlock.CurrentJoin == UIBoolJoin.VCCameraModeBarVisible)
{
VCCameraControlModeInterlock.ShowInterlocked(UIBoolJoin.VCCameraAutoVisible);
}
else
{
VCCameraControlModeInterlock.SetButDontShow(UIBoolJoin.VCCameraAutoVisible);
}
}
else
{
ShowCameraManualMode();
}
};
}
// Manual button always visible
CameraModeList.SetItemButtonAction(2, (b) => ShowCameraManualMode());
TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 2 Visible"].BoolValue = true;
//TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanOutput["Item 2 Pressed"].SetSigFalseAction(
// () => ShowCameraManualMode());
if (codecOffCameras != null)
{
TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 3 Visible"].BoolValue = true;
codecOffCameras.CameraIsOffFeedback.LinkInputSig(CameraModeList.SmartObject.BooleanInput["Item 3 Selected"]);
CameraModeList.SetItemButtonAction(3, (b) => codecOffCameras.CameraOff());
//TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanOutput["Item 3 Pressed"].SetSigFalseAction(
// () => codecOffCameras.CameraOff());
codecOffCameras.CameraIsOffFeedback.OutputChange += (o, a) =>
{
if (a.BoolValue)
{
SetCameraManualModeButtonFeedback(false);
if (VCControlsInterlock.CurrentJoin == UIBoolJoin.VCCameraModeBarVisible)
{
VCCameraControlModeInterlock.ShowInterlocked(UIBoolJoin.VCCameraOffVisible);
}
else
{
VCCameraControlModeInterlock.SetButDontShow(UIBoolJoin.VCCameraOffVisible);
}
}
else
{
ShowCameraManualMode();
}
};
}
}
var camerasCodec = Codec as IHasCameras;
if(camerasCodec != null)
{
//CameraSelectList = new SmartObjectDynamicList(TriList.SmartObjects[UISmartObjectJoin.VCCameraSelect], true, 0);
var so = TriList.SmartObjects[UISmartObjectJoin.VCCameraSelect];
so.SigChange += SmartObject_SigChange;
for (uint i = 1; i <= camerasCodec.Cameras.Count; i++)
{
var cameraKey = camerasCodec.Cameras[(int)i - 1].Key;
Debug.Console(1, "Setting up action for Camera {0} with Key: {1} for button Item {0} Pressed", i, cameraKey);
//TODO: Fix camera selection action. For some reson this action doesn't execute when the buttons are pressed
var sig = so.BooleanOutput[String.Format("Item {0} Pressed", i)];
so.BooleanOutput[string.Format("Item {0} Pressed", i)].SetSigFalseAction(
() => camerasCodec.SelectCamera(cameraKey));
}
so.UShortInput["Set Number of Items"].UShortValue = (ushort)camerasCodec.Cameras.Count;
//TriList.SmartObjects[UISmartObjectJoin.VCCameraSelect].UShortOutput["Item Clicked"].SetUShortSigAction(
// (u) =>
// {
// var cameraKey = camerasCodec.Cameras[u - 1].Key;
// Debug.Console(1, "Selecting Camera {0} with Key: {1}", u, cameraKey);
// camerasCodec.SelectCamera(cameraKey);
// });
// Set the names for the cameras
for (int i = 1; i <= camerasCodec.Cameras.Count; i++)
{
so.StringInput[string.Format("Set Item {0} Text", i)].StringValue = camerasCodec.Cameras[i - 1].Name;
}
SetCameraSelectedFeedback();
camerasCodec.CameraSelected += camerasCodec_CameraSelected;
MapCameraActions();
}
SetupPresets();
}
void SmartObject_SigChange(GenericBase currentDevice, SmartObjectEventArgs args)
{
var uo = args.Sig.UserObject;
if (uo is Action<bool>)
(uo as Action<bool>)(args.Sig.BoolValue);
else if (uo is Action<ushort>)
(uo as Action<ushort>)(args.Sig.UShortValue);
else if (uo is Action<string>)
(uo as Action<string>)(args.Sig.StringValue);
}
void VCControlsInterlock_StatusChanged(object sender, StatusChangedEventArgs e)
{
// Need to hide the camera mode interlock if the mode bar gets hidden
if (e.PreviousJoin == UIBoolJoin.VCCameraModeBarVisible)
VCCameraControlModeInterlock.Hide();
// These deal with hiding/showing the camera select bar if no mode controls are visible (tied to manual controls being visible)
if(!ShowCameraModeControls)
{
if(e.PreviousJoin == UIBoolJoin.VCCameraManualVisible)
TriList.SetBool(UIBoolJoin.VCCameraSelectBarWithoutModeVisible, false);
if (e.NewJoin == UIBoolJoin.VCCameraManualVisible)
TriList.SetBool(UIBoolJoin.VCCameraSelectBarWithoutModeVisible, true);
}
}
/// <summary>
/// Shows the preset saved label for 2 seconds
/// </summary>
void ShowPresetStoreFeedback()
{
TriList.BooleanInput[UIBoolJoin.VCCameraPresetSavedLabelVisible].BoolValue = true;
var timer = new CTimer((o) => TriList.BooleanInput[UIBoolJoin.VCCameraPresetSavedLabelVisible].BoolValue = false, 2000);
}
void presetsCodec_CodecRoomPresetsListHasChanged(object sender, EventArgs e)
{
SetupPresets();
}
void camerasCodec_CameraSelected(object sender, CameraSelectedEventArgs e)
{
MapCameraActions();
SetCameraSelectedFeedback();
}
/// <summary>
/// Set the feedback for the button of the selected camera
/// </summary>
void SetCameraSelectedFeedback()
{
var camerasCodec = Codec as IHasCameras;
for (int i = 1; i <= camerasCodec.Cameras.Count; i++)
{
var cameraSelected = camerasCodec.SelectedCameraFeedback.StringValue;
var state = false;
if (cameraSelected == camerasCodec.Cameras[i - 1].Key)
{
state = true;
}
TriList.SmartObjects[UISmartObjectJoin.VCCameraSelect].BooleanInput[string.Format("Item {0} Selected", i)].BoolValue = state;
}
}
void SetupPresets()
{
var presetsCodec = Codec as IHasCodecRoomPresets;
if (presetsCodec != null)
{
uint holdTime = 5000;
presetsCodec.CodecRoomPresetsListHasChanged += new EventHandler<EventArgs>(presetsCodec_CodecRoomPresetsListHasChanged);
TriList.BooleanOutput[UIBoolJoin.VCCameraPreset1].SetSigHeldAction(
holdTime, () => presetsCodec.CodecRoomPresetStore(1, presetsCodec.NearEndPresets[0].Description), ShowPresetStoreFeedback, () => presetsCodec.CodecRoomPresetSelect(1));
TriList.BooleanOutput[UIBoolJoin.VCCameraPreset2].SetSigHeldAction(
holdTime, () => presetsCodec.CodecRoomPresetStore(2, presetsCodec.NearEndPresets[1].Description), ShowPresetStoreFeedback, () => presetsCodec.CodecRoomPresetSelect(2));
TriList.BooleanOutput[UIBoolJoin.VCCameraPreset3].SetSigHeldAction(
holdTime, () => presetsCodec.CodecRoomPresetStore(3, presetsCodec.NearEndPresets[2].Description), ShowPresetStoreFeedback, () => presetsCodec.CodecRoomPresetSelect(3));
TriList.StringInput[UIStringJoin.VCCameraPresetLabel1].StringValue = presetsCodec.NearEndPresets[0].Description;
TriList.StringInput[UIStringJoin.VCCameraPresetLabel2].StringValue = presetsCodec.NearEndPresets[1].Description;
TriList.StringInput[UIStringJoin.VCCameraPresetLabel3].StringValue = presetsCodec.NearEndPresets[2].Description;
}
}
/// <summary>
/// Maps button actions to the selected camera
/// </summary>
void MapCameraActions()
{
// Now we setup the button actions for the manual controls
var camerasCodec = Codec as IHasCameras;
if (camerasCodec != null && camerasCodec.SelectedCamera != null)
{
var dpad = CameraPtzPad;
var camera = camerasCodec.SelectedCamera as IHasCameraPtzControl;
if (camera != null)
{
if (camerasCodec.SelectedCamera.CanTilt)
{
dpad.SigUp.SetBoolSigAction((b) =>
{
if (b)
camera.TiltUp();
else
camera.TiltStop();
});
dpad.SigDown.SetBoolSigAction((b) =>
{
if (b)
camera.TiltDown();
else
camera.TiltStop();
});
}
if (camerasCodec.SelectedCamera.CanPan)
{
dpad.SigLeft.SetBoolSigAction((b) =>
{
if (b)
camera.PanLeft();
else
camera.PanStop();
});
dpad.SigRight.SetBoolSigAction((b) =>
{
if (b)
camera.PanRight();
else
camera.PanStop();
});
}
//dpad.SigCenter.SetSigFalseAction(() => camera.PositionHome());
//var homeButton = dpad.BooleanOutput["Home"];
//if (homeButton != null)
//{
// homeButton.SetSigFalseAction(() => camera.PositionHome());
//}
if (camerasCodec.SelectedCamera.CanZoom)
{
TriList.BooleanOutput[UIBoolJoin.VCCameraZoomIn].SetBoolSigAction((b) =>
{
if (b)
camera.ZoomIn();
else
camera.ZoomStop();
});
TriList.BooleanOutput[UIBoolJoin.VCCameraZoomOut].SetBoolSigAction((b) =>
{
if (b)
camera.ZoomOut();
else
camera.ZoomStop();
});
}
}
}
}
// Determines if codec is in manual camera control mode and shows feedback
void ShowCameraManualMode()
{
var inManualMode = true;
var codecOffCameras = Codec as IHasCameraOff;
var codecAutoCameras = Codec as IHasCameraAutoMode;
if (codecOffCameras != null && codecOffCameras.CameraIsOffFeedback.BoolValue)
{
inManualMode = false;
}
// Clear auto mode
if (codecAutoCameras != null )
{
if (codecAutoCameras.CameraAutoModeIsOnFeedback.BoolValue)
{
codecAutoCameras.CameraAutoModeOff();
inManualMode = true;
}
}
if (inManualMode)
{
VCCameraControlModeInterlock.SetButDontShow(UIBoolJoin.VCCameraManualVisible);
if (VCControlsInterlock.CurrentJoin == UIBoolJoin.VCCameraModeBarVisible)
VCCameraControlModeInterlock.Show();
}
SetCameraManualModeButtonFeedback(inManualMode);
}
void SetCameraManualModeButtonFeedback(bool state)
{
// Set button feedback for manual mode
TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 2 Selected"].BoolValue = state;
}
/// <summary>
///
/// </summary>
@@ -927,7 +1308,32 @@ namespace PepperDash.Essentials.UIDrivers.VC
/// </summary>
void ShowCameraControls()
{
VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCCameraVisible);
if (ShowCameraModeControls)
{
VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCCameraModeBarVisible);
if (VCCameraControlModeInterlock.CurrentJoin != 0)
{
VCCameraControlModeInterlock.Show();
}
else
{
var codecAutoCamera = Codec as IHasCameraAutoMode;
if (codecAutoCamera != null)
{
ShowCameraManualMode();
VCCameraControlModeInterlock.Show();
}
}
}
else
{
// Just show the manual camera control page
VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCCameraManualVisible);
}
StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingCameraPress);
}
@@ -960,7 +1366,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
/// </summary>
void ShowSelfViewLayout()
{
VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCSelfViewLayoutVisible);
VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCCameraAutoVisible);
StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingSelfViewLayoutPress);
}

View File

@@ -98,12 +98,12 @@
</Reference>
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
<HintPath>..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimplSharpHelperInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll</HintPath>
<HintPath>..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimplSharpNewtonsoft, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
@@ -113,7 +113,7 @@
</Reference>
<Reference Include="SimplSharpPro, Version=1.5.3.17, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe</HintPath>
<HintPath>..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimplSharpReflectionInterface, Version=1.0.5583.25238, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
@@ -158,6 +158,7 @@
<Compile Include="Bridges\JoinMaps\SetTopBoxControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\StatusSignControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\SystemMonitorJoinMap.cs" />
<Compile Include="Queues\BytesQueue.cs" />
<Compile Include="Comm and IR\CecPortController.cs" />
<Compile Include="Comm and IR\CommFactory.cs" />
<Compile Include="Comm and IR\CommunicationExtras.cs" />
@@ -222,8 +223,10 @@
<Compile Include="Fusion\FusionRviDataClasses.cs" />
<Compile Include="Gateways\CenRfgwController.cs" />
<Compile Include="Gateways\EssentialsRfGatewayConfig.cs" />
<Compile Include="Queues\GenericQueue.cs" />
<Compile Include="Global\JobTimer.cs" />
<Compile Include="Global\Scheduler.cs" />
<Compile Include="Queues\IQueue.cs" />
<Compile Include="JoinMaps\JoinMapBase.cs" />
<Compile Include="Lighting\Lighting Interfaces.cs" />
<Compile Include="Lighting\LightingBase.cs" />
@@ -313,6 +316,8 @@
<Compile Include="SmartObjects\SmartObjectDPad.cs" />
<Compile Include="SmartObjects\SmartObjectHelperBase.cs" />
<Compile Include="Routing\TieLine.cs" />
<Compile Include="Queues\StringQueue.cs" />
<Compile Include="Queues\StringResponseProcessor.cs" />
<Compile Include="Timers\CountdownTimer.cs" />
<Compile Include="Touchpanels\CrestronTouchpanelPropertiesConfig.cs" />
<Compile Include="Touchpanels\Interfaces.cs" />

View File

@@ -0,0 +1,67 @@
using System;
using PepperDash.Core;
namespace PepperDash_Essentials_Core.Queues
{
/// <summary>
/// Byte implementation of Action queue
/// </summary>
public class BytesQueue : IQueue<byte[]>
{
private readonly IQueue<byte[]> _queue;
/// <summary>
/// Constructor for BytesQueue
/// </summary>
/// <param name="key">Key</param>
/// <param name="processBytesAction">Action to process queued bytes</param>
public BytesQueue(string key, Action<byte[]> processBytesAction)
{
_queue = new GenericQueue<byte[]>(key, processBytesAction);
}
/// <summary>
/// Constructor for BytesQueue
/// </summary>
/// <param name="key">Key</param>
/// <param name="processBytesAction">Action to process queued bytes</param>
/// <param name="pacing">Delay in ms between actions being invoked</param>
public BytesQueue(string key, Action<byte[]> processBytesAction, int pacing)
{
_queue = new GenericQueue<byte[]>(key, processBytesAction, pacing);
}
/// <summary>
/// Enqueue a byte array to be processed
/// </summary>
/// <param name="item">Byte array to be processed</param>
public void Enqueue(byte[] item)
{
_queue.Enqueue(item);
}
/// <summary>
/// If the instance has been disposed
/// </summary>
public bool Disposed
{
get { return _queue.Disposed; }
}
/// <summary>
/// Key
/// </summary>
public string Key
{
get { return _queue.Key; }
}
/// <summary>
/// Disposes of resources
/// </summary>
public void Dispose()
{
_queue.Dispose();
}
}
}

View File

@@ -0,0 +1,156 @@
using System;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.CrestronThread;
using PepperDash.Core;
namespace PepperDash_Essentials_Core.Queues
{
/// <summary>
/// Threadsafe processing of queued items with pacing if required
/// </summary>
/// <typeparam name="T">Type of item to be processed</typeparam>
public class GenericQueue<T> : IQueue<T> where T : class
{
private readonly string _key;
protected readonly CrestronQueue<T> _queue;
protected readonly Thread _worker;
protected readonly CEvent _waitHandle = new CEvent();
private readonly bool _delayEnabled;
private readonly int _delayTime;
/// <summary>
/// If the instance has been disposed.
/// </summary>
public bool Disposed { get; private set; }
/// <summary>
/// Constructor for generic queue with no pacing
/// </summary>
/// <param name="key">Key</param>
/// <param name="processQueueAction">Action to process items in the queue</param>
public GenericQueue(string key, Action<T> processQueueAction)
{
_key = key;
_queue = new CrestronQueue<T>();
_worker = new Thread(ProcessQueue, processQueueAction, Thread.eThreadStartOptions.Running);
CrestronEnvironment.ProgramStatusEventHandler += programEvent =>
{
if (programEvent != eProgramStatusEventType.Stopping)
return;
Dispose();
};
}
/// <summary>
/// Constructor for generic queue with no pacing
/// </summary>
/// <param name="key">Key</param>
/// <param name="processQueueAction">Action to process items in the queue</param>
/// <param name="pacing">Pacing in ms between actions</param>
public GenericQueue(string key, Action<T> processQueueAction, int pacing)
: this(key, processQueueAction)
{
_delayEnabled = pacing > 0;
_delayTime = pacing;
}
/// <summary>
/// Thread callback
/// </summary>
/// <param name="obj">The action used to process dequeued items</param>
/// <returns>Null when the thread is exited</returns>
private object ProcessQueue(object obj)
{
var action = obj as Action<T>;
if (action == null)
throw new ArgumentNullException("obj");
while (true)
{
T item = null;
if (_queue.Count > 0)
{
item = _queue.Dequeue();
if (item == null)
break;
}
if (item != null)
{
try
{
Debug.Console(2, this, "Processing queue item: '{0}'", item.ToString());
action(item);
if (_delayEnabled)
Thread.Sleep(_delayTime);
}
catch (Exception ex)
{
Debug.ConsoleWithLog(0, this, "Caught an exception in the ComsQueue {0}\r{1}\r{2}", ex.Message, ex.InnerException, ex.StackTrace);
}
}
else _waitHandle.Wait();
}
return null;
}
/// <summary>
/// Enqueues an item and processes the queue. If 'null' is enqueued the thread will close and
/// the class must be reinstantiated.
/// </summary>
/// <param name="item">Item to be processed</param>
public virtual void Enqueue(T item)
{
_queue.Enqueue(item);
_waitHandle.Set();
}
/// <summary>
/// Disposes the thread and cleans up resources. Thread cannot be restarted once
/// disposed.
/// </summary>
public void Dispose()
{
Dispose(true);
CrestronEnvironment.GC.SuppressFinalize(this);
}
/// <summary>
/// Actually does the disposing. If you override this method, be sure to either call the base implementation
/// or clean up all the resources yourself.
/// </summary>
/// <param name="disposing">set to true unless called from finalizer</param>
protected void Dispose(bool disposing)
{
if (Disposed)
return;
if (disposing)
{
Enqueue(null);
_worker.Join();
_waitHandle.Close();
}
Disposed = true;
}
~GenericQueue()
{
Dispose(false);
}
/// <summary>
/// Key
/// </summary>
public string Key
{
get { return _key; }
}
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Core;
namespace PepperDash_Essentials_Core.Queues
{
public interface IQueue<T> : IKeyed, IDisposable where T : class
{
void Enqueue(T item);
bool Disposed { get; }
}
}

View File

@@ -0,0 +1,66 @@
using System;
namespace PepperDash_Essentials_Core.Queues
{
/// <summary>
/// String implementation of Action Queue
/// </summary>
public class StringQueue : IQueue<string>
{
private readonly IQueue<string> _queue;
/// <summary>
/// Constructor for BytesQueue
/// </summary>
/// <param name="key">Key</param>
/// <param name="processStringAction">Action to process queued strings</param>
public StringQueue(string key, Action<string> processStringAction)
{
_queue = new GenericQueue<string>(key, processStringAction);
}
/// <summary>
/// Constructor for StringQueue
/// </summary>
/// <param name="key">Key</param>
/// <param name="processStringAction">Action to process queued strings</param>
/// <param name="pacing">Delay in ms between actions being invoked</param>
public StringQueue(string key, Action<string> processStringAction, int pacing)
{
_queue = new GenericQueue<string>(key, processStringAction, pacing);
}
/// <summary>
/// Enqueue a byte array to be processed
/// </summary>
/// <param name="item">Byte array to be processed</param>
public void Enqueue(string item)
{
_queue.Enqueue(item);
}
/// <summary>
/// Key
/// </summary>
public string Key
{
get { return _queue.Key; }
}
/// <summary>
/// Disposes of resources
/// </summary>
public void Dispose()
{
_queue.Dispose();
}
/// <summary>
/// If the instance has been disposed
/// </summary>
public bool Disposed
{
get { return _queue.Disposed; }
}
}
}

View File

@@ -0,0 +1,104 @@
using System;
using Crestron.SimplSharp;
using PepperDash.Core;
namespace PepperDash_Essentials_Core.Queues
{
public sealed class StringResponseProcessor : IKeyed, IDisposable
{
private readonly IQueue<string> _queue;
private readonly IBasicCommunication _coms;
private readonly CommunicationGather _gather;
private StringResponseProcessor(string key, Action<string> processStringAction)
{
_queue = new StringQueue(key, processStringAction);
CrestronEnvironment.ProgramStatusEventHandler += programEvent =>
{
if (programEvent != eProgramStatusEventType.Stopping)
return;
Dispose();
};
}
/// <summary>
/// Constructor that builds an instance and subscribes to coms TextReceived for processing
/// </summary>
/// <param name="coms">Com port to process strings from</param>
/// <param name="processStringAction">Action to process the incoming strings</param>
public StringResponseProcessor(IBasicCommunication coms, Action<string> processStringAction)
: this(coms.Key, processStringAction)
{
_coms = coms;
coms.TextReceived += OnResponseReceived;
}
/// <summary>
/// Constructor that builds an instance and subscribes to gather Line Received for processing
/// </summary>
/// <param name="gather">Gather to process strings from</param>
/// <param name="processStringAction">Action to process the incoming strings</param>
public StringResponseProcessor(CommunicationGather gather, Action<string> processStringAction)
: this(gather.Port.Key, processStringAction)
{
_gather = gather;
gather.LineReceived += OnResponseReceived;
}
private void OnResponseReceived(object sender, GenericCommMethodReceiveTextArgs args)
{
_queue.Enqueue(args.Text);
}
/// <summary>
/// Key
/// </summary>
public string Key
{
get { return _queue.Key; }
}
/// <summary>
/// Disposes the instance and cleans up resources.
/// </summary>
public void Dispose()
{
Dispose(true);
CrestronEnvironment.GC.SuppressFinalize(this);
}
private void Dispose(bool disposing)
{
if (Disposed)
return;
if (disposing)
{
if (_coms != null)
_coms.TextReceived -= OnResponseReceived;
if (_gather != null)
{
_gather.LineReceived -= OnResponseReceived;
_gather.Stop();
}
_queue.Dispose();
}
Disposed = true;
}
/// <summary>
/// If the instance has been disposed or not. If it has, you can not use it anymore
/// </summary>
public bool Disposed { get; private set; }
~StringResponseProcessor()
{
Dispose(false);
}
}
}

View File

@@ -18,32 +18,29 @@ using PepperDash.Essentials.Core.Bridges;
namespace PepperDash.Essentials.Core
{
[Description("Wrapper class for all HR-Series remotes")]
public class Hrxx0WirelessRemoteController : EssentialsBridgeableDevice, IHasFeedback
[Description("Wrapper class for all HR-Series remotes")]
public class Hrxx0WirelessRemoteController : EssentialsBridgeableDevice, IHasFeedback, IHR52Button
{
private CenRfgwController _gateway;
private GatewayBase _gatewayBase;
private Hr1x0WirelessRemoteBase _remote;
private Hr1x0WirelessRemoteBase _remote;
public FeedbackCollection<Feedback> Feedbacks { get; set; }
public CrestronCollection<Button> Buttons { get { return _remote.Button; } }
private DeviceConfig _config;
private DeviceConfig _config;
public Hrxx0WirelessRemoteController(string key, Func<DeviceConfig, Hr1x0WirelessRemoteBase> preActivationFunc,
DeviceConfig config)
: base(key, config.Name)
{
Feedbacks = new FeedbackCollection<Feedback>();
var props = JsonConvert.DeserializeObject<CrestronRemotePropertiesConfig>(config.Properties.ToString());
var type = config.Type;
var rfId = (uint)props.Control.InfinetIdInt;
var props = JsonConvert.DeserializeObject<CrestronRemotePropertiesConfig>(config.Properties.ToString());
_config = config;
if (props.GatewayDeviceKey == "processor")
@@ -128,7 +125,20 @@ namespace PepperDash.Essentials.Core
if (handler is Action<bool>)
{
(handler as Action<bool>)(args.Button.State == eButtonState.Pressed ? true : false);
}
}
var newHandler = ButtonStateChange;
if (ButtonStateChange != null)
{
newHandler(device, args);
}
var newerHandler = EssentialsButtonStateChange;
if (EssentialsButtonStateChange != null)
{
newerHandler(this, args);
}
}
catch (Exception e)
{
@@ -312,6 +322,504 @@ namespace PepperDash.Essentials.Core
public void SetTrilistBool(BasicTriList trilist, uint join, bool b)
{
trilist.BooleanInput[join].BoolValue = b;
}
}
#region IHR52Button Members
public Button Custom9
{
get
{
var localRemote = (IHR52Button) _remote;
return localRemote == null ? null : localRemote.Custom9;
}
}
public Button Favorite
{
get
{
var localRemote = (IHR52Button)_remote;
return localRemote == null ? null : localRemote.Favorite;
}
}
public Button Home
{
get
{
var localRemote = (IHR52Button)_remote;
return localRemote == null ? null : localRemote.Home;
}
}
#endregion
#region IHR49Button Members
public Button Clear
{
get
{
var localRemote = (IHR49Button)_remote;
return localRemote == null ? null : localRemote.Clear;
}
}
public Button Custom5
{
get
{
var localRemote = (IHR49Button)_remote;
return localRemote == null ? null : localRemote.Custom5;
}
}
public Button Custom6
{
get
{
var localRemote = (IHR49Button)_remote;
return localRemote == null ? null : localRemote.Custom6;
}
}
public Button Custom7
{
get
{
var localRemote = (IHR49Button)_remote;
return localRemote == null ? null : localRemote.Custom7;
}
}
public Button Custom8
{
get
{
var localRemote = (IHR49Button)_remote;
return localRemote == null ? null : localRemote.Custom8;
}
}
public Button Enter
{
get
{
var localRemote = (IHR49Button)_remote;
return localRemote == null ? null : localRemote.Enter;
}
}
public Button Keypad0
{
get
{
var localRemote = (IHR49Button)_remote;
return localRemote == null ? null : localRemote.Keypad0;
}
}
public Button Keypad1
{
get
{
var localRemote = (IHR49Button)_remote;
return localRemote == null ? null : localRemote.Keypad1;
}
}
public Button Keypad2Abc
{
get
{
var localRemote = (IHR49Button)_remote;
return localRemote == null ? null : localRemote.Keypad2Abc;
}
}
public Button Keypad3Def
{
get
{
var localRemote = (IHR49Button)_remote;
return localRemote == null ? null : localRemote.Keypad3Def;
}
}
public Button Keypad4Ghi
{
get
{
var localRemote = (IHR49Button)_remote;
return localRemote == null ? null : localRemote.Keypad4Ghi;
}
}
public Button Keypad5Jkl
{
get
{
var localRemote = (IHR49Button)_remote;
return localRemote == null ? null : localRemote.Keypad5Jkl;
}
}
public Button Keypad6Mno
{
get
{
var localRemote = (IHR49Button)_remote;
return localRemote == null ? null : localRemote.Keypad6Mno;
}
}
public Button Keypad7Pqrs
{
get
{
var localRemote = (IHR49Button)_remote;
return localRemote == null ? null : localRemote.Keypad7Pqrs;
}
}
public Button Keypad8Tuv
{
get
{
var localRemote = (IHR49Button)_remote;
return localRemote == null ? null : localRemote.Keypad8Tuv;
}
}
public Button Keypad9Wxyz
{
get
{
var localRemote = (IHR49Button)_remote;
return localRemote == null ? null : localRemote.Keypad9Wxyz;
}
}
#endregion
#region IHR33Button Members
public Button Blue
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Blue;
}
}
public Button ChannelDown
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.ChannelDown;
}
}
public Button ChannelUp
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.ChannelUp;
}
}
public Button Custom1
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Custom1;
}
}
public Button Custom2
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Custom2;
}
}
public Button Custom3
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Custom3;
}
}
public Button Custom4
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Custom4;
}
}
public Button DialPadDown
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.DialPadDown;
}
}
public Button DialPadEnter
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.DialPadEnter;
}
}
public Button DialPadLeft
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.DialPadLeft;
}
}
public Button DialPadRight
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.DialPadRight;
}
}
public Button DialPadUp
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.DialPadUp;
}
}
public Button Dvr
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Dvr;
}
}
public Button Exit
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Exit;
}
}
public Button FastForward
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.FastForward;
}
}
public Button Green
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Green;
}
}
public Button Guide
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Blue;
}
}
public Button Information
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Information;
}
}
public Button Last
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Last;
}
}
public Button Menu
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Menu;
}
}
public Button Mute
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Mute;
}
}
public Button NextTrack
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.NextTrack;
}
}
public Button Pause
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Pause;
}
}
public Button Play
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Play;
}
}
public Button Power
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Power;
}
}
public Button PreviousTrack
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.PreviousTrack;
}
}
public Button Record
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Record;
}
}
public Button Red
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Red;
}
}
public Button Rewind
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Rewind;
}
}
public Button Stop
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Stop;
}
}
public Button VolumeDown
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.VolumeDown;
}
}
public Button VolumeUp
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.VolumeUp;
}
}
public Button Yellow
{
get
{
var localRemote = (IHR33Button)_remote;
return localRemote == null ? null : localRemote.Yellow;
}
}
#endregion
#region IButton Members
public CrestronCollection<Button> Button
{
get { return Buttons; }
}
public event ButtonEventHandler ButtonStateChange;
public delegate void EssentialsButtonEventHandler(EssentialsDevice device, ButtonEventArgs args);
public event EssentialsButtonEventHandler EssentialsButtonStateChange;
#endregion
}
}

View File

@@ -198,6 +198,7 @@ namespace PepperDash.Essentials.DM
Chassis.DMInputChange += new DMInputEventHandler(Chassis_DMInputChange);
Chassis.DMSystemChange += new DMSystemEventHandler(Chassis_DMSystemChange);
Chassis.DMOutputChange += new DMOutputEventHandler(Chassis_DMOutputChange);
Chassis.BaseEvent += ChassisOnBaseEvent;
VideoOutputFeedbacks = new Dictionary<uint, IntFeedback>();
AudioOutputFeedbacks = new Dictionary<uint, IntFeedback>();
UsbOutputRoutedToFeebacks = new Dictionary<uint, IntFeedback>();
@@ -355,6 +356,20 @@ namespace PepperDash.Essentials.DM
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support;
return (int)(inputCard.Card as Dmc4kHdBase).HdmiInput.HdcpReceiveCapability;
}
if (inputCard.Card is Dmc4kHdDspBase)
{
if (PropertiesConfig.InputSlotSupportsHdcp2[tempX])
{
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support;
return (int)(inputCard.Card as Dmc4kHdDspBase).HdmiInput.HdcpReceiveCapability;
}
InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
if ((inputCard.Card as Dmc4kHdDspBase).HdmiInput.HdcpSupportOnFeedback.BoolValue)
return 1;
return 0;
}
if (inputCard.Card is Dmc4kCBase)
{
if (PropertiesConfig.InputSlotSupportsHdcp2[tempX])
@@ -861,6 +876,24 @@ namespace PepperDash.Essentials.DM
Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks");
break;
}
case DMInputEventIds.HdcpSupportOffEventId:
{
Debug.Console(2, this, "DM Input {0} HdcpSupportOffEventId", args.Number);
if (InputCardHdcpStateFeedbacks[args.Number] != null)
InputCardHdcpStateFeedbacks[args.Number].FireUpdate();
else
Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks");
break;
}
case DMInputEventIds.HdcpSupportOnEventId:
{
Debug.Console(2, this, "DM Input {0} HdcpSupportOnEventId", args.Number);
if (InputCardHdcpStateFeedbacks[args.Number] != null)
InputCardHdcpStateFeedbacks[args.Number].FireUpdate();
else
Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks");
break;
}
default:
{
Debug.Console(2, this, "DMInputChange fired for Input {0} with Unhandled EventId: {1}", args.Number, args.EventId);
@@ -1184,8 +1217,8 @@ namespace PepperDash.Essentials.DM
var hdmiInPortWCec = port as HdmiInputWithCEC;
SetHdcpStateAction(true, hdmiInPortWCec, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist);
SetHdcpStateAction(PropertiesConfig.InputSlotSupportsHdcp2[ioSlot], hdmiInPortWCec, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist);
InputCardHdcpStateFeedbacks[ioSlot].LinkInputSig(
@@ -1474,10 +1507,12 @@ namespace PepperDash.Essentials.DM
{
if (s == 0)
{
Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to off", join, s);
port.HdcpSupportOff();
}
else if (s > 0)
{
Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to on", join, s);
port.HdcpSupportOn();
}
});
@@ -1487,6 +1522,7 @@ namespace PepperDash.Essentials.DM
trilist.SetUShortSigAction(join,
u =>
{
Debug.Console(2, this, "Join {0} value {1} Setting HdcpReceiveCapability to: {2}", join, u, (eHdcpCapabilityType)u);
port.HdcpReceiveCapability = (eHdcpCapabilityType)u;
});
}
@@ -1501,10 +1537,12 @@ namespace PepperDash.Essentials.DM
{
if (s == 0)
{
Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to off", join, s);
port.HdcpSupportOff();
}
else if (s > 0)
{
Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to on", join, s);
port.HdcpSupportOn();
}
});
@@ -1514,6 +1552,7 @@ namespace PepperDash.Essentials.DM
trilist.SetUShortSigAction(join,
u =>
{
Debug.Console(2, this, "Join {0} value {1} Setting HdcpReceiveCapability to: {2}", join, u, (eHdcpCapabilityType)u);
port.HdcpCapability = (eHdcpCapabilityType)u;
});
}

View File

@@ -68,12 +68,12 @@
</Reference>
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
<HintPath>..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimplSharpHelperInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll</HintPath>
<HintPath>..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimplSharpNewtonsoft, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
@@ -83,7 +83,7 @@
</Reference>
<Reference Include="SimplSharpPro, Version=1.5.3.17, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe</HintPath>
<HintPath>..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimplSharpReflectionInterface, Version=1.0.5583.25238, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">

View File

@@ -77,12 +77,12 @@
</Reference>
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
<HintPath>..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpCustomAttributesInterface.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimplSharpHelperInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll</HintPath>
<HintPath>..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpHelperInterface.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimplSharpNewtonsoft, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
@@ -92,7 +92,7 @@
</Reference>
<Reference Include="SimplSharpPro, Version=1.5.3.17, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe</HintPath>
<HintPath>..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SimplSharpPro.exe</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SimplSharpReflectionInterface, Version=1.0.5583.25238, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">