Merge branch 'development' into feature/room-combining

This commit is contained in:
Neil Dorin
2021-07-30 16:59:52 -06:00
10 changed files with 105 additions and 27 deletions

View File

@@ -7,6 +7,9 @@ assignees: ''
--- ---
**Was this bug identified in a specific build version?**
Please note the build version where this bug was identified
**Describe the bug** **Describe the bug**
A clear and concise description of what the bug is. A clear and concise description of what the bug is.

View File

@@ -89,6 +89,16 @@ namespace PepperDash.Essentials
Panel = new Tsw1052(id, Global.ControlSystem); Panel = new Tsw1052(id, Global.ControlSystem);
else if (type == "tsw1060") else if (type == "tsw1060")
Panel = new Tsw1060(id, Global.ControlSystem); Panel = new Tsw1060(id, Global.ControlSystem);
else if (type == "tsw570")
Panel = new Tsw570(id, Global.ControlSystem);
else if (type == "tsw770")
Panel = new Tsw770(id, Global.ControlSystem);
else if (type == "ts770")
Panel = new Ts770(id, Global.ControlSystem);
else if (type == "tsw1070")
Panel = new Tsw1070(id, Global.ControlSystem);
else if (type == "ts1070")
Panel = new Ts1070(id, Global.ControlSystem);
else else
{ {
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "WARNING: Cannot create TSW controller with type '{0}'", type); Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "WARNING: Cannot create TSW controller with type '{0}'", type);
@@ -396,7 +406,7 @@ namespace PepperDash.Essentials
{ {
public EssentialsTouchpanelControllerFactory() public EssentialsTouchpanelControllerFactory()
{ {
TypeNames = new List<string>() { "tsw550", "tsw750", "tsw1050", "tsw560", "tsw760", "tsw1060", "xpanel" }; TypeNames = new List<string>() { "tsw550", "tsw750", "tsw1050", "tsw560", "tsw760", "tsw1060", "tsw570", "tsw770", "ts770", "tsw1070", "ts1070", "xpanel" };
} }
public override EssentialsDevice BuildDevice(DeviceConfig dc) public override EssentialsDevice BuildDevice(DeviceConfig dc)

View File

@@ -207,6 +207,7 @@ namespace PepperDash.Essentials
//TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 1); //TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 1);
// Set the call status text // Set the call status text
Debug.Console(1, "Active Call Count: {0}", codec.ActiveCalls.Count);
if (codec.ActiveCalls.Count > 0) if (codec.ActiveCalls.Count > 0)
{ {
if (codec.ActiveCalls.Count == 1) if (codec.ActiveCalls.Count == 1)

View File

@@ -1035,7 +1035,7 @@ namespace PepperDash.Essentials
if (CurrentRoom.CurrentSourceInfo != null && CurrentRoom.CurrentSourceInfo.DisableCodecSharing) if (CurrentRoom.CurrentSourceInfo != null && CurrentRoom.CurrentSourceInfo.DisableCodecSharing)
{ {
Debug.Console(1, CurrentRoom, "Transitioning to in-call, cancelling non-sharable source"); Debug.Console(1, CurrentRoom, "Transitioning to in-call, cancelling non-sharable source");
CurrentRoom.RunRouteAction("codecOsd", CurrentRoom.SourceListKey); CurrentRoom.RunRouteAction("codecOsd");
} }
} }

View File

@@ -19,13 +19,34 @@ namespace PepperDash.Essentials.Core
protected EssentialsDevice(string key) protected EssentialsDevice(string key)
: base(key) : base(key)
{ {
SubscribeToActivateComplete();
} }
protected EssentialsDevice(string key, string name) protected EssentialsDevice(string key, string name)
: base(key, name) : base(key, name)
{ {
SubscribeToActivateComplete();
}
private void SubscribeToActivateComplete()
{
DeviceManager.AllDevicesActivated += DeviceManagerOnAllDevicesActivated;
}
private void DeviceManagerOnAllDevicesActivated(object sender, EventArgs eventArgs)
{
CrestronInvoke.BeginInvoke((o) =>
{
try
{
Initialize();
}
catch (Exception ex)
{
Debug.Console(0, this, Debug.ErrorLogLevel.Error, "Exception initializing device: {0}", ex.Message);
Debug.Console(1, this, Debug.ErrorLogLevel.Error, "Stack Trace: {0}", ex.StackTrace);
}
});
} }
} }

View File

