mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-09 17:54:59 +00:00
Added Huddle-vtc room; Adding hud-vtc driver; adding vc driver
This commit is contained in:
@@ -1,134 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using PepperDash.Essentials;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.SmartObjects;
|
||||
|
||||
namespace PepperDash.Essentials.UIDrivers.EssentialsCiscoSpark
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// This fella will likely need to interact with the room's source, although that is routed via the spark...
|
||||
/// Probably needs event or FB to feed AV driver - to show two-mute volume when appropriate.
|
||||
///
|
||||
/// </summary>
|
||||
public class EssentialsCiscoSparkUiDriver : PanelDriverBase
|
||||
{
|
||||
object Codec;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SubpageReferenceList CallStagingSrl;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SmartObjectDynamicList CallQuickDialList;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SubpageReferenceList DirectorySrl; // ***************** SRL ???
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// To drive UI elements outside of this driver that may be dependent on this.
|
||||
/// </summary>
|
||||
BoolFeedback InCall;
|
||||
BoolFeedback LocalPrivacyIsMuted;
|
||||
|
||||
|
||||
public EssentialsCiscoSparkUiDriver(BasicTriListWithSmartObject triList, object codec)
|
||||
: base(triList)
|
||||
{
|
||||
Codec = codec;
|
||||
SetupCallStagingSrl();
|
||||
|
||||
InCall = new BoolFeedback(() => false);
|
||||
LocalPrivacyIsMuted = new BoolFeedback(() => false);
|
||||
|
||||
CallQuickDialList = new SmartObjectDynamicList(triList.SmartObjects[UISmartObjectJoin.CallQuickDialList], true, 1);
|
||||
DirectorySrl = new SubpageReferenceList(triList, UISmartObjectJoin.DirectorySrl, 3, 3, 3);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public override void Show()
|
||||
{
|
||||
base.Show();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public override void Hide()
|
||||
{
|
||||
base.Hide();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Builds the call stage
|
||||
/// </summary>
|
||||
void SetupCallStagingSrl()
|
||||
{
|
||||
CallStagingSrl = new SubpageReferenceList(TriList, UISmartObjectJoin.CallStagingSrl, 3, 3, 3);
|
||||
var c = CallStagingSrl;
|
||||
c.AddItem(new SubpageReferenceListButtonAndModeItem(1, c, 1, b => { if (!b) { } })); //************ Camera
|
||||
c.AddItem(new SubpageReferenceListButtonAndModeItem(2, c, 2, b => { if (!b) { } })); //************ Directory
|
||||
c.AddItem(new SubpageReferenceListButtonAndModeItem(3, c, 3, b => { if (!b) { } })); //************ Keypad
|
||||
c.AddItem(new SubpageReferenceListButtonAndModeItem(4, c, 4, b => { if (!b) { } })); //************ End Call
|
||||
c.Count = 3;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
void ShowCameraControls()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ShowKeypad()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ShowDirectory()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CallHasStarted()
|
||||
{
|
||||
// Header icon
|
||||
// Add end call button to stage
|
||||
// Volume bar needs to have mic mute
|
||||
}
|
||||
|
||||
void CallHasEnded()
|
||||
{
|
||||
// Header icon
|
||||
// Remove end call
|
||||
// Volume bar no mic mute (or hidden if no source?)
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class BoolJoin
|
||||
{
|
||||
public const uint CameraControlsVisible = 3001;
|
||||
|
||||
public const uint KeypadVisbile = 3002;
|
||||
|
||||
public const uint DirectoryVisible = 3003;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class HuddleVtcPanelAvFunctionsDriver : PanelDriverBase
|
||||
public class EssentialsHuddleVtc1PanelAvFunctionsDriver : PanelDriverBase
|
||||
{
|
||||
CrestronTouchpanelPropertiesConfig Config;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public EssentialsHuddleSpaceRoom CurrentRoom
|
||||
public EssentialsHuddleVtc1Room CurrentRoom
|
||||
{
|
||||
get { return _CurrentRoom; }
|
||||
set
|
||||
@@ -51,7 +51,7 @@ namespace PepperDash.Essentials
|
||||
SetCurrentRoom(value);
|
||||
}
|
||||
}
|
||||
EssentialsHuddleSpaceRoom _CurrentRoom;
|
||||
EssentialsHuddleVtc1Room _CurrentRoom;
|
||||
|
||||
/// <summary>
|
||||
/// For hitting feedback
|
||||
@@ -84,11 +84,6 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
SubpageReferenceList ActivityFooterSrl;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SubpageReferenceList CallStagingSrl;
|
||||
|
||||
/// <summary>
|
||||
/// Tracks which audio page group the UI is in
|
||||
/// </summary>
|
||||
@@ -132,14 +127,19 @@ namespace PepperDash.Essentials
|
||||
|
||||
JoinedSigInterlock CallPagesInterlock;
|
||||
|
||||
PepperDash.Essentials.UIDrivers.VC.EssentialsCiscoSparkUiDriver VCDriver;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public HuddleVtcPanelAvFunctionsDriver(PanelDriverBase parent, CrestronTouchpanelPropertiesConfig config)
|
||||
public EssentialsHuddleVtc1PanelAvFunctionsDriver(PanelDriverBase parent, CrestronTouchpanelPropertiesConfig config)
|
||||
: base(parent.TriList)
|
||||
{
|
||||
Config = config;
|
||||
Parent = parent;
|
||||
|
||||
VCDriver = new PepperDash.Essentials.UIDrivers.VC.EssentialsCiscoSparkUiDriver(Parent.TriList, null);
|
||||
|
||||
PopupInterlock = new JoinedSigInterlock(TriList);
|
||||
StagingBarInterlock = new JoinedSigInterlock(TriList);
|
||||
CallPagesInterlock = new JoinedSigInterlock(TriList);
|
||||
@@ -150,8 +150,6 @@ namespace PepperDash.Essentials
|
||||
CallButtonSig = ActivityFooterSrl.BoolInputSig(1, 1);
|
||||
ShareButtonSig = ActivityFooterSrl.BoolInputSig(2, 1);
|
||||
|
||||
CallStagingSrl = new SubpageReferenceList(TriList, UISmartObjectJoin.CallStagingSrl, 3, 3, 3);
|
||||
|
||||
SetupActivityFooterWhenRoomOff();
|
||||
|
||||
ShowVolumeGauge = true;
|
||||
@@ -409,7 +407,6 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
void SetupEndCall()
|
||||
{
|
||||
CallStagingSrl.Count = 4;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -417,7 +414,6 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
void HideEndCall()
|
||||
{
|
||||
CallStagingSrl.Count = 3;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -425,11 +421,13 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
void ActivityCallButtonPressed()
|
||||
{
|
||||
if (VCDriver.IsVisible)
|
||||
return;
|
||||
CallButtonSig.BoolValue = true;
|
||||
TriList.SetBool(UIBoolJoin.StartPageVisible, false);
|
||||
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false);
|
||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
||||
// Call "page"? Or separate UI driver?
|
||||
VCDriver.Show();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -437,6 +435,8 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
void ActivityShareButtonPressed()
|
||||
{
|
||||
if (VCDriver.IsVisible)
|
||||
VCDriver.Hide();
|
||||
ShareButtonSig.BoolValue = true;
|
||||
TriList.SetBool(UIBoolJoin.StartPageVisible, false);
|
||||
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, true);
|
||||
@@ -644,7 +644,7 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
/// Helper for property setter. Sets the panel to the given room, latching up all functionality
|
||||
/// </summary>
|
||||
void SetCurrentRoom(EssentialsHuddleSpaceRoom room)
|
||||
void SetCurrentRoom(EssentialsHuddleVtc1Room room)
|
||||
{
|
||||
if (_CurrentRoom == room) return;
|
||||
// Disconnect current (probably never called)
|
||||
|
||||
@@ -25,9 +25,7 @@ namespace PepperDash.Essentials
|
||||
{
|
||||
if (CurrentJoin == join)
|
||||
return;
|
||||
if (CurrentJoin > 0)
|
||||
TriList.BooleanInput[CurrentJoin].BoolValue = false;
|
||||
CurrentJoin = join;
|
||||
SetButDontShow(join);
|
||||
TriList.BooleanInput[CurrentJoin].BoolValue = true;
|
||||
}
|
||||
|
||||
@@ -75,5 +73,16 @@ namespace PepperDash.Essentials
|
||||
TriList.BooleanInput[CurrentJoin].BoolValue = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Useful for pre-setting the interlock but not enabling it.
|
||||
/// </summary>
|
||||
/// <param name="join"></param>
|
||||
public void SetButDontShow(uint join)
|
||||
{
|
||||
if (CurrentJoin > 0)
|
||||
TriList.BooleanInput[CurrentJoin].BoolValue = false;
|
||||
CurrentJoin = join;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.SmartObjects;
|
||||
|
||||
namespace PepperDash.Essentials.UIDrivers.VC
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// This fella will likely need to interact with the room's source, although that is routed via the spark...
|
||||
/// Probably needs event or FB to feed AV driver - to show two-mute volume when appropriate.
|
||||
///
|
||||
/// </summary>
|
||||
public class EssentialsCiscoSparkUiDriver : PanelDriverBase
|
||||
{
|
||||
object Codec;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SmartObjectDynamicList DirectorySrl; // ***************** SRL ???
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// To drive UI elements outside of this driver that may be dependent on this.
|
||||
/// </summary>
|
||||
BoolFeedback InCall;
|
||||
BoolFeedback LocalPrivacyIsMuted;
|
||||
|
||||
/// <summary>
|
||||
/// For the subpages above the bar
|
||||
/// </summary>
|
||||
JoinedSigInterlock VCControlsInterlock;
|
||||
|
||||
/// <summary>
|
||||
/// For the different staging bars: Active, inactive
|
||||
/// </summary>
|
||||
JoinedSigInterlock StagingBarInterlock;
|
||||
|
||||
SmartObjectNumeric DialKeypad;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="triList"></param>
|
||||
/// <param name="codec"></param>
|
||||
public EssentialsCiscoSparkUiDriver(BasicTriListWithSmartObject triList, object codec)
|
||||
: base(triList)
|
||||
{
|
||||
Codec = codec;
|
||||
SetupCallStagingPopover();
|
||||
SetupDialKeypad();
|
||||
|
||||
InCall = new BoolFeedback(() => false);
|
||||
LocalPrivacyIsMuted = new BoolFeedback(() => false);
|
||||
|
||||
//DirectorySrl = new SubpageReferenceList(triList, UISmartObjectJoin.VCDirectoryList, 3, 3, 3);
|
||||
|
||||
VCControlsInterlock = new JoinedSigInterlock(triList);
|
||||
VCControlsInterlock.SetButDontShow(UIBoolJoin.VCRecentsVisible);
|
||||
StagingBarInterlock = new JoinedSigInterlock(triList);
|
||||
VCControlsInterlock.SetButDontShow(UIBoolJoin.VCStagingInactivePopoverVisible);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public override void Show()
|
||||
{
|
||||
VCControlsInterlock.Show();
|
||||
StagingBarInterlock.Show();
|
||||
base.Show();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public override void Hide()
|
||||
{
|
||||
VCControlsInterlock.Hide();
|
||||
StagingBarInterlock.Hide();
|
||||
base.Hide();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Builds the call stage
|
||||
/// </summary>
|
||||
void SetupCallStagingPopover()
|
||||
{
|
||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingDirectoryPress, ShowDirectory);
|
||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingConnectPress, () => { });
|
||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingKeypadPress, ShowKeypad);
|
||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingRecentsPress, ShowRecents);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
void SetupDialKeypad()
|
||||
{
|
||||
if(TriList.SmartObjects.Contains(UISmartObjectJoin.VCDialKeypad))
|
||||
{
|
||||
DialKeypad = new SmartObjectNumeric(TriList.SmartObjects[UISmartObjectJoin.VCDialKeypad], true);
|
||||
DialKeypad.Digit0.SetBoolSigAction(b => ___DialPlaceholder___(0));
|
||||
DialKeypad.Digit1.SetBoolSigAction(b => ___DialPlaceholder___(1));
|
||||
DialKeypad.Digit2.SetBoolSigAction(b => ___DialPlaceholder___(2));
|
||||
DialKeypad.Digit3.SetBoolSigAction(b => ___DialPlaceholder___(3));
|
||||
DialKeypad.Digit4.SetBoolSigAction(b => ___DialPlaceholder___(4));
|
||||
DialKeypad.Digit5.SetBoolSigAction(b => ___DialPlaceholder___(5));
|
||||
DialKeypad.Digit6.SetBoolSigAction(b => ___DialPlaceholder___(6));
|
||||
DialKeypad.Digit7.SetBoolSigAction(b => ___DialPlaceholder___(7));
|
||||
DialKeypad.Digit8.SetBoolSigAction(b => ___DialPlaceholder___(8));
|
||||
DialKeypad.Digit9.SetBoolSigAction(b => ___DialPlaceholder___(9));
|
||||
DialKeypad.Misc1.SetBoolSigAction(b => { });
|
||||
DialKeypad.Misc2.SetBoolSigAction(b => { });
|
||||
}
|
||||
else
|
||||
Debug.Console(0, "Trilist {0:x2}, VC dial keypad object {1} not found. Check SGD file or VTP",
|
||||
TriList.ID, UISmartObjectJoin.VCDialKeypad);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
void ShowCameraControls()
|
||||
{
|
||||
VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCCameraVisible);
|
||||
}
|
||||
|
||||
void ShowKeypad()
|
||||
{
|
||||
VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCKeypadVisible);
|
||||
}
|
||||
|
||||
void ShowDirectory()
|
||||
{
|
||||
VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCDirectoryVisible);
|
||||
}
|
||||
|
||||
void ShowRecents()
|
||||
{
|
||||
VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCRecentsVisible);
|
||||
}
|
||||
|
||||
void CallHasStarted()
|
||||
{
|
||||
|
||||
// Header icon
|
||||
// Add end call button to stage
|
||||
// Volume bar needs to have mic mute
|
||||
}
|
||||
|
||||
void CallHasEnded()
|
||||
{
|
||||
// Header icon
|
||||
// Remove end call
|
||||
// Volume bar no mic mute (or hidden if no source?)
|
||||
}
|
||||
|
||||
void ___DialPlaceholder___(int i)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class BoolJoin
|
||||
{
|
||||
public const uint CameraControlsVisible = 3001;
|
||||
|
||||
public const uint KeypadVisbile = 3002;
|
||||
|
||||
public const uint DirectoryVisible = 3003;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user