From 3d7fb1a804bcb94b2e8764fc138f4c21fb23dc07 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Tue, 24 Oct 2017 14:55:15 -0600 Subject: [PATCH] resolves ecs-611 and all other known bugs from onsite testing at NYU --- .../VideoCodec/CiscoCodec/CiscoSparkCodec.cs | 8 +-- .../VideoCodec/VideoCodecBase.cs | 5 +- .../EssentialsHuddleVtc1FusionController.cs | 11 ++-- .../UI/JoinConstants/UIBoolJoin.cs | 36 +++--------- .../UI/JoinConstants/UIStringlJoin.cs | 28 ++-------- ...entialsHuddleVtc1PanelAvFunctionsDriver.cs | 3 +- .../VC/EssentialsVideoCodecUiDriver.cs | 55 ++++++++++++------- 7 files changed, 61 insertions(+), 85 deletions(-) diff --git a/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs b/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs index b9ae0161..cdc57f29 100644 --- a/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs +++ b/Essentials Devices Common/Essentials Devices Common/VideoCodec/CiscoCodec/CiscoSparkCodec.cs @@ -885,7 +885,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco private void GetPhonebookContacts() { // Get Phonebook Folders (determine local/corporate from config, and set results limit) - SendText(string.Format("xCommand Phonebook Search PhonebookType: {0} ContactType: Contact", PhonebookMode)); + SendText(string.Format("xCommand Phonebook Search PhonebookType: {0} ContactType: Contact Limit: {1}", PhonebookMode, PhonebookResultsLimit)); } /// @@ -991,7 +991,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco } } - public void SelectPresentationByConnector(int source) + public void SelectPresentationSource(int source) { PresentationSource = source; @@ -1003,7 +1003,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco /// public void SelectPresentationSource1() { - SelectPresentationByConnector(2); + SelectPresentationSource(2); } /// @@ -1011,7 +1011,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco /// public void SelectPresentationSource2() { - SelectPresentationByConnector(3); + SelectPresentationSource(3); } /// diff --git a/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs b/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs index 33eec760..ea75691d 100644 --- a/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs +++ b/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs @@ -115,8 +115,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec OnCallStatusChange(call); - if (AutoShareContentWhileInCall) - StartSharing(); } /// @@ -130,6 +128,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec var handler = CallStatusChange; if (handler != null) handler(this, new CodecCallStatusItemChangeEventArgs(item)); + + if (AutoShareContentWhileInCall) + StartSharing(); } /// diff --git a/Essentials/PepperDashEssentials/OTHER/Fusion/EssentialsHuddleVtc1FusionController.cs b/Essentials/PepperDashEssentials/OTHER/Fusion/EssentialsHuddleVtc1FusionController.cs index f1c90c84..ac72c76f 100644 --- a/Essentials/PepperDashEssentials/OTHER/Fusion/EssentialsHuddleVtc1FusionController.cs +++ b/Essentials/PepperDashEssentials/OTHER/Fusion/EssentialsHuddleVtc1FusionController.cs @@ -58,9 +58,13 @@ namespace PepperDash.Essentials.Fusion var codecPowerOnAction = new Action(b => { if (!b) codec.StandbyDeactivate(); }); var codecPowerOffAction = new Action(b => { if (!b) codec.StandbyActivate(); }); - // Map FusionRoom Attributes: + // Codec volume + var codecVolume = FusionRoom.CreateOffsetUshortSig(50, "Volume - Fader01", eSigIoMask.InputOutputSig); + codecVolume.OutputSig.UserObject = new Action(b => (codec as IBasicVolumeWithFeedback).SetVolume(b)); + (codec as IBasicVolumeWithFeedback).VolumeLevelFeedback.LinkInputSig(codecVolume.InputSig); + // In Call Status CodecIsInCall = FusionRoom.CreateOffsetBoolSig(69, "Conf - VC 1 In Call", eSigIoMask.InputSigOnly); codec.CallStatusChange += new EventHandler(codec_CallStatusChange); @@ -331,11 +335,6 @@ namespace PepperDash.Essentials.Fusion if (display == (Room as EssentialsHuddleVtc1Room).DefaultDisplay) { - // Display volume - var defaultDisplayVolume = FusionRoom.CreateOffsetUshortSig(50, "Volume - Fader01", eSigIoMask.InputOutputSig); - defaultDisplayVolume.OutputSig.UserObject = new Action(b => (display as IBasicVolumeWithFeedback).SetVolume(b)); - (display as IBasicVolumeWithFeedback).VolumeLevelFeedback.LinkInputSig(defaultDisplayVolume.InputSig); - // Power on var defaultDisplayPowerOn = FusionRoom.CreateOffsetBoolSig((uint)joinOffset, displayName + "Power On", eSigIoMask.InputOutputSig); defaultDisplayPowerOn.OutputSig.UserObject = new Action(b => { if (!b) display.PowerOn(); }); diff --git a/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs b/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs index 8dc56709..696f14f7 100644 --- a/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs +++ b/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs @@ -129,37 +129,17 @@ namespace PepperDash.Essentials /// public const uint VCSelfViewLayoutVisible = 1208; /// - /// 1211 + /// 1211 - 1215 /// - public const uint VCFavorite1Press = 1211; + public const uint VCFavoritePressStart = 1211; + // RANGE IN USE + public const uint VCFavoritePressEnd = 1215; /// - /// 1212 + /// 1221 - 1225 /// - public const uint VCFavorite2Press = 1212; - /// - /// 1213 - /// - public const uint VCFavorite3Press = 1213; - /// - /// 1214 - /// - public const uint VCFavorite4Press = 1214; - /// - /// 1221 - /// - public const uint VCFavorite1Visible = 1221; - /// - /// 1222 - /// - public const uint VCFavorite2Visible = 1222; - /// - /// 1223 - /// - public const uint VCFavorite3Visible = 1223; - /// - /// 1224 - /// - public const uint VCFavorite4Visible = 1224; + public const uint VCFavoriteVisibleStart = 1221; + // RANGE IN USE + public const uint VCFavoriteVisibleEnd = 1225; /// /// 1231 /// diff --git a/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs b/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs index 208c732b..69d3dea4 100644 --- a/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs +++ b/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs @@ -51,32 +51,14 @@ namespace PepperDash.Essentials /// public const uint VCDirectoryListTextStart = 1301; // RANGE IN USE - public const uint VCDirectoryListTextEnd = 1400; + public const uint VCDirectoryListTextEnd = 1556; /// - /// 141112 + /// 1611 - 1615 /// - public const uint VCFavorites1Text = 1411; - - /// - /// 1412 - /// - public const uint VCFavorites2Text = 1412; - - /// - /// 1413 - /// - public const uint VCFavorites3Text = 1413; - - /// - /// 1414 - /// - public const uint VCFavorites4Text = 1414; - - /// - /// 1415 - /// - public const uint VCFavorites5Text = 1415; + public const uint VCFavoritesStart = 1611; + // RANGE IN USE + public const uint VCFavoritesTextEnd = 1615; //****************************************************** diff --git a/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs index 3213a8fb..bed77c66 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs @@ -1327,7 +1327,7 @@ namespace PepperDash.Essentials { var routeInfo = CurrentRoom.CurrentSourceInfo; // This will show off popup too - if (this.IsVisible) + if (this.IsVisible && !VCDriver.IsVisible) ShowCurrentSource(); if (routeInfo == null)// || !CurrentRoom.OnFeedback.BoolValue) @@ -1454,6 +1454,7 @@ namespace PepperDash.Essentials { PepperDash.Essentials.Core.Touchpanels.Keyboards.HabaneroKeyboardController Keyboard { get; } JoinedSigInterlock PopupInterlock { get; } + EssentialsHuddleVtc1Room CurrentRoom { get; } void ShowNotificationRibbon(string message, int timeout); void HideNotificationRibbon(); void ComputeHeaderCallStatus(VideoCodecBase codec); diff --git a/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs index 413410c1..e1fd1d4f 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs @@ -194,7 +194,7 @@ namespace PepperDash.Essentials.UIDrivers.VC /// void Codec_IsReady() { - TriList.SetString(UIStringJoin.RoomPhoneText, GetFormattedDialString(Codec.CodecInfo.PhoneNumber)); + TriList.SetString(UIStringJoin.RoomPhoneText, GetFormattedPhoneNumber(Codec.CodecInfo.PhoneNumber)); TriList.SetString(UIStringJoin.RoomSipText, Codec.CodecInfo.SipUri); if(Parent.HeaderButtonsAreSetUp) @@ -221,6 +221,7 @@ namespace PepperDash.Essentials.UIDrivers.VC Parent.ShowNotificationRibbon("Connected", 2000); StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress); ShowKeypad(); + (Parent.CurrentRoom.CurrentVolumeControls as IBasicVolumeWithFeedback).MuteOff(); //VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCKeypadVisible); break; case eCodecCallStatus.Connecting: @@ -498,15 +499,15 @@ namespace PepperDash.Essentials.UIDrivers.VC if (i < favs.Count) { var fav = favs[(int)i]; - TriList.SetString(1411 + i, fav.Name); - TriList.SetBool(1221 + i, true); - TriList.SetSigFalseAction(1211 + i, () => + TriList.SetString(UIStringJoin.VCFavoritesStart + i, fav.Name); + TriList.SetBool(UIBoolJoin.VCFavoriteVisibleStart + i, true); + TriList.SetSigFalseAction(UIBoolJoin.VCFavoritePressStart + i, () => { Codec.Dial(fav.Number); }); } else - TriList.SetBool(1221 + i, false); + TriList.SetBool(UIBoolJoin.VCFavoriteVisibleStart + i, false); } } } @@ -1073,7 +1074,7 @@ namespace PepperDash.Essentials.UIDrivers.VC /// - /// + /// Returns the text value for the keypad dial entry field /// /// string GetFormattedDialString(string ds) @@ -1082,21 +1083,33 @@ namespace PepperDash.Essentials.UIDrivers.VC { 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)); - if (Regex.Match(ds, @"^9\d{4,7}$").Success) // 456-7890 - return string.Format("9 {0}-{1}", ds.Substring(1, 3), ds.Substring(4)); - if (Regex.Match(ds, @"^\d{8,10}$").Success) // 123-456-78 - return string.Format("({0}) {1}-{2}", ds.Substring(0, 3), ds.Substring(3, 3), ds.Substring(6)); - if (Regex.Match(ds, @"^\d{10}$").Success) // 123-456-7890 full - return string.Format("({0}) {1}-{2}", ds.Substring(0, 3), ds.Substring(3, 3), ds.Substring(6)); - if (Regex.Match(ds, @"^1\d{10}$").Success) - return string.Format("+1 ({0}) {1}-{2}", ds.Substring(1, 3), ds.Substring(4, 3), ds.Substring(7)); - if (Regex.Match(ds, @"^9\d{10}$").Success) - return string.Format("9 ({0}) {1}-{2}", ds.Substring(1, 3), ds.Substring(4, 3), ds.Substring(7)); - if (Regex.Match(ds, @"^91\d{10}$").Success) - return string.Format("9 +1 ({0}) {1}-{2}", ds.Substring(2, 3), ds.Substring(5, 3), ds.Substring(8)); - return ds; + + return GetFormattedPhoneNumber(ds); + + } + + /// + /// Formats a string of numbers as a North American phone number + /// + /// + /// + string GetFormattedPhoneNumber(string s) + { + if (Regex.Match(s, @"^\d{4,7}$").Success) // 456-7890 + return string.Format("{0}-{1}", s.Substring(0, 3), s.Substring(3)); + if (Regex.Match(s, @"^9\d{4,7}$").Success) // 456-7890 + return string.Format("9 {0}-{1}", s.Substring(1, 3), s.Substring(4)); + if (Regex.Match(s, @"^\d{8,10}$").Success) // 123-456-78 + return string.Format("({0}) {1}-{2}", s.Substring(0, 3), s.Substring(3, 3), s.Substring(6)); + if (Regex.Match(s, @"^\d{10}$").Success) // 123-456-7890 full + return string.Format("({0}) {1}-{2}", s.Substring(0, 3), s.Substring(3, 3), s.Substring(6)); + if (Regex.Match(s, @"^1\d{10}$").Success) + return string.Format("+1 ({0}) {1}-{2}", s.Substring(1, 3), s.Substring(4, 3), s.Substring(7)); + if (Regex.Match(s, @"^9\d{10}$").Success) + return string.Format("9 ({0}) {1}-{2}", s.Substring(1, 3), s.Substring(4, 3), s.Substring(7)); + if (Regex.Match(s, @"^91\d{10}$").Success) + return string.Format("9 +1 ({0}) {1}-{2}", s.Substring(2, 3), s.Substring(5, 3), s.Substring(8)); + return s; } enum eKeypadMode