@@ -88,11 +88,6 @@ namespace PepperDash.Essentials.Core.Privacy
else else
Debug.Console(0, this, "Unable to add Red LED device"); Debug.Console(0, this, "Unable to add Red LED device");
DeviceManager.AllDevicesActivated += (o, a) =>
{
CheckPrivacyMode();
};
AddPostActivationAction(() => { AddPostActivationAction(() => {
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange -= PrivacyModeIsOnFeedback_OutputChange; PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange -= PrivacyModeIsOnFeedback_OutputChange;
PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange += PrivacyModeIsOnFeedback_OutputChange; PrivacyDevice.PrivacyModeIsOnFeedback.OutputChange += PrivacyModeIsOnFeedback_OutputChange;
@@ -103,6 +98,15 @@ namespace PepperDash.Essentials.Core.Privacy
return base.CustomActivate(); return base.CustomActivate();
} }
#region Overrides of Device
public override void Initialize()
{
CheckPrivacyMode();
}
#endregion
public void SetPrivacyDevice(IPrivacy privacyDevice) public void SetPrivacyDevice(IPrivacy privacyDevice)
{ {
PrivacyDevice = privacyDevice; PrivacyDevice = privacyDevice;

View File

@@ -39,10 +39,10 @@ namespace PepperDash.Essentials.Core
RegisterCrestronGenericBase(_partitionSensor); RegisterCrestronGenericBase(_partitionSensor);
NameFeedback = new StringFeedback(() => Name); NameFeedback = new StringFeedback(() => Name);
EnableFeedback = new BoolFeedback(() => _partitionSensor.EnableFeedback.BoolValue); EnableFeedback = new BoolFeedback(() => InTestMode ? TestEnableFeedback : _partitionSensor.EnableFeedback.BoolValue);
PartitionPresentFeedback = new BoolFeedback(() => _partitionSensor.PartitionSensedFeedback.BoolValue); PartitionPresentFeedback = new BoolFeedback(() => InTestMode ? TestPartitionSensedFeedback : _partitionSensor.PartitionSensedFeedback.BoolValue);
PartitionNotSensedFeedback = new BoolFeedback(() => _partitionSensor.PartitionNotSensedFeedback.BoolValue); PartitionNotSensedFeedback = new BoolFeedback(() => InTestMode ? !TestPartitionSensedFeedback : _partitionSensor.PartitionNotSensedFeedback.BoolValue);
SensitivityFeedback = new IntFeedback(() => _partitionSensor.SensitivityFeedback.UShortValue); SensitivityFeedback = new IntFeedback(() => InTestMode ? TestSensitivityFeedback : _partitionSensor.SensitivityFeedback.UShortValue);
if (_partitionSensor != null) _partitionSensor.BaseEvent += PartitionSensor_BaseEvent; if (_partitionSensor != null) _partitionSensor.BaseEvent += PartitionSensor_BaseEvent;
}); });
@@ -93,6 +93,9 @@ namespace PepperDash.Essentials.Core
if (InTestMode) if (InTestMode)
{ {
TestEnableFeedback = state; TestEnableFeedback = state;
EnableFeedback.FireUpdate();
Debug.Console(1, this, "TestEnableFeedback: {0}", TestEnableFeedback.ToString()); Debug.Console(1, this, "TestEnableFeedback: {0}", TestEnableFeedback.ToString());
return; return;
} }
@@ -105,6 +108,10 @@ namespace PepperDash.Essentials.Core
if (InTestMode) if (InTestMode)
{ {
TestPartitionSensedFeedback = state; TestPartitionSensedFeedback = state;
PartitionPresentFeedback.FireUpdate();
PartitionNotSensedFeedback.FireUpdate();
Debug.Console(1, this, "TestPartitionSensedFeedback: {0}", TestPartitionSensedFeedback.ToString()); Debug.Console(1, this, "TestPartitionSensedFeedback: {0}", TestPartitionSensedFeedback.ToString());
return; return;
} }
@@ -117,6 +124,8 @@ namespace PepperDash.Essentials.Core
if (InTestMode) if (InTestMode)
{ {
TestSensitivityFeedback = value; TestSensitivityFeedback = value;
SensitivityFeedback.FireUpdate();
Debug.Console(1, this, "TestSensitivityFeedback: {0}", TestSensitivityFeedback); Debug.Console(1, this, "TestSensitivityFeedback: {0}", TestSensitivityFeedback);
return; return;
} }

View File

