Added Huddle-vtc room; Adding hud-vtc driver; adding vc driver

This commit is contained in:
Heath Volmer
2017-09-11 19:57:03 -06:00
parent b81c667e5f
commit 682c21f37c
11 changed files with 265 additions and 175 deletions

View File

@@ -165,7 +165,7 @@
<Compile Include="FOR REFERENCE UI\PageControllers\LargeTouchpanelControllerBase.cs" />
<Compile Include="FOR REFERENCE UI\Panels\SmartGraphicsTouchpanelControllerBase.cs" />
<Compile Include="UI\SubpageReferenceListCallStagingItem.cs" />
<Compile Include="UIDrivers\EssentialsCiscoSpark\EssentialsCiscoSparkUiDriver.cs" />
<Compile Include="UIDrivers\VC\EssentialsCiscoSparkUiDriver.cs" />
<Compile Include="UIDrivers\JoinedSigInterlock.cs" />
<Compile Include="UIDrivers\EssentialsHuddleVTC\HuddleVTCPanelAvFunctionsDriver.cs" />
<Compile Include="UIDrivers\VolumeAndSourceChangeArgs.cs" />

View File

@@ -7,7 +7,7 @@ using Crestron.SimplSharp;
namespace PepperDash.Essentials.Room.Config
{
public class EssentialsHuddleVtc1PropertiesConfig
public class EssentialsHuddleVtc1PropertiesConfig : EssentialsRoomPropertiesConfig
{

View File

@@ -38,7 +38,7 @@ namespace PepperDash.Essentials
{
AddPostActivationAction(() =>
{
Debug.Console(0, this, "post-activation linking");
Debug.Console(0, this, "Creating hardware...");
type = type.ToLower();
try
{
@@ -48,12 +48,24 @@ namespace PepperDash.Essentials
app.ParameterProjectName.Value = props.ProjectName;
Panel = app;
}
else if (type == "tsw550")
Panel = new Tsw550(id, Global.ControlSystem);
else if (type == "tsw552")
Panel = new Tsw552(id, Global.ControlSystem);
else if (type == "tsw560")
Panel = new Tsw560(id, Global.ControlSystem);
else if (type == "tsw750")
Panel = new Tsw750(id, Global.ControlSystem);
else if (type == "tsw752")
Panel = new Tsw752(id, Global.ControlSystem);
else if (type == "tsw760")
Panel = new Tsw760(id, Global.ControlSystem);
else if (type == "tsw1050")
Panel = new Tsw1050(id, Global.ControlSystem);
else if (type == "tsw1052")
Panel = new Tsw1052(id, Global.ControlSystem);
else if (type == "tsw1060")
Panel = new Tsw1060(id, Global.ControlSystem);
else
{
Debug.Console(0, this, "WARNING: Cannot create TSW controller with type '{0}'", type);
@@ -138,6 +150,26 @@ namespace PepperDash.Essentials
tsw.ButtonStateChange += new ButtonEventHandler(Tsw_ButtonStateChange);
}
}
else if (room is EssentialsHuddleVtc1Room)
{
Debug.Console(0, this, "Adding huddle space driver");
var avDriver = new EssentialsHuddleVtc1PanelAvFunctionsDriver(mainDriver, props);
avDriver.CurrentRoom = room as EssentialsHuddleVtc1Room;
avDriver.DefaultRoomKey = props.DefaultRoomKey;
mainDriver.AvDriver = avDriver;
LoadAndShowDriver(mainDriver); // This is a little convoluted.
if (Panel is TswFt5ButtonSystem)
{
var tsw = Panel as TswFt5ButtonSystem;
// Wire up hard keys
tsw.Power.UserObject = new Action<bool>(b => { if (!b) avDriver.PowerButtonPressed(); });
//tsw.Home.UserObject = new Action<bool>(b => { if (!b) HomePressed(); });
tsw.Up.UserObject = new Action<bool>(avDriver.VolumeUpPress);
tsw.Down.UserObject = new Action<bool>(avDriver.VolumeDownPress);
tsw.ButtonStateChange += new ButtonEventHandler(Tsw_ButtonStateChange);
}
}
else
{
Debug.Console(0, this, "ERROR: Cannot load AvFunctionsDriver for room '{0}'", props.DefaultRoomKey);

View File

@@ -51,19 +51,19 @@ namespace PepperDash.Essentials
/// <summary>
/// 1021
/// </summary>
public const uint ACSpeedDial1Press = 1021;
public const uint ACSpeedDial1Visible = 1021;
/// <summary>
/// 1022
/// </summary>
public const uint ACSpeedDial2Press = 1022;
public const uint ACSpeedDial2Visible = 1022;
/// <summary>
/// 1023
/// </summary>
public const uint ACSpeedDial3Press = 1023;
public const uint ACSpeedDial3Visible = 1023;
/// <summary>
/// 1024
/// </summary>
public const uint ACSpeedDial4Press = 1024;
public const uint ACSpeedDial4Visible = 1024;
//******************************************************
// Video Conference
@@ -84,6 +84,14 @@ namespace PepperDash.Essentials
/// </summary>
public const uint VCDirectoryVisible = 1205;
/// <summary>
/// 1206
/// </summary>
public const uint VCRecentsVisible = 1206;
/// <summary>
/// 1207
/// </summary>
public const uint VCCameraVisible = 1207;
/// <summary>
/// 1211
/// </summary>
public const uint VCSpeedDial1Press = 1211;
@@ -102,19 +110,19 @@ namespace PepperDash.Essentials
/// <summary>
/// 1221
/// </summary>
public const uint VCSpeedDial1Press = 1221;
public const uint VCSpeedDial1Visible = 1221;
/// <summary>
/// 1222
/// </summary>
public const uint VCSpeedDial2Press = 1222;
public const uint VCSpeedDial2Visible = 1222;
/// <summary>
/// 1223
/// </summary>
public const uint VCSpeedDial3Press = 1223;
public const uint VCSpeedDial3Visible = 1223;
/// <summary>
/// 1224
/// </summary>
public const uint VCSpeedDial4Press = 1224;
public const uint VCSpeedDial4Visible = 1224;
/// <summary>
/// 1231
/// </summary>

View File

@@ -10,6 +10,8 @@
/// </summary>
public const uint VCDialKeypad = 1201;
public const uint VCDirectoryList = 1202;
//******************************************************
// General
@@ -21,18 +23,6 @@
/// 15022 The main activity footer
/// </summary>
public const uint ActivityFooterSRL = 15022;
/// <summary>
/// 15045
/// </summary>
public const uint CallStagingSrl = 15045;
/// <summary>
/// 3002
/// </summary>
public const uint CallQuickDialList = 15046;
/// <summary>
/// 3003
/// </summary>
public const uint DirectorySrl = 15047;
}
}

View File

@@ -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;
}
}
}

View File

@@ -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)

View File

@@ -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;
}
}
}

View File

@@ -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;
}
}
}