diff --git a/Essentials/PepperDashEssentials/PepperDashEssentials.csproj b/Essentials/PepperDashEssentials/PepperDashEssentials.csproj index bad7c445..cafe9b6b 100644 --- a/Essentials/PepperDashEssentials/PepperDashEssentials.csproj +++ b/Essentials/PepperDashEssentials/PepperDashEssentials.csproj @@ -165,7 +165,7 @@ - + diff --git a/Essentials/PepperDashEssentials/Room/Config/EssentialsHuddleVtc1PropertiesConfig.cs b/Essentials/PepperDashEssentials/Room/Config/EssentialsHuddleVtc1PropertiesConfig.cs index 9e41285b..25093c1a 100644 --- a/Essentials/PepperDashEssentials/Room/Config/EssentialsHuddleVtc1PropertiesConfig.cs +++ b/Essentials/PepperDashEssentials/Room/Config/EssentialsHuddleVtc1PropertiesConfig.cs @@ -7,7 +7,7 @@ using Crestron.SimplSharp; namespace PepperDash.Essentials.Room.Config { - public class EssentialsHuddleVtc1PropertiesConfig + public class EssentialsHuddleVtc1PropertiesConfig : EssentialsRoomPropertiesConfig { diff --git a/Essentials/PepperDashEssentials/UI/EssentialsTouchpanelController.cs b/Essentials/PepperDashEssentials/UI/EssentialsTouchpanelController.cs index 8ad6ab1a..6398a2c5 100644 --- a/Essentials/PepperDashEssentials/UI/EssentialsTouchpanelController.cs +++ b/Essentials/PepperDashEssentials/UI/EssentialsTouchpanelController.cs @@ -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(b => { if (!b) avDriver.PowerButtonPressed(); }); + //tsw.Home.UserObject = new Action(b => { if (!b) HomePressed(); }); + tsw.Up.UserObject = new Action(avDriver.VolumeUpPress); + tsw.Down.UserObject = new Action(avDriver.VolumeDownPress); + tsw.ButtonStateChange += new ButtonEventHandler(Tsw_ButtonStateChange); + } + } else { Debug.Console(0, this, "ERROR: Cannot load AvFunctionsDriver for room '{0}'", props.DefaultRoomKey); diff --git a/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs b/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs index a74df0f0..f226f95d 100644 --- a/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs +++ b/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs @@ -51,19 +51,19 @@ namespace PepperDash.Essentials /// /// 1021 /// - public const uint ACSpeedDial1Press = 1021; + public const uint ACSpeedDial1Visible = 1021; /// /// 1022 /// - public const uint ACSpeedDial2Press = 1022; + public const uint ACSpeedDial2Visible = 1022; /// /// 1023 /// - public const uint ACSpeedDial3Press = 1023; + public const uint ACSpeedDial3Visible = 1023; /// /// 1024 /// - public const uint ACSpeedDial4Press = 1024; + public const uint ACSpeedDial4Visible = 1024; //****************************************************** // Video Conference @@ -84,6 +84,14 @@ namespace PepperDash.Essentials /// public const uint VCDirectoryVisible = 1205; /// + /// 1206 + /// + public const uint VCRecentsVisible = 1206; + /// + /// 1207 + /// + public const uint VCCameraVisible = 1207; + /// /// 1211 /// public const uint VCSpeedDial1Press = 1211; @@ -102,19 +110,19 @@ namespace PepperDash.Essentials /// /// 1221 /// - public const uint VCSpeedDial1Press = 1221; + public const uint VCSpeedDial1Visible = 1221; /// /// 1222 /// - public const uint VCSpeedDial2Press = 1222; + public const uint VCSpeedDial2Visible = 1222; /// /// 1223 /// - public const uint VCSpeedDial3Press = 1223; + public const uint VCSpeedDial3Visible = 1223; /// /// 1224 /// - public const uint VCSpeedDial4Press = 1224; + public const uint VCSpeedDial4Visible = 1224; /// /// 1231 /// diff --git a/Essentials/PepperDashEssentials/UI/JoinConstants/UISmartObjectJoin.cs b/Essentials/PepperDashEssentials/UI/JoinConstants/UISmartObjectJoin.cs index cb7cd96d..3fdd58be 100644 --- a/Essentials/PepperDashEssentials/UI/JoinConstants/UISmartObjectJoin.cs +++ b/Essentials/PepperDashEssentials/UI/JoinConstants/UISmartObjectJoin.cs @@ -10,6 +10,8 @@ /// public const uint VCDialKeypad = 1201; + public const uint VCDirectoryList = 1202; + //****************************************************** // General @@ -21,18 +23,6 @@ /// 15022 The main activity footer /// public const uint ActivityFooterSRL = 15022; - /// - /// 15045 - /// - public const uint CallStagingSrl = 15045; - /// - /// 3002 - /// - public const uint CallQuickDialList = 15046; - /// - /// 3003 - /// - public const uint DirectorySrl = 15047; } } \ No newline at end of file diff --git a/Essentials/PepperDashEssentials/UIDrivers/EssentialsCiscoSpark/EssentialsCiscoSparkUiDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/EssentialsCiscoSpark/EssentialsCiscoSparkUiDriver.cs deleted file mode 100644 index 2fd93da2..00000000 --- a/Essentials/PepperDashEssentials/UIDrivers/EssentialsCiscoSpark/EssentialsCiscoSparkUiDriver.cs +++ /dev/null @@ -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 -{ - - /// - /// 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. - /// - /// - public class EssentialsCiscoSparkUiDriver : PanelDriverBase - { - object Codec; - - /// - /// - /// - SubpageReferenceList CallStagingSrl; - - /// - /// - /// - SmartObjectDynamicList CallQuickDialList; - - /// - /// - /// - SubpageReferenceList DirectorySrl; // ***************** SRL ??? - - - /// - /// To drive UI elements outside of this driver that may be dependent on this. - /// - 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); - } - - /// - /// - /// - public override void Show() - { - base.Show(); - } - - /// - /// - /// - public override void Hide() - { - base.Hide(); - } - - /// - /// Builds the call stage - /// - 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; - } - - /// - /// - /// - 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; - - - } - } -} \ No newline at end of file diff --git a/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/HuddleVTCPanelAvFunctionsDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/HuddleVTCPanelAvFunctionsDriver.cs index df3fcb0d..893d21e0 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/HuddleVTCPanelAvFunctionsDriver.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/HuddleVTCPanelAvFunctionsDriver.cs @@ -15,7 +15,7 @@ namespace PepperDash.Essentials /// /// /// - public class HuddleVtcPanelAvFunctionsDriver : PanelDriverBase + public class EssentialsHuddleVtc1PanelAvFunctionsDriver : PanelDriverBase { CrestronTouchpanelPropertiesConfig Config; @@ -43,7 +43,7 @@ namespace PepperDash.Essentials /// /// /// - public EssentialsHuddleSpaceRoom CurrentRoom + public EssentialsHuddleVtc1Room CurrentRoom { get { return _CurrentRoom; } set @@ -51,7 +51,7 @@ namespace PepperDash.Essentials SetCurrentRoom(value); } } - EssentialsHuddleSpaceRoom _CurrentRoom; + EssentialsHuddleVtc1Room _CurrentRoom; /// /// For hitting feedback @@ -84,11 +84,6 @@ namespace PepperDash.Essentials /// SubpageReferenceList ActivityFooterSrl; - /// - /// - /// - SubpageReferenceList CallStagingSrl; - /// /// Tracks which audio page group the UI is in /// @@ -132,14 +127,19 @@ namespace PepperDash.Essentials JoinedSigInterlock CallPagesInterlock; + PepperDash.Essentials.UIDrivers.VC.EssentialsCiscoSparkUiDriver VCDriver; + /// /// Constructor /// - 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 /// void SetupEndCall() { - CallStagingSrl.Count = 4; } /// @@ -417,7 +414,6 @@ namespace PepperDash.Essentials /// void HideEndCall() { - CallStagingSrl.Count = 3; } /// @@ -425,11 +421,13 @@ namespace PepperDash.Essentials /// 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(); } /// @@ -437,6 +435,8 @@ namespace PepperDash.Essentials /// 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 /// /// Helper for property setter. Sets the panel to the given room, latching up all functionality /// - void SetCurrentRoom(EssentialsHuddleSpaceRoom room) + void SetCurrentRoom(EssentialsHuddleVtc1Room room) { if (_CurrentRoom == room) return; // Disconnect current (probably never called) diff --git a/Essentials/PepperDashEssentials/UIDrivers/JoinedSigInterlock.cs b/Essentials/PepperDashEssentials/UIDrivers/JoinedSigInterlock.cs index 184ba5c1..c383c7d3 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/JoinedSigInterlock.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/JoinedSigInterlock.cs @@ -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; } + /// + /// Useful for pre-setting the interlock but not enabling it. + /// + /// + public void SetButDontShow(uint join) + { + if (CurrentJoin > 0) + TriList.BooleanInput[CurrentJoin].BoolValue = false; + CurrentJoin = join; + } + } } \ No newline at end of file diff --git a/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsCiscoSparkUiDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsCiscoSparkUiDriver.cs new file mode 100644 index 00000000..5d80ef2a --- /dev/null +++ b/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsCiscoSparkUiDriver.cs @@ -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 +{ + + /// + /// 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. + /// + /// + public class EssentialsCiscoSparkUiDriver : PanelDriverBase + { + object Codec; + + /// + /// + /// + SmartObjectDynamicList DirectorySrl; // ***************** SRL ??? + + + /// + /// To drive UI elements outside of this driver that may be dependent on this. + /// + BoolFeedback InCall; + BoolFeedback LocalPrivacyIsMuted; + + /// + /// For the subpages above the bar + /// + JoinedSigInterlock VCControlsInterlock; + + /// + /// For the different staging bars: Active, inactive + /// + JoinedSigInterlock StagingBarInterlock; + + SmartObjectNumeric DialKeypad; + + /// + /// + /// + /// + /// + 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); + } + + /// + /// + /// + public override void Show() + { + VCControlsInterlock.Show(); + StagingBarInterlock.Show(); + base.Show(); + } + + /// + /// + /// + public override void Hide() + { + VCControlsInterlock.Hide(); + StagingBarInterlock.Hide(); + base.Hide(); + } + + /// + /// Builds the call stage + /// + void SetupCallStagingPopover() + { + TriList.SetSigFalseAction(UIBoolJoin.VCStagingDirectoryPress, ShowDirectory); + TriList.SetSigFalseAction(UIBoolJoin.VCStagingConnectPress, () => { }); + TriList.SetSigFalseAction(UIBoolJoin.VCStagingKeypadPress, ShowKeypad); + TriList.SetSigFalseAction(UIBoolJoin.VCStagingRecentsPress, ShowRecents); + } + + /// + /// + /// + 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); + } + + /// + /// + /// + 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; + + + } + } +} \ No newline at end of file diff --git a/Release Package/PepperDashEssentials.cpz b/Release Package/PepperDashEssentials.cpz index 70657419..cea06cac 100644 Binary files a/Release Package/PepperDashEssentials.cpz and b/Release Package/PepperDashEssentials.cpz differ diff --git a/Release Package/PepperDashEssentials.dll b/Release Package/PepperDashEssentials.dll index 572de6e3..5d699ab8 100644 Binary files a/Release Package/PepperDashEssentials.dll and b/Release Package/PepperDashEssentials.dll differ