@@ -550,6 +550,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
CrestronConsole.AddNewConsoleCommand(GetPhonebook, "GetCodecPhonebook", "Triggers a refresh of the codec phonebook", ConsoleAccessLevelEnum.AccessOperator); CrestronConsole.AddNewConsoleCommand(GetPhonebook, "GetCodecPhonebook", "Triggers a refresh of the codec phonebook", ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(GetBookings, "GetCodecBookings", "Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator); CrestronConsole.AddNewConsoleCommand(GetBookings, "GetCodecBookings", "Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator);
return base.CustomActivate();
}
#region Overrides of Device
public override void Initialize()
{
var socket = Communication as ISocketStatus; var socket = Communication as ISocketStatus;
if (socket != null) if (socket != null)
{ {
@@ -558,9 +565,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
Communication.Connect(); Communication.Connect();
CommunicationMonitor.Start(); CommunicationMonitor.Start();
string prefix = "xFeedback register "; const string prefix = "xFeedback register ";
CliFeedbackRegistrationExpression = CliFeedbackRegistrationExpression =
prefix + "/Configuration" + Delimiter + prefix + "/Configuration" + Delimiter +
@@ -575,14 +582,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
prefix + "/Status/Video/Layout" + Delimiter + prefix + "/Status/Video/Layout" + Delimiter +
prefix + "/Status/Video/Input/MainVideoMute" + Delimiter + prefix + "/Status/Video/Input/MainVideoMute" + Delimiter +
prefix + "/Bookings" + Delimiter + prefix + "/Bookings" + Delimiter +
prefix + "/Event/CallDisconnect" + Delimiter + prefix + "/Event/CallDisconnect" + Delimiter +
prefix + "/Event/Bookings" + Delimiter + prefix + "/Event/Bookings" + Delimiter +
prefix + "/Event/CameraPresetListUpdated" + Delimiter + prefix + "/Event/CameraPresetListUpdated" + Delimiter +
prefix + "/Event/UserInterface/Presentation/ExternalSource/Selected/SourceIdentifier" + Delimiter; prefix + "/Event/UserInterface/Presentation/ExternalSource/Selected/SourceIdentifier" + Delimiter;
return base.CustomActivate();
} }
#endregion
/// <summary> /// <summary>
/// Fires when initial codec sync is completed. Used to then send commands to get call history, phonebook, bookings, etc. /// Fires when initial codec sync is completed. Used to then send commands to get call history, phonebook, bookings, etc.
/// </summary> /// </summary>

View File

@@ -667,6 +667,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{ {
DirectoryRoot = new CodecDirectory(); DirectoryRoot = new CodecDirectory();
_currentDirectoryResult = DirectoryRoot;
DirectoryBrowseHistory = new List<CodecDirectory>(); DirectoryBrowseHistory = new List<CodecDirectory>();
DirectoryBrowseHistoryStack = new Stack<CodecDirectory>(); DirectoryBrowseHistoryStack = new Stack<CodecDirectory>();
@@ -717,7 +719,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
CrestronConsole.AddNewConsoleCommand(s => GetBookings(), "GetZoomRoomBookings", CrestronConsole.AddNewConsoleCommand(s => GetBookings(), "GetZoomRoomBookings",
"Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator); "Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator);
var socket = Communication as ISocketStatus;
return base.CustomActivate();
}
#region Overrides of Device
public override void Initialize()
{
var socket = Communication as ISocketStatus;
if (socket != null) if (socket != null)
{ {
socket.ConnectionChange += socket_ConnectionChange; socket.ConnectionChange += socket_ConnectionChange;
@@ -728,11 +739,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
Communication.Connect(); Communication.Connect();
CommunicationMonitor.Start(); CommunicationMonitor.Start();
}
return base.CustomActivate(); #endregion
}
public void SetCommDebug(string s) public void SetCommDebug(string s)
{ {
if (s == "1") if (s == "1")
{ {
@@ -970,10 +981,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
SendText("echo off"); SendText("echo off");
Thread.Sleep(100); Thread.Sleep(100);
// set feedback exclusions // set feedback exclusions
SendText("zFeedback Register Op: ex Path: /Event/InfoResult/info/callin_country_list"); SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/callin_country_list");
Thread.Sleep(100); Thread.Sleep(100);
SendText("zFeedback Register Op: ex Path: /Event/InfoResult/info/callout_country_list"); SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/callout_country_list");
Thread.Sleep(100); Thread.Sleep(100);
SendText("zFeedback Register Op: ex Path: /Event/InfoResult/Info/toll_free_callinLlist");
Thread.Sleep(100);
if (!_props.DisablePhonebookAutoDownload) if (!_props.DisablePhonebookAutoDownload)
{ {
@@ -1565,6 +1578,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
Debug.Console(1, this, "Creating new Status.Call object"); Debug.Console(1, this, "Creating new Status.Call object");
Status.Call = new zStatus.Call { Status = callStatus }; Status.Call = new zStatus.Call { Status = callStatus };
OnCallStatusChange( new CodecActiveCallItem() { Status = eCodecCallStatus.Disconnected });
SetUpCallFeedbackActions(); SetUpCallFeedbackActions();
} }
@@ -1585,7 +1600,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
break; break;
} }
var newCall = new CodecActiveCallItem { Status = newStatus }; var newCall = new CodecActiveCallItem
{
Name = Status.Call.Info.meeting_list_item.meetingName,
Id = Status.Call.Info.meeting_id,
Status = newStatus
};
ActiveCalls.Add(newCall); ActiveCalls.Add(newCall);
@@ -1594,6 +1614,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
OnCallStatusChange(newCall); OnCallStatusChange(newCall);
} }
} }
else else
{ {
@@ -1641,7 +1663,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
//clear participants list after call cleanup //clear participants list after call cleanup
if (ActiveCalls.Count == 0) if (ActiveCalls.Count == 0)
{ {
Participants.CurrentParticipants = new List<Participant>(); var emptyList = new List<Participant>();
Participants.CurrentParticipants = emptyList;
} }
} }

View File

@@ -1,3 +1,3 @@
<packages> <packages>
<package id="PepperDashCore" version="1.0.47" targetFramework="net35" allowedVersions="[1.0,1.1)"/> <package id="PepperDashCore" version="1.0.48" targetFramework="net35" allowedVersions="[1.0,1.1)"/>
</packages> </packages>