diff --git a/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs b/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs
index d307d088..3897afa5 100644
--- a/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs
+++ b/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs
@@ -120,14 +120,22 @@ namespace PepperDash.Essentials
/// 1206
///
public const uint VCRecentsVisible = 1206;
- ///
- /// 1207
- ///
- public const uint VCCameraVisible = 1207;
+
///
/// 1208
///
- public const uint VCSelfViewLayoutVisible = 1208;
+ public const uint VCCameraAutoVisible = 1208;
+
+ ///
+ /// 1209
+ ///
+ public const uint VCCameraManualVisible = 1209;
+
+ ///
+ /// 1210
+ ///
+ public const uint VCCameraOffVisible = 1210;
+
///
/// 1211 - 1215
///
@@ -225,6 +233,45 @@ namespace PepperDash.Essentials
///
public const uint VCMinMaxEnable = 1256;
+ ///
+ /// 1260
+ ///
+ public const uint VCCameraModeBarVisible = 1260;
+
+ ///
+ /// 1261
+ ///
+ public const uint VCCameraSelectBarWithoutModeVisible = 1261;
+
+
+ ///
+ /// 1271
+ ///
+ public const uint VCCameraZoomIn = 1271;
+ ///
+ /// 1272
+ ///
+ public const uint VCCameraZoomOut = 1272;
+
+
+ ///
+ /// 1280
+ ///
+ public const uint VCCameraPresetSavedLabelVisible = 1280;
+ ///
+ /// 1281
+ ///
+ public const uint VCCameraPreset1 = 1281;
+ ///
+ /// 1282
+ ///
+ public const uint VCCameraPreset2 = 1282;
+ ///
+ /// 1283
+ ///
+ public const uint VCCameraPreset3 = 1283;
+
+
// Letter joins start at 2921;
//******************************************************
diff --git a/PepperDashEssentials/UI/JoinConstants/UISmartObjectJoin.cs b/PepperDashEssentials/UI/JoinConstants/UISmartObjectJoin.cs
index 8da0b355..b48d78c9 100644
--- a/PepperDashEssentials/UI/JoinConstants/UISmartObjectJoin.cs
+++ b/PepperDashEssentials/UI/JoinConstants/UISmartObjectJoin.cs
@@ -33,6 +33,21 @@
///
public const uint VCLayoutsList = 1205;
+ ///
+ /// 1206 VC Camera Mode horizontal list
+ ///
+ public const uint VCCameraMode = 1206;
+
+ ///
+ /// 1207 VC Camera Mode Dpad
+ ///
+ public const uint VCCameraDpad = 1207;
+
+ ///
+ /// 1208 VC Camera Select
+ ///
+ public const uint VCCameraSelect = 1208;
+
//******************************************************
// General
diff --git a/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs b/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs
index ea60526b..9b2b8a95 100644
--- a/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs
+++ b/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs
@@ -41,6 +41,21 @@ namespace PepperDash.Essentials
public const uint VCRecentListTimeTextStart = 1231;
// RANGE IN USE
public const uint VCRecentListTimeTextEnd = 1260;
+
+
+ ///
+ /// 1281
+ ///
+ public const uint VCCameraPresetLabel1 = 1281;
+ ///
+ /// 1282
+ ///
+ public const uint VCCameraPresetLabel2 = 1282;
+ ///
+ /// 1283
+ ///
+ public const uint VCCameraPresetLabel3 = 1283;
+
///
/// 1291 - the current layout mode
///
diff --git a/PepperDashEssentials/UIDrivers/Essentials/EssentialsHeaderDriver.cs b/PepperDashEssentials/UIDrivers/Essentials/EssentialsHeaderDriver.cs
index 68d4cbcb..ccaedd9c 100644
--- a/PepperDashEssentials/UIDrivers/Essentials/EssentialsHeaderDriver.cs
+++ b/PepperDashEssentials/UIDrivers/Essentials/EssentialsHeaderDriver.cs
@@ -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;
diff --git a/PepperDashEssentials/UIDrivers/ScreenSaverController.cs b/PepperDashEssentials/UIDrivers/ScreenSaverController.cs
index 1e3f6d22..9f973113 100644
--- a/PepperDashEssentials/UIDrivers/ScreenSaverController.cs
+++ b/PepperDashEssentials/UIDrivers/ScreenSaverController.cs
@@ -18,7 +18,7 @@ namespace PepperDash.Essentials
///
/// The parent driver for this
///
- 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() { 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)
diff --git a/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs b/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs
index 55811d44..0c219426 100644
--- a/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs
+++ b/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs
@@ -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
///
JoinedSigInterlock VCControlsInterlock;
+ ///
+ /// For the camera control mode (auto/manual/off)
+ ///
+ JoinedSigInterlock VCCameraControlModeInterlock;
+
///
/// For the different staging bars: Active, inactive
///
@@ -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(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)
+ (uo as Action)(args.Sig.BoolValue);
+ else if (uo is Action)
+ (uo as Action)(args.Sig.UShortValue);
+ else if (uo is Action)
+ (uo as Action)(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);
+ }
+
+
+ }
+
+
+ ///
+ /// Shows the preset saved label for 2 seconds
+ ///
+ 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();
+ }
+
+ ///
+ /// Set the feedback for the button of the selected camera
+ ///
+ 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(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;
+
+ }
+ }
+
+ ///
+ /// Maps button actions to the selected camera
+ ///
+ 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;
+ }
+
///
///
///
@@ -927,7 +1308,32 @@ namespace PepperDash.Essentials.UIDrivers.VC
///
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
///
void ShowSelfViewLayout()
{
- VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCSelfViewLayoutVisible);
+ VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCCameraAutoVisible);
StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingSelfViewLayoutPress);
}
diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs
index 0a25dadb..1e376950 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs
+++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs
@@ -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();
AudioOutputFeedbacks = new Dictionary();
UsbOutputRoutedToFeebacks = new Dictionary();
@@ -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;
});
}