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..1e5c5f46 100644 --- a/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs +++ b/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs @@ -557,11 +557,11 @@ namespace PepperDash.Essentials /// /// 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/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs index 62f75105..f839db8e 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs @@ -296,7 +296,7 @@ namespace PepperDash.Essentials // 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, () => { @@ -453,8 +453,8 @@ namespace PepperDash.Essentials /// void ShowNextMeetingPopup() { - TriList.SetSigFalseAction(UIBoolJoin.NextMeetingRibbonClosePress, HideNextMeetingPopup); - TriList.SetBool(UIBoolJoin.NextMeetingRibbonVisible, true); + TriList.SetSigFalseAction(UIBoolJoin.NextMeetingModalClosePress, HideNextMeetingPopup); + TriList.SetBool(UIBoolJoin.NextMeetingModalVisible, true); } /// @@ -462,7 +462,7 @@ namespace PepperDash.Essentials /// void HideNextMeetingPopup() { - TriList.SetBool(UIBoolJoin.NextMeetingRibbonVisible, false); + TriList.SetBool(UIBoolJoin.NextMeetingModalVisible, false); } /// @@ -541,7 +541,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 +562,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 +586,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 +608,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 +689,7 @@ namespace PepperDash.Essentials /// /// /// - public void PowerButtonPressed() + public void EndMeetingPress() { if (!CurrentRoom.OnFeedback.BoolValue || CurrentRoom.ShutdownPromptTimer.IsRunningFeedback.BoolValue) @@ -688,6 +698,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 +862,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 +872,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); }); @@ -1091,12 +1105,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,7 +1122,6 @@ namespace PepperDash.Essentials SetupActivityFooterWhenRoomOff(); ShowLogo(); SetActivityFooterFeedbacks(); - TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = true; TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = false; TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = false; } @@ -1338,5 +1351,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 1205c24a..839250ff 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs @@ -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,23 @@ 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.ActivityCallButtonPressed(); + Codec.AcceptCall(call); + } + /// /// /// @@ -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 = CodecHasFavorites ? UIBoolJoin.VCKeypadWithFavoritesVisible : UIBoolJoin.VCKeypadVisible; + if (IsVisible) + VCControlsInterlock.ShowInterlocked(join); else - VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCKeypadVisible); + VCControlsInterlock.SetButDontShow(join); StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress); } diff --git a/Release Package/PepperDashEssentials.cpz b/Release Package/PepperDashEssentials.cpz index 05677172..0271d5eb 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..5e402da8 100644 Binary files a/Release Package/PepperDashEssentials.dll and b/Release Package/PepperDashEssentials.dll differ