diff --git a/Essentials/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs b/Essentials/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs index af3cc065..af77fd66 100644 --- a/Essentials/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs +++ b/Essentials/PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs @@ -261,8 +261,8 @@ namespace PepperDash.Essentials /// protected override void EndShutdown() { - RunRouteAction("roomOff"); VideoCodec.EndAllCalls(); + RunRouteAction("roomOff"); } /// diff --git a/Essentials/PepperDashEssentials/UI/EssentialsTouchpanelController.cs b/Essentials/PepperDashEssentials/UI/EssentialsTouchpanelController.cs index 637dca18..7c1bd959 100644 --- a/Essentials/PepperDashEssentials/UI/EssentialsTouchpanelController.cs +++ b/Essentials/PepperDashEssentials/UI/EssentialsTouchpanelController.cs @@ -166,7 +166,7 @@ namespace PepperDash.Essentials { var tsw = Panel as TswFt5ButtonSystem; // Wire up hard keys - tsw.Power.UserObject = new Action(b => { if (!b) avDriver.PowerButtonPressed(); }); + tsw.Power.UserObject = new Action(b => { if (!b) avDriver.EndMeetingPress(); }); //tsw.Home.UserObject = new Action(b => { if (!b) HomePressed(); }); tsw.Up.UserObject = new Action(avDriver.VolumeUpPress); tsw.Down.UserObject = new Action(avDriver.VolumeDownPress); diff --git a/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs b/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs index 54b9f169..977095a5 100644 --- a/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs +++ b/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs @@ -45,6 +45,10 @@ namespace PepperDash.Essentials /// 1005 /// public const uint CallSharedSourceInfoEnable = 1005; + /// + /// 1006 + /// + public const uint CallEndAllConfirmVisible = 1006; @@ -365,7 +369,27 @@ namespace PepperDash.Essentials /// 3891 /// public const uint VolumeDefaultPress = 3891; - + /// + /// 3951 + /// + /// 3952 + /// + public const uint HeaderIcon2Press = 3952; + /// + /// 3953 + /// + public const uint HeaderIcon3Press = 3953; + /// + /// 3954 + /// + public const uint HeaderIcon4Press = 3954; + /// + /// 3955 + /// + public const uint HeaderIcon5Press = 3955; /// /// 3999 @@ -438,6 +462,10 @@ namespace PepperDash.Essentials /// 15018 The Header with dynamic buttons /// public const uint TopBarHabaneroDynamicVisible = 15018; + /// + /// 15019 Shown when system is starting and not ready for use + /// + public const uint SystemInitializingVisible = 15019; /// /// 15020 /// @@ -451,10 +479,6 @@ namespace PepperDash.Essentials /// public const uint ActivityFooterVisible = 15022; /// - /// 15023 - /// - public const uint HeaderLightsButtonVisible = 15023; - /// /// 15024 /// public const uint HeaderCallStatusLeftPositionVisible = 15024; @@ -463,17 +487,9 @@ namespace PepperDash.Essentials /// public const uint HeaderCallStatusRightPositionVisible = 15025; /// - /// 15026 - /// - public const uint HeaderLightsButtonPress = 15026; - /// [- - /// 15027 - /// - public const uint HeaderCallStatusButtonPress = 15027; - /// /// 15028 The gear button in header /// - public const uint HeaderGearButtonPress = 15028; + public const uint FIXFIX_HeaderGearButtonPress_FIXFIX = 15028; /// /// 15029 the room button in header /// @@ -553,15 +569,15 @@ namespace PepperDash.Essentials /// /// 15047 The "Join" button on the next meeting ribbon /// - public const uint NextMeetingRibbonJoinPress = 15047; + public const uint NextMeetingJoinPress = 15047; /// /// 15048 Dismisses the ribbon /// - public const uint NextMeetingRibbonClosePress = 15048; + public const uint NextMeetingModalClosePress = 15048; /// /// 15049 /// - public const uint NextMeetingRibbonVisible = 15049; + public const uint NextMeetingModalVisible = 15049; /// /// 15051 /// diff --git a/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs b/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs index 885868aa..208c732b 100644 --- a/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs +++ b/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs @@ -168,7 +168,10 @@ namespace PepperDash.Essentials /// 3916 The "active call" label /// public const uint HeaderCallStatusLabel = 3916; - + /// + /// 3919 Mesage on init page + /// + public const uint SystemInitializingMessage = 3919; /// /// 3922 /// @@ -182,6 +185,27 @@ namespace PepperDash.Essentials /// public const uint HelpPageCallButtonText = 3924; + /// + /// 3951 + /// + public const uint HeaderButtonIcon1 = 3951; + /// + /// 3952 + /// + public const uint HeaderButtonIcon2 = 3952; + /// + /// 3953 + /// + public const uint HeaderButtonIcon3 = 3953; + /// + /// 3954 + /// + public const uint HeaderButtonIcon4 = 3954; + /// + /// 3955 + /// + public const uint HeaderButtonIcon5 = 3955; + /// /// 3961 Name of source on display 1 /// @@ -202,23 +226,23 @@ namespace PepperDash.Essentials /// /// 3966 /// - public const uint NextMeetingRibbonStartText = 3966; + public const uint NextMeetingStartTimeText = 3966; /// /// 3967 /// - public const uint NextMeetingRibbonEndText = 3967; + public const uint NextMeetingEndTimeText = 3967; /// /// 3968 /// - public const uint NextMeetingRibbonTitleText = 3968; + public const uint NextMeetingTitleText = 3968; /// /// 3969 /// - public const uint NextMettingRibbonNameText = 3969; + public const uint NextMeetingNameText = 3969; /// /// 3970 /// - public const uint NextMeetingRibbonButtonLabel = 3970; + public const uint NextMeetingButtonLabel = 3970; /// /// 3971 /// @@ -227,16 +251,19 @@ namespace PepperDash.Essentials /// 3972 /// public const uint NextMeetingFollowingMeetingText = 3972; - /// - /// 3996 + /// 3976 /// - public const uint MeetingsOrContactMethodListIcon = 3996; + public const uint MeetingsOrContactMethodListIcon = 3976; + /// + /// 3977 + /// + public const uint MeetingsOrContactMethodListTitleText = 3977; - /// - /// 3997 - /// - public const uint MeetingsOrContactMethodListTitleText = 3997; - + // ------------------------------------ + // + // MODAL JOINS 3991 - 3999 + // + // ------------------------------------ } } \ No newline at end of file diff --git a/Essentials/PepperDashEssentials/UI/SmartObjectHeaderButtonList.cs b/Essentials/PepperDashEssentials/UI/SmartObjectHeaderButtonList.cs index f3f67535..f35bc88c 100644 --- a/Essentials/PepperDashEssentials/UI/SmartObjectHeaderButtonList.cs +++ b/Essentials/PepperDashEssentials/UI/SmartObjectHeaderButtonList.cs @@ -1,58 +1,58 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; +//using System; +//using System.Collections.Generic; +//using System.Linq; +//using System.Text; +//using Crestron.SimplSharp; +//using Crestron.SimplSharpPro; +//using Crestron.SimplSharpPro.DeviceSupport; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.SmartObjects; +//using PepperDash.Essentials.Core; +//using PepperDash.Essentials.Core.SmartObjects; -namespace PepperDash.Essentials -{ - public class SmartObjectHeaderButtonList : SmartObjectHelperBase - { +//namespace PepperDash.Essentials +//{ +// public class SmartObjectHeaderButtonList : SmartObjectHelperBase +// { - public SmartObjectHeaderButtonList(SmartObject so) - : base(so, true) - { +// public SmartObjectHeaderButtonList(SmartObject so) +// : base(so, true) +// { - } - } +// } +// } - public class HeaderListButton - { - public BoolInputSig SelectedSig { get; private set; } - public BoolInputSig VisibleSig { get; private set; } - public BoolOutputSig OutputSig { get; private set; } - StringInputSig IconSig; +// public class HeaderListButton +// { +// public BoolInputSig SelectedSig { get; private set; } +// public BoolInputSig VisibleSig { get; private set; } +// public BoolOutputSig OutputSig { get; private set; } +// StringInputSig IconSig; - public HeaderListButton(SmartObjectHeaderButtonList list, uint index) - { - var so = list.SmartObject; - OutputSig = so.BooleanOutput["Item " + index + " Pressed"]; - SelectedSig = so.BooleanInput["Item " + index + " Selected"]; - VisibleSig = so.BooleanInput["Item " + index + " Visible"]; - IconSig = so.StringInput["Set Item " + index + " Icon Serial"]; - } +// public HeaderListButton(SmartObjectHeaderButtonList list, uint index) +// { +// var so = list.SmartObject; +// OutputSig = so.BooleanOutput["Item " + index + " Pressed"]; +// SelectedSig = so.BooleanInput["Item " + index + " Selected"]; +// VisibleSig = so.BooleanInput["Item " + index + " Visible"]; +// IconSig = so.StringInput["Set Item " + index + " Icon Serial"]; +// } - public void SetIcon(string i) - { - IconSig.StringValue = i; - } +// public void SetIcon(string i) +// { +// IconSig.StringValue = i; +// } - public void ClearIcon() - { - IconSig.StringValue = "Blank"; - } +// public void ClearIcon() +// { +// IconSig.StringValue = "Blank"; +// } - public static string Calendar = "Calendar"; - public static string Camera = "Camera"; - public static string Gear = "Gear"; - public static string Lights = "Lights"; - public static string Help = "Help"; - public static string OnHook = "DND"; - public static string Phone = "Phone"; - } -} \ No newline at end of file +// public static string Calendar = "Calendar"; +// public static string Camera = "Camera"; +// public static string Gear = "Gear"; +// public static string Lights = "Lights"; +// public static string Help = "Help"; +// public static string OnHook = "DND"; +// public static string Phone = "Phone"; +// } +//} \ No newline at end of file diff --git a/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsHuddlePanelAvFunctionsDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsHuddlePanelAvFunctionsDriver.cs index 350c0d58..0a59adca 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsHuddlePanelAvFunctionsDriver.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsHuddlePanelAvFunctionsDriver.cs @@ -218,7 +218,7 @@ namespace PepperDash.Essentials // ShowInterlockedModal(UIBoolJoin.RoomHeaderPageVisible)); // Setup button - TriList.SetSigHeldAction(UIBoolJoin.HeaderGearButtonPress, 2000, + TriList.SetSigHeldAction(UIBoolJoin.FIXFIX_HeaderGearButtonPress_FIXFIX, 2000, () => PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.TechPanelSetupVisible));// ShowInterlockedModal(UIBoolJoin.TechPanelSetupVisible)); TriList.SetSigFalseAction(UIBoolJoin.TechExitButton, () => PopupInterlock.HideAndClear()); // HideCurrentInterlockedModal()); diff --git a/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsPresentationPanelAvFunctionsDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsPresentationPanelAvFunctionsDriver.cs index 341a2458..e7e13020 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsPresentationPanelAvFunctionsDriver.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsPresentationPanelAvFunctionsDriver.cs @@ -232,7 +232,7 @@ namespace PepperDash.Essentials TriList.SetSigFalseAction(UIBoolJoin.HeaderRoomButtonPress, () => ShowInterlockedModal(UIBoolJoin.RoomHeaderPageVisible)); - TriList.SetSigFalseAction(UIBoolJoin.HeaderGearButtonPress, () => + TriList.SetSigFalseAction(UIBoolJoin.FIXFIX_HeaderGearButtonPress_FIXFIX, () => ShowInterlockedModal(UIBoolJoin.VolumesPageVisible)); // power-related functions diff --git a/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs index 62f75105..56a64fed 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs @@ -63,8 +63,10 @@ namespace PepperDash.Essentials BoolInputSig ShareButtonSig; BoolInputSig EndMeetingButtonSig; - HeaderListButton HeaderCallButton; - HeaderListButton HeaderGearButton; + //HeaderListButton HeaderCallButton; + //HeaderListButton HeaderGearButton; + + StringInputSig HeaderCallButtonIconSig; /// @@ -99,7 +101,7 @@ namespace PepperDash.Essentials /// /// The list of buttons on the header. Managed with visibility only /// - SmartObjectHeaderButtonList HeaderButtonsList; + //SmartObjectHeaderButtonList HeaderButtonsList; /// /// The AV page mangagers that have been used, to keep them alive for later @@ -178,6 +180,16 @@ namespace PepperDash.Essentials CTimer NextMeetingTimer; + /// + /// Tracks whether the user dismissed the meeting popup, while the system was on. Always false when + /// system is off. + /// + bool NextMeetingWarningWasDismissed; + /// + /// Tracks the last meeting that was cancelled + /// + Meeting LastMeetingDismissed; + /// @@ -204,7 +216,7 @@ namespace PepperDash.Essentials // buttons are added in SetCurrentRoom - HeaderButtonsList = new SmartObjectHeaderButtonList(TriList.SmartObjects[UISmartObjectJoin.HeaderButtonList]); + //HeaderButtonsList = new SmartObjectHeaderButtonList(TriList.SmartObjects[UISmartObjectJoin.HeaderButtonList]); SetupActivityFooterWhenRoomOff(); @@ -271,11 +283,13 @@ namespace PepperDash.Essentials if (CurrentRoom.OnFeedback.BoolValue) { TriList.SetBool(UIBoolJoin.TapToBeginVisible, false); + SetupActivityFooterWhenRoomOn(); } else { TriList.SetBool(UIBoolJoin.StartPageVisible, true); TriList.SetBool(UIBoolJoin.TapToBeginVisible, true); + SetupActivityFooterWhenRoomOff(); } ShowCurrentDisplayModeSigsInUse(); @@ -288,15 +302,15 @@ namespace PepperDash.Essentials TriList.SetSigFalseAction(UIBoolJoin.VolumeDefaultPress, () => CurrentRoom.SetDefaultLevels()); TriList.SetString(UIStringJoin.AdvancedVolumeSlider1Text, "Room"); - if (TriList is CrestronApp) - TriList.BooleanInput[UIBoolJoin.GearButtonVisible].BoolValue = false; - else - TriList.BooleanInput[UIBoolJoin.GearButtonVisible].BoolValue = true; + //if (TriList is CrestronApp) + // TriList.BooleanInput[UIBoolJoin.GearButtonVisible].BoolValue = false; + //else + // TriList.BooleanInput[UIBoolJoin.GearButtonVisible].BoolValue = true; // power-related functions // Note: some of these are not directly-related to the huddle space UI, but are held over // in case - TriList.SetSigFalseAction(UIBoolJoin.ShowPowerOffPress, PowerButtonPressed); + TriList.SetSigFalseAction(UIBoolJoin.ShowPowerOffPress, EndMeetingPress); TriList.SetSigFalseAction(UIBoolJoin.DisplayPowerTogglePress, () => { @@ -304,7 +318,7 @@ namespace PepperDash.Essentials (CurrentRoom.DefaultDisplay as IPower).PowerToggle(); }); - TriList.SetSigFalseAction(UIBoolJoin.HeaderCallStatusButtonPress, ShowActiveCallsList ); + //TriList.SetSigFalseAction(UIBoolJoin.HeaderCallStatusButtonPress, ShowActiveCallsList ); SetupNextMeetingTimer(); @@ -316,6 +330,7 @@ namespace PepperDash.Essentials /// void ShowActiveCallsList() { + TriList.SetBool(UIBoolJoin.CallEndAllConfirmVisible, true); if(PopupInterlock.CurrentJoin == UIBoolJoin.HeaderActiveCallsListVisible) PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible); else @@ -407,54 +422,78 @@ namespace PepperDash.Essentials var ss = CurrentRoom.ScheduleSource; if (ss != null) { - NextMeetingTimer = new CTimer(o => - { - if (CurrentRoom.OnFeedback.BoolValue) - return; - // Every 60 seconds, check meetings list for the closest, joinable meeting - var meetings = ss.CodecSchedule.Meetings; - if (meetings.Count > 0) - { - var meeting = meetings.Aggregate((m1, m2) => m1.StartTime < m2.StartTime ? m1 : m2); - if (meeting != null && meeting.Joinable) - { - TriList.SetString(UIStringJoin.NextMeetingRibbonStartText, meeting.StartTime.ToShortTimeString()); - TriList.SetString(UIStringJoin.NextMeetingRibbonEndText, meeting.EndTime.ToShortTimeString()); - TriList.SetString(UIStringJoin.NextMeetingRibbonTitleText, meeting.Title); - TriList.SetString(UIStringJoin.NextMettingRibbonNameText, meeting.Organizer); - TriList.SetString(UIStringJoin.NextMeetingRibbonButtonLabel, "Join"); - TriList.SetSigFalseAction(UIBoolJoin.NextMeetingRibbonJoinPress, () => - { - HideNextMeetingPopup(); - RoomOnAndDialMeeting(meeting); - }); - TriList.SetString(UIStringJoin.NextMeetingSecondaryButtonLabel, "Show Schedule"); - TriList.SetSigFalseAction(UIBoolJoin.CalendarHeaderButtonPress, () => - { - HideNextMeetingPopup(); - CalendarPress(); - }); - if (meetings.Count > 1) - { - TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText, - meetings[1].StartTime.ToShortTimeString()); - } - - ShowNextMeetingPopup(); - - } - } - }, null, 0, 60000); + NextMeetingTimer = new CTimer(o => ShowNextMeetingCallback(), null, 0, 60000); } } /// /// /// - void ShowNextMeetingPopup() + void ShowNextMeetingCallback() { - TriList.SetSigFalseAction(UIBoolJoin.NextMeetingRibbonClosePress, HideNextMeetingPopup); - TriList.SetBool(UIBoolJoin.NextMeetingRibbonVisible, true); + // Every 60 seconds, check meetings list for the closest, joinable meeting + var ss = CurrentRoom.ScheduleSource; + var meetings = ss.CodecSchedule.Meetings; + Debug.Console(0, "***** Checking meetings *****"); + foreach (var m in meetings) + Debug.Console(0, "****** {0} {1} ******", m.StartTime.ToShortTimeString(), m.Joinable); + + if (meetings.Count > 0) + { + var meeting = meetings.FirstOrDefault(m => m.Joinable); + + // If the room is off pester the user + // If the room is on, and the meeting is joinable + // and the LastMeetingDismissed != this meeting + + if (CurrentRoom.OnFeedback.BoolValue + && LastMeetingDismissed == meeting) + //|| (LastMeetingDismissed != null && !LastMeetingDismissed.Joinable))) + { + Debug.Console(0, "****** Ignoring previously cancelled meeting warning ******"); + return; + } + + LastMeetingDismissed = null; + if (meeting != null) + { + Debug.Console(0, "***** First joinable meeting: {0} {1}", meeting.StartTime.ToShortTimeString(), meeting.Joinable); + TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Upcoming meeting"); + TriList.SetString(UIStringJoin.NextMeetingStartTimeText, meeting.StartTime.ToShortTimeString()); + TriList.SetString(UIStringJoin.NextMeetingEndTimeText, meeting.EndTime.ToShortTimeString()); + TriList.SetString(UIStringJoin.NextMeetingTitleText, meeting.Title); + TriList.SetString(UIStringJoin.NextMeetingNameText, meeting.Organizer); + TriList.SetString(UIStringJoin.NextMeetingButtonLabel, "Join"); + TriList.SetSigFalseAction(UIBoolJoin.NextMeetingJoinPress, () => + { + HideNextMeetingPopup(); + RoomOnAndDialMeeting(meeting); + }); + TriList.SetString(UIStringJoin.NextMeetingSecondaryButtonLabel, "Show Schedule"); + TriList.SetSigFalseAction(UIBoolJoin.CalendarHeaderButtonPress, () => + { + HideNextMeetingPopup(); + CalendarPress(); + }); + var indexOfNext = meetings.IndexOf(meeting) + 1; + + // indexOf = 3, 4 meetings : + if (indexOfNext < meetings.Count) + { + TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText, + meetings[indexOfNext].StartTime.ToShortTimeString()); + } + TriList.SetSigFalseAction(UIBoolJoin.NextMeetingModalClosePress, () => + { + // Mark the meeting to not re-harass the user + if(CurrentRoom.OnFeedback.BoolValue) + LastMeetingDismissed = meeting; + HideNextMeetingPopup(); + }); + + TriList.SetBool(UIBoolJoin.NextMeetingModalVisible, true); + } + } } /// @@ -462,7 +501,8 @@ namespace PepperDash.Essentials /// void HideNextMeetingPopup() { - TriList.SetBool(UIBoolJoin.NextMeetingRibbonVisible, false); + TriList.SetBool(UIBoolJoin.NextMeetingModalVisible, false); + } /// @@ -541,7 +581,7 @@ namespace PepperDash.Essentials ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(2, ActivityFooterSrl, 3, b => { if (!b) ActivityCallButtonPressed(); })); ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(3, ActivityFooterSrl, 4, - b => { if (!b) PowerButtonPressed(); })); + b => { if (!b) EndMeetingPress(); })); ActivityFooterSrl.Count = 3; TriList.SetUshort(UIUshortJoin.PresentationStagingCaretMode, 2); // center TriList.SetUshort(UIUshortJoin.CallStagingCaretMode, 0); // left -2 @@ -562,20 +602,18 @@ namespace PepperDash.Essentials /// /// /// - void ActivityCallButtonPressed() + public void ActivityCallButtonPressed() { if (VCDriver.IsVisible) return; HideLogo(); + HideNextMeetingPopup(); TriList.SetBool(UIBoolJoin.StartPageVisible, false); TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false); TriList.SetBool(UIBoolJoin.SelectASourceVisible, false); if (CurrentSourcePageManager != null) CurrentSourcePageManager.Hide(); - if (!CurrentRoom.OnFeedback.BoolValue) - { - CurrentRoom.RunDefaultCallRoute(); - } + PowerOnFromCall(); CurrentMode = UiDisplayMode.Call; SetActivityFooterFeedbacks(); VCDriver.Show(); @@ -588,6 +626,7 @@ namespace PepperDash.Essentials { if (VCDriver.IsVisible) VCDriver.Hide(); + HideNextMeetingPopup(); TriList.SetBool(UIBoolJoin.StartPageVisible, false); TriList.SetBool(UIBoolJoin.CallStagingBarVisible, false); TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, true); @@ -609,6 +648,17 @@ namespace PepperDash.Essentials SetActivityFooterFeedbacks(); } + /// + /// Powers up the system to the codec route, if not already on. + /// + void PowerOnFromCall() + { + if (!CurrentRoom.OnFeedback.BoolValue) + { + CurrentRoom.RunDefaultCallRoute(); + } + } + /// /// Shows all sigs that are in CurrentDisplayModeSigsInUse /// @@ -679,7 +729,7 @@ namespace PepperDash.Essentials /// /// /// - public void PowerButtonPressed() + public void EndMeetingPress() { if (!CurrentRoom.OnFeedback.BoolValue || CurrentRoom.ShutdownPromptTimer.IsRunningFeedback.BoolValue) @@ -688,6 +738,16 @@ namespace PepperDash.Essentials CurrentRoom.StartShutdown(eShutdownType.Manual); } + /// + /// Puts away modals and things that might be up when call comes in + /// + public void PrepareForCodecIncomingCall() + { + if (PowerDownModal != null && PowerDownModal.ModalIsVisible) + PowerDownModal.CancelDialog(); + PopupInterlock.Hide(); + } + /// /// /// @@ -842,7 +902,8 @@ namespace PepperDash.Essentials var config = ConfigReader.ConfigObject.SourceLists; if (config.ContainsKey(_CurrentRoom.SourceListKey)) { - var srcList = config[_CurrentRoom.SourceListKey]; + var srcList = config[_CurrentRoom.SourceListKey].OrderBy(kv => kv.Value.Order); + // Setup sources list uint i = 1; // counter for UI list foreach (var kvp in srcList) @@ -851,13 +912,6 @@ namespace PepperDash.Essentials if (!srcConfig.IncludeInSourceList) // Skip sources marked this way continue; - //var actualSource = DeviceManager.GetDeviceForKey(srcConfig.SourceKey) as Device; - //if (actualSource == null) - //{ - // Debug.Console(1, "Cannot assign missing source '{0}' to source UI list", - // srcConfig.SourceKey); - // continue; - //} var routeKey = kvp.Key; var item = new SubpageReferenceListSourceItem(i++, SourceStagingSrl, srcConfig, b => { if (!b) UiSelectSource(routeKey); }); @@ -903,10 +957,10 @@ namespace PepperDash.Essentials TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, true); var roomConf = CurrentRoom.Config; - // - HeaderGearButton = new HeaderListButton(HeaderButtonsList, 5); - HeaderGearButton.SetIcon(HeaderListButton.Gear); - HeaderGearButton.OutputSig.SetSigHeldAction(2000, + + // Gear + TriList.SetString(UIStringJoin.HeaderButtonIcon5, "Gear"); + TriList.SetSigHeldAction(UIBoolJoin.HeaderIcon5Press, 2000, ShowTech, null, () => @@ -916,10 +970,23 @@ namespace PepperDash.Essentials else PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPagePowerOffVisible); }); - TriList.SetSigFalseAction(UIBoolJoin.TechExitButton, () => PopupInterlock.HideAndClear()); + //HeaderGearButton = new HeaderListButton(HeaderButtonsList, 5); + //HeaderGearButton.SetIcon(HeaderListButton.Gear); + //HeaderGearButton.OutputSig.SetSigHeldAction(2000, + // ShowTech, + // null, + // () => + // { + // if (CurrentRoom.OnFeedback.BoolValue) + // PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPageVisible); + // else + // PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPagePowerOffVisible); + // }); + + // Help button and popup if (CurrentRoom.Config.Help != null) { @@ -938,9 +1005,8 @@ namespace PepperDash.Essentials TriList.SetString(UIStringJoin.HelpPageCallButtonText, null); TriList.ClearBoolSigAction(UIBoolJoin.HelpPageShowCallButtonPress); } - var helpButton = new HeaderListButton(HeaderButtonsList, 4); - helpButton.SetIcon(HeaderListButton.Help); - helpButton.OutputSig.SetSigFalseAction(() => + TriList.SetString(UIStringJoin.HeaderButtonIcon4, "Help"); + TriList.SetSigFalseAction(UIBoolJoin.HeaderIcon4Press, () => { string message = null; var room = DeviceManager.GetDeviceForKey(Config.DefaultRoomKey) @@ -952,7 +1018,21 @@ namespace PepperDash.Essentials //TriList.StringInput[UIStringJoin.HelpMessage].StringValue = message; PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HelpPageVisible); }); - uint nextIndex = 3; + //var helpButton = new HeaderListButton(HeaderButtonsList, 4); + //helpButton.SetIcon(HeaderListButton.Help); + //helpButton.OutputSig.SetSigFalseAction(() => + //{ + // string message = null; + // var room = DeviceManager.GetDeviceForKey(Config.DefaultRoomKey) + // as EssentialsHuddleSpaceRoom; + // if (room != null) + // message = room.Config.HelpMessage; + // else + // message = "Sorry, no help message available. No room connected."; + // //TriList.StringInput[UIStringJoin.HelpMessage].StringValue = message; + // PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HelpPageVisible); + //}); + uint nextJoin = 3953; // Lights button //if (WHATEVER MAKES LIGHTS WORK) @@ -964,36 +1044,47 @@ namespace PepperDash.Essentials // Calendar button if (_CurrentRoom.ScheduleSource != null) // ******************* Do we need a config option here as well? { - var calBut = new HeaderListButton(HeaderButtonsList, nextIndex); - calBut.SetIcon(HeaderListButton.Calendar); - calBut.OutputSig.SetSigFalseAction(CalendarPress); - nextIndex--; + //var calBut = new HeaderListButton(HeaderButtonsList, nextIndex); + //calBut.SetIcon(HeaderListButton.Calendar); + //calBut.OutputSig.SetSigFalseAction(CalendarPress); + + TriList.SetString(nextJoin, "Calendar"); + TriList.SetSigFalseAction(nextJoin, CalendarPress); + + nextJoin--; } // Call button - HeaderCallButton = new HeaderListButton(HeaderButtonsList, nextIndex); - HeaderCallButton.SetIcon(HeaderListButton.OnHook); - HeaderCallButton.OutputSig.SetSigFalseAction(ShowActiveCallsList); - - nextIndex--; + //HeaderCallButton = new HeaderListButton(HeaderButtonsList, nextJoin); + //HeaderCallButton.SetIcon(HeaderListButton.OnHook); + //HeaderCallButton.OutputSig.SetSigFalseAction(ShowActiveCallsList); + + TriList.SetString(nextJoin, "DND"); + TriList.SetSigFalseAction(nextJoin, ShowActiveCallsList); + HeaderCallButtonIconSig = TriList.StringInput[nextJoin]; + + nextJoin--; // blank any that remain - for (var i = nextIndex; i > 0; i--) + for (var i = nextJoin; i > 3950; i--) { - var blankBut = new HeaderListButton(HeaderButtonsList, i); - blankBut.ClearIcon(); - blankBut.OutputSig.SetSigFalseAction(() => { }); + //var blankBut = new HeaderListButton(HeaderButtonsList, i); + //blankBut.ClearIcon(); + //blankBut.OutputSig.SetSigFalseAction(() => { }); + + TriList.SetString(i, "Blank"); + TriList.SetSigFalseAction(i, () => { }); } // Set Call Status Subpage Position - if (nextIndex == 1) + if (nextJoin == 3951) { // Set to right position TriList.SetBool(UIBoolJoin.HeaderCallStatusLeftPositionVisible, false); TriList.SetBool(UIBoolJoin.HeaderCallStatusRightPositionVisible, true); } - else if (nextIndex == 0) + else if (nextJoin == 3950) { // Set to left position TriList.SetBool(UIBoolJoin.HeaderCallStatusLeftPositionVisible, true); @@ -1010,13 +1101,16 @@ namespace PepperDash.Essentials // Set mode of header button if (!codec.IsInCall) { - HeaderCallButton.SetIcon(HeaderListButton.OnHook); + HeaderCallButtonIconSig.StringValue = "DND"; + //HeaderCallButton.SetIcon(HeaderListButton.OnHook); } else if (codec.ActiveCalls.Any(c => c.Type == eCodecCallType.Video)) - HeaderCallButton.SetIcon(HeaderListButton.Camera); + HeaderCallButtonIconSig.StringValue = "Misc-06_Dark"; + //HeaderCallButton.SetIcon(HeaderListButton.Camera); //TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 2); else - HeaderCallButton.SetIcon(HeaderListButton.Phone); + HeaderCallButtonIconSig.StringValue = "Misc-09_Dark"; + //HeaderCallButton.SetIcon(HeaderListButton.Phone); //TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 1); // Set the call status text @@ -1056,6 +1150,7 @@ namespace PepperDash.Essentials MeetingOrContactMethodModalSrl.GetBoolFeedbackSig(i, 1).SetSigFalseAction(() => { PopupInterlock.Hide(); + ActivityCallButtonPressed(); var d = CurrentRoom.ScheduleSource as VideoCodecBase; if (d != null) RoomOnAndDialMeeting(mm); @@ -1091,12 +1186,12 @@ namespace PepperDash.Essentials var value = _CurrentRoom.OnFeedback.BoolValue; TriList.BooleanInput[UIBoolJoin.RoomIsOn].BoolValue = value; + TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = !value; + if (value) //ON { SetupActivityFooterWhenRoomOn(); TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false; - //TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = true; - TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = false; TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = true; } @@ -1108,9 +1203,10 @@ namespace PepperDash.Essentials SetupActivityFooterWhenRoomOff(); ShowLogo(); SetActivityFooterFeedbacks(); - TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = true; TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = false; TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = false; + // Clear this so that the pesky meeting warning can resurface every minute when off + LastMeetingDismissed = null; } } @@ -1338,5 +1434,13 @@ namespace PepperDash.Essentials void HideNotificationRibbon(); void ComputeHeaderCallStatus(VideoCodecBase codec); SubpageReferenceList MeetingOrContactMethodModalSrl { get; } + /// + /// Exposes the ability to switch into call mode + /// + void ActivityCallButtonPressed(); + /// + /// Allows the codec to trigger the main UI to clear up if call is coming in. + /// + void PrepareForCodecIncomingCall(); } } diff --git a/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs index c7fddf09..2f8e987a 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs @@ -33,7 +33,7 @@ namespace PepperDash.Essentials.UIDrivers.VC /// /// To drive UI elements outside of this driver that may be dependent on this. /// - BoolFeedback InCall; + //BoolFeedback InCall; BoolFeedback LocalPrivacyIsMuted; /// @@ -120,7 +120,7 @@ namespace PepperDash.Essentials.UIDrivers.VC else codec.IsReadyChange += (o, a) => Codec_IsReady(); - InCall = new BoolFeedback(() => false); + //InCall = new BoolFeedback(() => false); LocalPrivacyIsMuted = new BoolFeedback(() => false); VCControlsInterlock = new JoinedSigInterlock(triList); @@ -160,7 +160,7 @@ namespace PepperDash.Essentials.UIDrivers.VC else { Parent.Keyboard.DisableGoButton(); - return "Tap For Search Keyboard"; + return "Tap for keyboard"; } }); SearchStringFeedback.LinkInputSig(triList.StringInput[UIStringJoin.CodecDirectorySearchEntryText]); @@ -189,10 +189,6 @@ namespace PepperDash.Essentials.UIDrivers.VC CallSharingInfoTextFeedback.LinkInputSig(triList.StringInput[UIStringJoin.CallSharedSourceNameText]); TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, Codec.StopSharing); - - - - // Address and number } /// @@ -260,7 +256,8 @@ namespace PepperDash.Essentials.UIDrivers.VC DialStringTextCheckEnables(); Parent.ShowNotificationRibbon("Connected", 2000); StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress); - VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCKeypadVisible); + ShowKeypad(); + //VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCKeypadVisible); break; case eCodecCallStatus.Connecting: // fire at SRL item @@ -273,6 +270,7 @@ namespace PepperDash.Essentials.UIDrivers.VC if (!Codec.IsInCall) { KeypadMode = eKeypadMode.Dial; + // show keypad if we're in call UI mode ShowKeypad(); DialStringBuilder.Remove(0, DialStringBuilder.Length); DialStringFeedback.FireUpdate(); @@ -302,15 +300,21 @@ namespace PepperDash.Essentials.UIDrivers.VC break; } TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue = (ushort)(Codec.IsInCall ? 1 : 0); - StagingBarsInterlock.ShowInterlocked(Codec.IsInCall ? - UIBoolJoin.VCStagingActivePopoverVisible : UIBoolJoin.VCStagingInactivePopoverVisible); - + + uint stageJoin; + if (Codec.IsInCall) + stageJoin = UIBoolJoin.VCStagingActivePopoverVisible; + else + stageJoin = UIBoolJoin.VCStagingInactivePopoverVisible; + if (IsVisible) + StagingBarsInterlock.ShowInterlocked(stageJoin); + else + StagingBarsInterlock.SetButDontShow(stageJoin); Parent.ComputeHeaderCallStatus(Codec); // Update active call list UpdateHeaderActiveCallList(); - } /// @@ -344,6 +348,7 @@ namespace PepperDash.Essentials.UIDrivers.VC /// void ShowIncomingModal(CodecActiveCallItem call) { + Parent.PrepareForCodecIncomingCall(); IncomingCallModal = new ModalDialog(TriList); string msg; string icon; @@ -360,14 +365,24 @@ namespace PepperDash.Essentials.UIDrivers.VC IncomingCallModal.PresentModalDialog(2, "Incoming Call", icon, msg, "Ignore", "Accept", false, false, b => { - if (b == 1) - Codec.RejectCall(call); - else //2 - Codec.AcceptCall(call); + if (b == 1) + Codec.RejectCall(call); + else //2 + AcceptIncomingCall(call); IncomingCallModal = null; }); } + /// + /// + /// + void AcceptIncomingCall(CodecActiveCallItem call) + { + Parent.PrepareForCodecIncomingCall(); + Parent.ActivityCallButtonPressed(); + Codec.AcceptCall(call); + } + /// /// /// @@ -814,7 +829,6 @@ namespace PepperDash.Essentials.UIDrivers.VC else if (e.SpecialKey == KeyboardSpecialKey.GoButton) { ConnectPress(); - Parent.Keyboard.Hide(); } } DialStringFeedback.FireUpdate(); @@ -884,14 +898,15 @@ namespace PepperDash.Essentials.UIDrivers.VC } /// - /// shows the appropriate keypad depending on mode + /// shows the appropriate keypad depending on mode and whether visible /// void ShowKeypad() { - if(CodecHasFavorites) - VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCKeypadWithFavoritesVisible); + uint join = Codec.IsInCall ? UIBoolJoin.VCKeypadVisible : UIBoolJoin.VCKeypadWithFavoritesVisible; + if (IsVisible) + VCControlsInterlock.ShowInterlocked(join); else - VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCKeypadVisible); + VCControlsInterlock.SetButDontShow(join); StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress); } @@ -919,6 +934,8 @@ namespace PepperDash.Essentials.UIDrivers.VC /// void ConnectPress() { + if (Parent.Keyboard != null) + Parent.Keyboard.Hide(); Codec.Dial(DialStringBuilder.ToString()); } @@ -941,6 +958,7 @@ namespace PepperDash.Essentials.UIDrivers.VC DialStringFeedback.FireUpdate(); // no delete key in this mode! } + DialStringTextCheckEnables(); } /// @@ -1096,7 +1114,7 @@ namespace PepperDash.Essentials.UIDrivers.VC { if (DialStringBuilder.Length == 0 && !Codec.IsInCall) { - return "Dial or Tap to Show Keyboard"; + return "Tap for keyboard"; } if(Regex.Match(ds, @"^\d{4,7}$").Success) // 456-7890 return string.Format("{0}-{1}", ds.Substring(0, 3), ds.Substring(3)); diff --git a/Release Package/PepperDashEssentials.cpz b/Release Package/PepperDashEssentials.cpz index 05677172..0d1bf0b3 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 068ec36e..6fb4054d 100644 Binary files a/Release Package/PepperDashEssentials.dll and b/Release Package/PepperDashEssentials.dll differ