diff --git a/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/GenericVersiportInputDevice.cs b/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/GenericVersiportInputDevice.cs index 7a0c3a26..749957b9 100644 --- a/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/GenericVersiportInputDevice.cs +++ b/Essentials Core/PepperDashEssentialsBase/Crestron IO/Inputs/GenericVersiportInputDevice.cs @@ -30,17 +30,14 @@ namespace PepperDash.Essentials.Core.CrestronIO base(key) { InputStateFeedback = new BoolFeedback(InputStateFeedbackFunc); - InputPort = inputPort; - - InputPort.SetVersiportConfiguration(eVersiportConfiguration.DigitalInput); - + InputPort.SetVersiportConfiguration(eVersiportConfiguration.DigitalInput); InputPort.VersiportChange += new VersiportEventHandler(InputPort_VersiportChange); - } void InputPort_VersiportChange(Versiport port, VersiportEventArgs args) { + Debug.Console(1, this, "Versiport change: {0}", args.Event); InputStateFeedback.FireUpdate(); } } diff --git a/Essentials Devices Common/Essentials Devices Common/Factory/DeviceFactory.cs b/Essentials Devices Common/Essentials Devices Common/Factory/DeviceFactory.cs index 7b14b797..0463c4cb 100644 --- a/Essentials Devices Common/Essentials Devices Common/Factory/DeviceFactory.cs +++ b/Essentials Devices Common/Essentials Devices Common/Factory/DeviceFactory.cs @@ -119,41 +119,41 @@ namespace PepperDash.Essentials.Devices.Common return new PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.CiscoSparkCodec(key, name, comm, props); } - else if (typeName == "versiportinput") - { - var props = JsonConvert.DeserializeObject(properties.ToString()); + //else if (typeName == "versiportinput") + //{ + // var props = JsonConvert.DeserializeObject(properties.ToString()); - IIOPorts portDevice; + // IIOPorts portDevice; - if (props.PortDeviceKey == "processor") - portDevice = Global.ControlSystem as IIOPorts; - else - portDevice = DeviceManager.GetDeviceForKey(props.PortDeviceKey) as IIOPorts; + // if (props.PortDeviceKey == "processor") + // portDevice = Global.ControlSystem as IIOPorts; + // else + // portDevice = DeviceManager.GetDeviceForKey(props.PortDeviceKey) as IIOPorts; - if(portDevice == null) - Debug.Console(0, "Unable to add versiport device with key '{0}'. Port Device does not support versiports", key); - else - { - var cs = (portDevice as CrestronControlSystem); + // if(portDevice == null) + // Debug.Console(0, "Unable to add versiport device with key '{0}'. Port Device does not support versiports", key); + // else + // { + // var cs = (portDevice as CrestronControlSystem); - if (cs != null) - if (cs.SupportsVersiport && props.PortNumber <= cs.NumberOfVersiPorts) - { - Versiport versiport = cs.VersiPorts[props.PortNumber]; + // if (cs != null) + // if (cs.SupportsVersiport && props.PortNumber <= cs.NumberOfVersiPorts) + // { + // Versiport versiport = cs.VersiPorts[props.PortNumber]; - if(!versiport.Registered) - { - if (versiport.Register() == eDeviceRegistrationUnRegistrationResponse.Success) - return new GenericVersiportInputDevice(key, versiport); - else - Debug.Console(0, "Attempt to register versiport {0} on device with key '{1}' failed.", props.PortNumber, props.PortDeviceKey); - } - } + // if(!versiport.Registered) + // { + // if (versiport.Register() == eDeviceRegistrationUnRegistrationResponse.Success) + // return new GenericVersiportInputDevice(key, versiport); + // else + // Debug.Console(0, "Attempt to register versiport {0} on device with key '{1}' failed.", props.PortNumber, props.PortDeviceKey); + // } + // } - // Future: Check if portDevice is 3-series card or other non control system that supports versiports + // // Future: Check if portDevice is 3-series card or other non control system that supports versiports - } - } + // } + //} else if (typeName == "digitalinput") { @@ -210,14 +210,15 @@ namespace PepperDash.Essentials.Devices.Common if (!vp.Registered) { - if (vp.Register() == eDeviceRegistrationUnRegistrationResponse.Success) + var regSuccess = vp.Register(); + if (regSuccess == eDeviceRegistrationUnRegistrationResponse.Success) { return new GenericVersiportInputDevice(key, vp); } else { - Debug.Console(0, "WARNING: Attempt to register versiport {0} on device with key '{1}' failed.", - props.PortNumber, props.PortDeviceKey); + Debug.Console(0, "WARNING: Attempt to register versiport {0} on device with key '{1}' failed: {2}", + props.PortNumber, props.PortDeviceKey, regSuccess); return null; } } diff --git a/Essentials Devices Common/Essentials Devices Common/MIcrophone/MicrophonePrivacyController.cs b/Essentials Devices Common/Essentials Devices Common/MIcrophone/MicrophonePrivacyController.cs index 79e4faa2..81e37246 100644 --- a/Essentials Devices Common/Essentials Devices Common/MIcrophone/MicrophonePrivacyController.cs +++ b/Essentials Devices Common/Essentials Devices Common/MIcrophone/MicrophonePrivacyController.cs @@ -103,6 +103,7 @@ namespace PepperDash.Essentials.Devices.Common.Microphones void PrivacyModeIsOnFeedback_OutputChange(object sender, EventArgs e) { + Debug.Console(1, this, "Privacy mode change: {0}", sender as BoolFeedback); CheckPrivacyMode(); } @@ -160,7 +161,7 @@ namespace PepperDash.Essentials.Devices.Common.Microphones /// /// Toggles the state of the privacy mute /// - void TogglePrivacyMute() + public void TogglePrivacyMute() { PrivacyDevice.PrivacyModeToggle(); } diff --git a/Essentials/PepperDashEssentials/Properties/AssemblyInfo.cs b/Essentials/PepperDashEssentials/Properties/AssemblyInfo.cs index 4c7a52f9..29efb49a 100644 --- a/Essentials/PepperDashEssentials/Properties/AssemblyInfo.cs +++ b/Essentials/PepperDashEssentials/Properties/AssemblyInfo.cs @@ -4,5 +4,5 @@ [assembly: AssemblyCompany("PepperDash Technology Corp")] [assembly: AssemblyProduct("PepperDashEssentials")] [assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2017")] -[assembly: AssemblyVersion("1.0.23.*")] +[assembly: AssemblyVersion("1.0.27.*")] diff --git a/Essentials/PepperDashEssentials/Room/Config/EssentialsRoomConfig.cs b/Essentials/PepperDashEssentials/Room/Config/EssentialsRoomConfig.cs index f665bcbd..cce57191 100644 --- a/Essentials/PepperDashEssentials/Room/Config/EssentialsRoomConfig.cs +++ b/Essentials/PepperDashEssentials/Room/Config/EssentialsRoomConfig.cs @@ -101,59 +101,69 @@ namespace PepperDash.Essentials.Room.Config return null; } - PepperDash.Essentials.Devices.Common.Microphones.MicrophonePrivacyController GetMicrophonePrivacy(EssentialsRoomPropertiesConfig props, EssentialsHuddleVtc1Room room) - { - var microphonePrivacy = props.MicrophonePrivacy; - if (microphonePrivacy != null) - { - // Get the MicrophonePrivacy device from the device manager - var mP = (DeviceManager.GetDeviceForKey(props.MicrophonePrivacy.DeviceKey) as PepperDash.Essentials.Devices.Common.Microphones.MicrophonePrivacyController); - // Set this room as the IPrivacy device - if (mP != null) - { - mP.SetPrivacyDevice(room); + /// + /// + /// + /// + /// + /// + PepperDash.Essentials.Devices.Common.Microphones.MicrophonePrivacyController GetMicrophonePrivacy( + EssentialsRoomPropertiesConfig props, EssentialsHuddleVtc1Room room) + { + var microphonePrivacy = props.MicrophonePrivacy; + if (microphonePrivacy == null) + { + Debug.Console(0, "ERROR: Cannot create microphone privacy with null properties"); + return null; + } + // Get the MicrophonePrivacy device from the device manager + var mP = (DeviceManager.GetDeviceForKey(props.MicrophonePrivacy.DeviceKey) as + PepperDash.Essentials.Devices.Common.Microphones.MicrophonePrivacyController); + // Set this room as the IPrivacy device + if (mP == null) + { + Debug.Console(0, "ERROR: Selected device {0} is not MicrophonePrivacyController", props.MicrophonePrivacy.DeviceKey); + return null; + } + mP.SetPrivacyDevice(room); - var behaviour = props.MicrophonePrivacy.Behaviour.ToLower(); + var behaviour = props.MicrophonePrivacy.Behaviour.ToLower(); - if (behaviour != null) - { - if (behaviour == "trackroomstate") - { - // Tie LED enable to room power state - room.OnFeedback.OutputChange += (o, a) => - { - if (room.OnFeedback.BoolValue) - mP.EnableLeds = true; - else - mP.EnableLeds = false; - }; + if (behaviour == null) + { + Debug.Console(0, "WARNING: No behaviour defined for MicrophonePrivacyController"); + return null; + } + if (behaviour == "trackroomstate") + { + // Tie LED enable to room power state + room.OnFeedback.OutputChange += (o, a) => + { + if (room.OnFeedback.BoolValue) + mP.EnableLeds = true; + else + mP.EnableLeds = false; + }; - mP.EnableLeds = room.OnFeedback.BoolValue; - } - else if (behaviour == "trackcallstate") - { - // Tie LED enable to room power state - room.InCallFeedback.OutputChange += (o, a) => - { - if (room.InCallFeedback.BoolValue) - mP.EnableLeds = true; - else - mP.EnableLeds = false; - }; - - mP.EnableLeds = room.InCallFeedback.BoolValue; - } - } - else - Debug.Console(0, "No behaviour defined for MicrophonePrivacyController"); - - return mP; - } - } - return null; - } + mP.EnableLeds = room.OnFeedback.BoolValue; + } + else if (behaviour == "trackcallstate") + { + // Tie LED enable to room power state + room.InCallFeedback.OutputChange += (o, a) => + { + if (room.InCallFeedback.BoolValue) + mP.EnableLeds = true; + else + mP.EnableLeds = false; + }; + mP.EnableLeds = room.InCallFeedback.BoolValue; + } + return mP; + } + } /// diff --git a/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs index d5fc382d..f59401ef 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs @@ -202,8 +202,11 @@ namespace PepperDash.Essentials.UIDrivers.VC else // If only one value present, just show the phone number roomNumberSipUri = Codec.CodecInfo.SipPhoneNumber; - if(string.IsNullOrEmpty(roomNumberSipUri)) - roomNumberSipUri = string.Format("{0} | {1}", GetFormattedPhoneNumber(Codec.CodecInfo.E164Alias), Codec.CodecInfo.H323Id); + if (string.IsNullOrEmpty(roomNumberSipUri)) + { + var phone = Codec.CodecInfo.E164Alias.Length < 7 ? Codec.CodecInfo.E164Alias : GetFormattedPhoneNumber(Codec.CodecInfo.E164Alias); + roomNumberSipUri = string.Format("{0} | {1}", phone, Codec.CodecInfo.H323Id); + } TriList.SetString(UIStringJoin.RoomPhoneText, roomNumberSipUri); diff --git a/Release Package/PepperDashEssentials.cpz b/Release Package/PepperDashEssentials.cpz index ceffc266..15ae7090 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 6a81378d..e46a1f78 100644 Binary files a/Release Package/PepperDashEssentials.dll and b/Release Package/PepperDashEssentials.dll differ