From 0bb107f5ef771e03f36023f76c493ad30a25e735 Mon Sep 17 00:00:00 2001 From: Heath Volmer Date: Fri, 4 Oct 2019 09:30:53 -0600 Subject: [PATCH] ecs-1162: Messaging changes for Weil --- .../Messengers/Ddvc01VtcMessenger.cs | 25 +++++++++++ .../RoomBridges/CotijaDdvc01RoomBridge.cs | 42 ++++++++++++++++--- PepperDashEssentials/AppServer/Volumes.cs | 3 ++ .../Properties/AssemblyInfo.cs | 2 +- 4 files changed, 65 insertions(+), 7 deletions(-) diff --git a/PepperDashEssentials/AppServer/Messengers/Ddvc01VtcMessenger.cs b/PepperDashEssentials/AppServer/Messengers/Ddvc01VtcMessenger.cs index b05bc93b..7fb53f96 100644 --- a/PepperDashEssentials/AppServer/Messengers/Ddvc01VtcMessenger.cs +++ b/PepperDashEssentials/AppServer/Messengers/Ddvc01VtcMessenger.cs @@ -132,6 +132,14 @@ namespace PepperDash.Essentials.AppServer.Messengers /// 842 /// const uint BCameraLayout = 842; + /// + /// 843 + /// + const uint BCameraSupportsAutoMode = 843; + /// + /// 844 + /// + const uint BCameraSupportsOffMode = 844; /********* Ushorts *********/ @@ -294,6 +302,21 @@ namespace PepperDash.Essentials.AppServer.Messengers PostCallsList(); }); + EISC.SetBoolSigAction(BCameraSupportsAutoMode, b => + { + PostStatusMessage(new + { + cameraSupportsAutoMode = b + }); + }); + EISC.SetBoolSigAction(BCameraSupportsOffMode, b => + { + PostStatusMessage(new + { + cameraSupportsOffMode = b + }); + }); + // Directory insanity EISC.SetUShortSigAction(UDirectoryRowCount, u => { @@ -455,6 +478,8 @@ namespace PepperDash.Essentials.AppServer.Messengers calls = GetCurrentCallList(), cameraMode = GetCameraMode(), cameraSelfView = EISC.GetBool(BCameraSelfView), + cameraSupportsAutoMode = EISC.GetBool(BCameraSupportsAutoMode), + cameraSupportsOffMode = EISC.GetBool(BCameraSupportsOffMode), currentCallString = EISC.GetString(SCurrentCallNumber), currentDialString = EISC.GetString(SCurrentDialString), directoryContactSelected = new diff --git a/PepperDashEssentials/AppServer/RoomBridges/CotijaDdvc01RoomBridge.cs b/PepperDashEssentials/AppServer/RoomBridges/CotijaDdvc01RoomBridge.cs index 1720778c..0ff3c80c 100644 --- a/PepperDashEssentials/AppServer/RoomBridges/CotijaDdvc01RoomBridge.cs +++ b/PepperDashEssentials/AppServer/RoomBridges/CotijaDdvc01RoomBridge.cs @@ -81,6 +81,7 @@ namespace PepperDash.Essentials.Room.Cotija /// 72 /// public const uint SourceHasChanged = 71; + /// /// 261 - The start of the range of speed dial visibles /// @@ -98,9 +99,17 @@ namespace PepperDash.Essentials.Room.Cotija /// public const uint ShowCameraWhenNotInCall = 503; /// + /// 504 + /// + public const uint UseSourceEnabled = 504; + /// /// 601 /// - public const uint SourceShareDisableStartJoin = 601; + public const uint SourceShareDisableJoinStart = 601; + /// + /// 621 + /// + public const uint SourceIsEnabledJoinStart = 621; } @@ -121,7 +130,7 @@ namespace PepperDash.Essentials.Room.Cotija /// /// 101 /// - public const uint VolumeSliderCount = 101; + public const uint NumberOfAuxFaders = 101; } public class StringJoin @@ -344,6 +353,10 @@ namespace PepperDash.Essentials.Room.Cotija EISC.PulseBool(BoolJoin.MasterVolumeIsMuted))); Parent.AddAction(@"/room/room1/volumes/master/privacyMuteToggle", new Action(() => EISC.PulseBool(BoolJoin.PrivacyMute))); + + + // /xyzxyz/volumes/master/muteToggle ---> BoolInput[1] + for (uint i = 2; i <= 7; i++) { var index = i; @@ -410,6 +423,10 @@ namespace PepperDash.Essentials.Room.Cotija } } })); + + // map MasterVolumeIsMuted join -> status/volumes/master/muted + // + EISC.SetBoolSigAction(BoolJoin.MasterVolumeIsMuted, b => PostStatusMessage(new { @@ -464,6 +481,12 @@ namespace PepperDash.Essentials.Room.Cotija }); } + EISC.SetUShortSigAction(UshortJoin.NumberOfAuxFaders, u => + PostStatusMessage(new { + volumes = new { + numberOfAuxFaders = u, + } + })); // shutdown things EISC.SetSigTrueAction(BoolJoin.ShutdownCancel, new Action(() => @@ -558,7 +581,7 @@ namespace PepperDash.Essentials.Room.Cotija rmProps.VideoCodecKey = "videoCodec"; // volume control names - var volCount = EISC.UShortOutput[UshortJoin.VolumeSliderCount].UShortValue; + var volCount = EISC.UShortOutput[UshortJoin.NumberOfAuxFaders].UShortValue; //// use Volumes object or? //rmProps.VolumeSliderNames = new List(); @@ -604,12 +627,17 @@ namespace PepperDash.Essentials.Room.Cotija for (uint i = 0; i <= 19; i++) { var name = EISC.StringOutput[StringJoin.SourceNameJoinStart + i].StringValue; - if(string.IsNullOrEmpty(name)) + if (EISC.BooleanOutput[BoolJoin.UseSourceEnabled].BoolValue + && !EISC.BooleanOutput[BoolJoin.SourceIsEnabledJoinStart + i].BoolValue) + { + continue; + } + else if(!EISC.BooleanOutput[BoolJoin.UseSourceEnabled].BoolValue && string.IsNullOrEmpty(name)) break; var icon = EISC.StringOutput[StringJoin.SourceIconJoinStart + i].StringValue; var key = EISC.StringOutput[StringJoin.SourceKeyJoinStart + i].StringValue; var type = EISC.StringOutput[StringJoin.SourceTypeJoinStart + i].StringValue; - var disableShare = EISC.BooleanOutput[BoolJoin.SourceShareDisableStartJoin + i].BoolValue; + var disableShare = EISC.BooleanOutput[BoolJoin.SourceShareDisableJoinStart + i].BoolValue; Debug.Console(0, this, "Adding source {0} '{1}'", key, name); var newSLI = new SourceListItem{ @@ -745,7 +773,7 @@ namespace PepperDash.Essentials.Room.Cotija { if (ConfigIsLoaded) { - var count = EISC.UShortOutput[101].UShortValue; + var count = EISC.UShortOutput[UshortJoin.NumberOfAuxFaders].UShortValue; Debug.Console(1, this, "The Fader Count is : {0}", count); @@ -776,6 +804,7 @@ namespace PepperDash.Essentials.Room.Cotija volumes.Master.PrivacyMuted = EISC.BooleanOutput[BoolJoin.PrivacyMute].BoolValue; volumes.AuxFaders = auxFaderDict; + volumes.NumberOfAuxFaders = EISC.UShortInput[UshortJoin.NumberOfAuxFaders].UShortValue; PostStatusMessage(new { @@ -862,6 +891,7 @@ namespace PepperDash.Essentials.Room.Cotija var d = new Dictionary(StringComparer.OrdinalIgnoreCase) { { "laptop", "pc" }, + { "pc", "pc" }, { "wireless", "genericsource" }, { "iptv", "settopbox" } diff --git a/PepperDashEssentials/AppServer/Volumes.cs b/PepperDashEssentials/AppServer/Volumes.cs index cf22181a..5806f117 100644 --- a/PepperDashEssentials/AppServer/Volumes.cs +++ b/PepperDashEssentials/AppServer/Volumes.cs @@ -16,6 +16,9 @@ namespace PepperDash.Essentials.Room.Cotija [JsonProperty("auxFaders")] public Dictionary AuxFaders { get; set; } + [JsonProperty("numberOfAuxFaders")] + public int NumberOfAuxFaders { get; set; } + public Volumes() { AuxFaders = new Dictionary(); diff --git a/PepperDashEssentials/Properties/AssemblyInfo.cs b/PepperDashEssentials/Properties/AssemblyInfo.cs index 83beada4..015ff45a 100644 --- a/PepperDashEssentials/Properties/AssemblyInfo.cs +++ b/PepperDashEssentials/Properties/AssemblyInfo.cs @@ -4,5 +4,5 @@ [assembly: AssemblyCompany("PepperDash Technology Corp")] [assembly: AssemblyProduct("PepperDashEssentials")] [assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2018")] -[assembly: AssemblyVersion("1.4.0.*")] +[assembly: AssemblyVersion("1.4.444.*")]