mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-16 14:05:03 +00:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e6b98894d | ||
|
|
25faa7e702 | ||
|
|
c6dab1fe9a | ||
|
|
c9178aef76 | ||
|
|
aa8b349711 | ||
|
|
ff6e898091 | ||
|
|
c43503eb27 | ||
|
|
f10ac6da06 | ||
|
|
e90b9fe5e3 | ||
|
|
da73365c2f | ||
|
|
3f9253a550 | ||
|
|
0ed316eaa4 | ||
|
|
5f80e12faf | ||
|
|
64d92fdfce | ||
|
|
6c400c80a2 | ||
|
|
9846d87a40 | ||
|
|
e952f3d775 | ||
|
|
436db82006 | ||
|
|
5938869e7a | ||
|
|
4bad8585e5 |
@@ -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;
|
||||
|
||||
//******************************************************
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user