mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-03 14:55:05 +00:00
lots of changes. Getting things working
This commit is contained in:
@@ -11,13 +11,18 @@ using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using PepperDash.Essentials.Core.Devices;
|
||||
using PepperDash.Essentials.Core.Fusion;
|
||||
using PepperDash.Essentials.Core.Monitoring;
|
||||
using PepperDash.Essentials.Core.Rooms.Config;
|
||||
using PepperDash.Essentials.Core.Touchpanels;
|
||||
using PepperDash.Essentials.DM;
|
||||
//using PepperDash.Essentials.Room.MobileControl;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using PepperDash.Essentials.Core.DeviceTypeInterfaces;
|
||||
using PepperDash.Essentials.DM.Config;
|
||||
using PepperDash_Essentials_Core.Fusion;
|
||||
|
||||
namespace PepperDash.Essentials
|
||||
{
|
||||
@@ -51,20 +56,17 @@ namespace PepperDash.Essentials
|
||||
|
||||
if (Debug.DoNotLoadOnNextBoot)
|
||||
{
|
||||
CrestronConsole.AddNewConsoleCommand(s => GoWithLoad(), "go", "Loads configuration file",
|
||||
CrestronConsole.AddNewConsoleCommand(s => GoWithLoadDeferred(), "go", "Loads configuration file",
|
||||
ConsoleAccessLevelEnum.AccessOperator);
|
||||
}
|
||||
|
||||
CrestronConsole.AddNewConsoleCommand(PluginLoader.ReportAssemblyVersions, "reportversions", "Reports the versions of the loaded assemblies", ConsoleAccessLevelEnum.AccessOperator);
|
||||
|
||||
CrestronConsole.AddNewConsoleCommand(PepperDash.Essentials.Core.DeviceFactory.GetDeviceFactoryTypes, "gettypes", "Gets the device types that can be built. Accepts a filter string.", ConsoleAccessLevelEnum.AccessOperator);
|
||||
CrestronConsole.AddNewConsoleCommand(Core.DeviceFactory.GetDeviceFactoryTypes, "gettypes", "Gets the device types that can be built. Accepts a filter string.", ConsoleAccessLevelEnum.AccessOperator);
|
||||
|
||||
CrestronConsole.AddNewConsoleCommand(BridgeHelper.PrintJoinMap, "getjoinmap", "map(s) for bridge or device on bridge [brKey [devKey]]", ConsoleAccessLevelEnum.AccessOperator);
|
||||
|
||||
CrestronConsole.AddNewConsoleCommand(s =>
|
||||
{
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "CONSOLE MESSAGE: {0}", s);
|
||||
}, "appdebugmessage", "Writes message to log", ConsoleAccessLevelEnum.AccessOperator);
|
||||
CrestronConsole.AddNewConsoleCommand(s => Debug.Console(0, Debug.ErrorLogLevel.Notice, "CONSOLE MESSAGE: {0}", s), "appdebugmessage", "Writes message to log", ConsoleAccessLevelEnum.AccessOperator);
|
||||
|
||||
CrestronConsole.AddNewConsoleCommand(s =>
|
||||
{
|
||||
@@ -77,27 +79,29 @@ namespace PepperDash.Essentials
|
||||
{
|
||||
CrestronConsole.ConsoleCommandResponse
|
||||
("Current running configuration. This is the merged system and template configuration");
|
||||
CrestronConsole.ConsoleCommandResponse(Newtonsoft.Json.JsonConvert.SerializeObject
|
||||
(ConfigReader.ConfigObject, Newtonsoft.Json.Formatting.Indented));
|
||||
CrestronConsole.ConsoleCommandResponse(JsonConvert.SerializeObject
|
||||
(ConfigReader.ConfigObject, Formatting.Indented));
|
||||
}, "showconfig", "Shows the current running merged config", ConsoleAccessLevelEnum.AccessOperator);
|
||||
|
||||
CrestronConsole.AddNewConsoleCommand(s =>
|
||||
{
|
||||
CrestronConsole.ConsoleCommandResponse("This system can be found at the following URLs:\r" +
|
||||
"System URL: {0}\r" +
|
||||
"Template URL: {1}", ConfigReader.ConfigObject.SystemUrl, ConfigReader.ConfigObject.TemplateUrl);
|
||||
}, "portalinfo", "Shows portal URLS from configuration", ConsoleAccessLevelEnum.AccessOperator);
|
||||
CrestronConsole.AddNewConsoleCommand(s => CrestronConsole.ConsoleCommandResponse("This system can be found at the following URLs:\r" +
|
||||
"System URL: {0}\r" +
|
||||
"Template URL: {1}", ConfigReader.ConfigObject.SystemUrl, ConfigReader.ConfigObject.TemplateUrl), "portalinfo", "Shows portal URLS from configuration", ConsoleAccessLevelEnum.AccessOperator);
|
||||
|
||||
|
||||
if (!Debug.DoNotLoadOnNextBoot)
|
||||
{
|
||||
GoWithLoad();
|
||||
GoWithLoad(null);
|
||||
return;
|
||||
}
|
||||
|
||||
SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true;
|
||||
}
|
||||
|
||||
private void GoWithLoadDeferred()
|
||||
{
|
||||
CrestronInvoke.BeginInvoke(GoWithLoad);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines if the program is running on a processor (appliance) or server (VC-4).
|
||||
///
|
||||
@@ -113,13 +117,11 @@ namespace PepperDash.Essentials
|
||||
|
||||
var dirSeparator = Global.DirectorySeparator;
|
||||
|
||||
string directoryPrefix;
|
||||
|
||||
directoryPrefix = Crestron.SimplSharp.CrestronIO.Directory.GetApplicationRootDirectory();
|
||||
var directoryPrefix = Directory.GetApplicationRootDirectory();
|
||||
|
||||
var fullVersion = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), false);
|
||||
|
||||
AssemblyInformationalVersionAttribute fullVersionAtt = fullVersion[0] as AssemblyInformationalVersionAttribute;
|
||||
var fullVersionAtt = fullVersion[0] as AssemblyInformationalVersionAttribute;
|
||||
|
||||
Global.SetAssemblyVersion(fullVersionAtt.InformationalVersion);
|
||||
|
||||
@@ -170,7 +172,7 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
/// Begins the process of loading resources including plugins and configuration data
|
||||
/// </summary>
|
||||
public void GoWithLoad()
|
||||
public void GoWithLoad(object notUsed)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -319,10 +321,10 @@ namespace PepperDash.Essentials
|
||||
{
|
||||
|
||||
// Build the processor wrapper class
|
||||
DeviceManager.AddDevice(new PepperDash.Essentials.Core.Devices.CrestronProcessor("processor"));
|
||||
DeviceManager.AddDevice(new CrestronProcessor("processor"));
|
||||
|
||||
// Add global System Monitor device
|
||||
DeviceManager.AddDevice(new PepperDash.Essentials.Core.Monitoring.SystemMonitorController("systemMonitor"));
|
||||
DeviceManager.AddDevice(new SystemMonitorController("systemMonitor"));
|
||||
|
||||
foreach (var devConf in ConfigReader.ConfigObject.Devices)
|
||||
{
|
||||
@@ -339,28 +341,28 @@ namespace PepperDash.Essentials
|
||||
devConf.Type.ToUpper(), Global.ControlSystem.ControllerPrompt.ToUpper());
|
||||
|
||||
// Check if the processor is a DMPS model
|
||||
if (this.ControllerPrompt.IndexOf("dmps", StringComparison.OrdinalIgnoreCase) > -1)
|
||||
if (ControllerPrompt.IndexOf("dmps", StringComparison.OrdinalIgnoreCase) > -1)
|
||||
{
|
||||
Debug.Console(2, "Adding DmpsRoutingController for {0} to Device Manager.", this.ControllerPrompt);
|
||||
Debug.Console(2, "Adding DmpsRoutingController for {0} to Device Manager.", ControllerPrompt);
|
||||
|
||||
var propertiesConfig = JsonConvert.DeserializeObject<DM.Config.DmpsRoutingPropertiesConfig>(devConf.Properties.ToString());
|
||||
var propertiesConfig = JsonConvert.DeserializeObject<DmpsRoutingPropertiesConfig>(devConf.Properties.ToString());
|
||||
|
||||
if(propertiesConfig == null)
|
||||
propertiesConfig = new DM.Config.DmpsRoutingPropertiesConfig();
|
||||
propertiesConfig = new DmpsRoutingPropertiesConfig();
|
||||
|
||||
var dmpsRoutingController = DmpsRoutingController.GetDmpsRoutingController("processor-avRouting", this.ControllerPrompt, propertiesConfig);
|
||||
var dmpsRoutingController = DmpsRoutingController.GetDmpsRoutingController("processor-avRouting", ControllerPrompt, propertiesConfig);
|
||||
|
||||
DeviceManager.AddDevice(dmpsRoutingController);
|
||||
}
|
||||
else if (this.ControllerPrompt.IndexOf("mpc3", StringComparison.OrdinalIgnoreCase) > -1)
|
||||
else if (ControllerPrompt.IndexOf("mpc3", StringComparison.OrdinalIgnoreCase) > -1)
|
||||
{
|
||||
Debug.Console(2, "MPC3 processor type detected. Adding Mpc3TouchpanelController.");
|
||||
|
||||
var butToken = devConf.Properties["buttons"];
|
||||
if (butToken != null)
|
||||
{
|
||||
var buttons = butToken.ToObject<Dictionary<string, Essentials.Core.Touchpanels.KeypadButton>>();
|
||||
var tpController = new Essentials.Core.Touchpanels.Mpc3TouchpanelController(devConf.Key, devConf.Name, Global.ControlSystem, buttons);
|
||||
var buttons = butToken.ToObject<Dictionary<string, KeypadButton>>();
|
||||
var tpController = new Mpc3TouchpanelController(devConf.Key, devConf.Name, Global.ControlSystem, buttons);
|
||||
DeviceManager.AddDevice(tpController);
|
||||
}
|
||||
else
|
||||
@@ -383,7 +385,7 @@ namespace PepperDash.Essentials
|
||||
IKeyed newDev = null;
|
||||
|
||||
if (newDev == null)
|
||||
newDev = PepperDash.Essentials.Core.DeviceFactory.GetDevice(devConf);
|
||||
newDev = Core.DeviceFactory.GetDevice(devConf);
|
||||
|
||||
//
|
||||
//if (newDev == null)
|
||||
@@ -455,7 +457,7 @@ namespace PepperDash.Essentials
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice,
|
||||
"Room is EssentialsHuddleSpaceRoom, attempting to add to DeviceManager with Fusion");
|
||||
DeviceManager.AddDevice(
|
||||
new EssentialsHuddleSpaceFusionSystemControllerBase(huddleRoom, 0xf1));
|
||||
new EssentialsHuddleSpaceFusionController(huddleRoom, 0xf1));
|
||||
|
||||
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge...");
|
||||
@@ -472,7 +474,7 @@ namespace PepperDash.Essentials
|
||||
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice,
|
||||
"Room is EssentialsDualDisplayRoom, attempting to add to DeviceManager with Fusion");
|
||||
DeviceManager.AddDevice(new EssentialsHuddleVtc1FusionController(ddRoom, 0xf1));
|
||||
DeviceManager.AddDevice(new EssentialsDualDisplayFusionController(ddRoom, 0xf1));
|
||||
|
||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Mobile Control Bridge...");
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ using PepperDash.Essentials.Core.Fusion;
|
||||
|
||||
namespace PepperDash.Essentials.Fusion
|
||||
{
|
||||
public class EssentialsHuddleVtc1FusionController : EssentialsHuddleSpaceFusionSystemControllerBase
|
||||
public class EssentialsHuddleVtc1FusionController : EssentialsFusionSystemControllerBase
|
||||
{
|
||||
private BooleanSigData _codecIsInCall;
|
||||
|
||||
@@ -168,53 +168,6 @@ namespace PepperDash.Essentials.Fusion
|
||||
|
||||
// These methods are overridden because they access the room class which is of a different type
|
||||
|
||||
protected override void CreateSymbolAndBasicSigs(uint ipId)
|
||||
{
|
||||
Debug.Console(1, this, "Creating Fusion Room symbol with GUID: {0}", RoomGuid);
|
||||
|
||||
FusionRoom = new FusionRoom(ipId, Global.ControlSystem, Room.Name, RoomGuid);
|
||||
FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.Use();
|
||||
FusionRoom.ExtenderFusionRoomDataReservedSigs.Use();
|
||||
|
||||
FusionRoom.Register();
|
||||
|
||||
FusionRoom.FusionStateChange += FusionRoom_FusionStateChange;
|
||||
|
||||
FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.DeviceExtenderSigChange +=
|
||||
FusionRoomSchedule_DeviceExtenderSigChange;
|
||||
FusionRoom.ExtenderFusionRoomDataReservedSigs.DeviceExtenderSigChange +=
|
||||
ExtenderFusionRoomDataReservedSigs_DeviceExtenderSigChange;
|
||||
FusionRoom.OnlineStatusChange += FusionRoom_OnlineStatusChange;
|
||||
|
||||
CrestronConsole.AddNewConsoleCommand(RequestFullRoomSchedule, "FusReqRoomSchedule",
|
||||
"Requests schedule of the room for the next 24 hours", ConsoleAccessLevelEnum.AccessOperator);
|
||||
CrestronConsole.AddNewConsoleCommand(ModifyMeetingEndTimeConsoleHelper, "FusReqRoomSchMod",
|
||||
"Ends or extends a meeting by the specified time", ConsoleAccessLevelEnum.AccessOperator);
|
||||
CrestronConsole.AddNewConsoleCommand(CreateAdHocMeeting, "FusCreateMeeting",
|
||||
"Creates and Ad Hoc meeting for on hour or until the next meeting",
|
||||
ConsoleAccessLevelEnum.AccessOperator);
|
||||
|
||||
// Room to fusion room
|
||||
Room.OnFeedback.LinkInputSig(FusionRoom.SystemPowerOn.InputSig);
|
||||
|
||||
// Moved to
|
||||
CurrentRoomSourceNameSig = FusionRoom.CreateOffsetStringSig(84, "Display 1 - Current Source",
|
||||
eSigIoMask.InputSigOnly);
|
||||
// Don't think we need to get current status of this as nothing should be alive yet.
|
||||
|
||||
var essentialsHuddleVtc1Room = Room as EssentialsHuddleVtc1Room;
|
||||
if (essentialsHuddleVtc1Room != null)
|
||||
{
|
||||
essentialsHuddleVtc1Room.CurrentSourceChange += Room_CurrentSourceInfoChange;
|
||||
FusionRoom.SystemPowerOn.OutputSig.SetSigFalseAction(
|
||||
essentialsHuddleVtc1Room.PowerOnToDefaultOrLastSource);
|
||||
FusionRoom.SystemPowerOff.OutputSig.SetSigFalseAction(
|
||||
() => essentialsHuddleVtc1Room.RunRouteAction("roomOff", Room.SourceListKey));
|
||||
}
|
||||
|
||||
CrestronEnvironment.EthernetEventHandler += CrestronEnvironment_EthernetEventHandler;
|
||||
}
|
||||
|
||||
protected override void SetUpSources()
|
||||
{
|
||||
// Sources
|
||||
|
||||
@@ -1,231 +1,24 @@
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using System.Text;
|
||||
//using Crestron.SimplSharp;
|
||||
//using Crestron.SimplSharpPro;
|
||||
//using Crestron.SimplSharpPro.DeviceSupport;
|
||||
//using PepperDash.Core;
|
||||
//using PepperDash.Essentials.Core;
|
||||
//using PepperDash.Essentials.Core.SmartObjects;
|
||||
//using PepperDash.Essentials.Core.PageManagers;
|
||||
using System;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDashEssentials.UIDrivers.EssentialsDualDisplay;
|
||||
|
||||
//namespace PepperDash.Essentials
|
||||
//{
|
||||
// public class DualDisplaySimpleOrAdvancedRouting : PanelDriverBase
|
||||
// {
|
||||
// EssentialsPresentationPanelAvFunctionsDriver Parent;
|
||||
namespace PepperDash.Essentials
|
||||
{
|
||||
public class DualDisplaySimpleOrAdvancedRouting : PanelDriverBase
|
||||
{
|
||||
private readonly EssentialsDualDisplayPanelAvFunctionsDriver _parent;
|
||||
private EssentialsDualDisplayRoom _currentRoom;
|
||||
|
||||
// /// <summary>
|
||||
// /// Smart Object 3200
|
||||
// /// </summary>
|
||||
// SubpageReferenceList SourcesSrl;
|
||||
private SourceListItem PendingSource;
|
||||
|
||||
public DualDisplaySimpleOrAdvancedRouting(EssentialsDualDisplayPanelAvFunctionsDriver parent)
|
||||
: base(parent.TriList)
|
||||
{
|
||||
_parent = parent;
|
||||
_currentRoom = _parent.CurrentRoom as EssentialsDualDisplayRoom;
|
||||
}
|
||||
|
||||
// /// <summary>
|
||||
// /// For tracking feedback on last selected
|
||||
// /// </summary>
|
||||
// BoolInputSig LastSelectedSourceSig;
|
||||
|
||||
// /// <summary>
|
||||
// /// The source that has been selected and is awaiting assignment to a display
|
||||
// /// </summary>
|
||||
// SourceListItem PendingSource;
|
||||
|
||||
// bool IsSharingModeAdvanced;
|
||||
|
||||
// public DualDisplaySimpleOrAdvancedRouting(EssentialsPresentationPanelAvFunctionsDriver parent) : base(parent.TriList)
|
||||
// {
|
||||
// Parent = parent;
|
||||
// SourcesSrl = new SubpageReferenceList(TriList, 3200, 3, 3, 3);
|
||||
|
||||
// TriList.SetSigFalseAction(UIBoolJoin.ToggleSharingModePress, ToggleSharingModePressed);
|
||||
|
||||
// TriList.SetSigFalseAction(UIBoolJoin.Display1AudioButtonPressAndFb, Display1AudioPress);
|
||||
// TriList.SetSigFalseAction(UIBoolJoin.Display1ControlButtonPress, Display1ControlPress);
|
||||
// TriList.SetSigTrueAction(UIBoolJoin.Display1SelectPressAndFb, Display1Press);
|
||||
|
||||
// TriList.SetSigFalseAction(UIBoolJoin.Display2AudioButtonPressAndFb, Display2AudioPress);
|
||||
// TriList.SetSigFalseAction(UIBoolJoin.Display2ControlButtonPress, Display2ControlPress);
|
||||
// TriList.SetSigTrueAction(UIBoolJoin.Display2SelectPressAndFb, Display2Press);
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public override void Show()
|
||||
// {
|
||||
// TriList.BooleanInput[UIBoolJoin.ToggleSharingModeVisible].BoolValue = true;
|
||||
// TriList.BooleanInput[UIBoolJoin.StagingPageVisible].BoolValue = true;
|
||||
// if(IsSharingModeAdvanced)
|
||||
// TriList.BooleanInput[UIBoolJoin.DualDisplayPageVisible].BoolValue = true;
|
||||
// else
|
||||
// TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = true;
|
||||
// base.Show();
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// //public override void Hide()
|
||||
// //{
|
||||
// // TriList.BooleanInput[UIBoolJoin.ToggleSharingModeVisible].BoolValue = false;
|
||||
// // TriList.BooleanInput[UIBoolJoin.StagingPageVisible].BoolValue = false;
|
||||
// // if(IsSharingModeAdvanced)
|
||||
// // TriList.BooleanInput[UIBoolJoin.DualDisplayPageVisible].BoolValue = false;
|
||||
// // else
|
||||
// // TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
|
||||
// // base.Hide();
|
||||
// //}
|
||||
|
||||
// public void SetCurrentRoomFromParent()
|
||||
// {
|
||||
// if (IsSharingModeAdvanced)
|
||||
// return; // add stuff here
|
||||
// else
|
||||
// SetupSourceListForSimpleRouting();
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// void SetupSourceListForSimpleRouting()
|
||||
// {
|
||||
// // get the source list config and set up the source list
|
||||
// var config = ConfigReader.ConfigObject.SourceLists;
|
||||
// if (config.ContainsKey(Parent.CurrentRoom.SourceListKey))
|
||||
// {
|
||||
// var srcList = config[Parent.CurrentRoom.SourceListKey]
|
||||
// .Values.ToList().OrderBy(s => s.Order);
|
||||
// // Setup sources list
|
||||
// uint i = 1; // counter for UI list
|
||||
// foreach (var srcConfig in srcList)
|
||||
// {
|
||||
// if (!srcConfig.IncludeInSourceList) // Skip sources marked this way
|
||||
// continue;
|
||||
|
||||
// var sourceKey = srcConfig.SourceKey;
|
||||
// var actualSource = DeviceManager.GetDeviceForKey(sourceKey) as Device;
|
||||
// if (actualSource == null)
|
||||
// {
|
||||
// Debug.Console(0, "Cannot assign missing source '{0}' to source UI list",
|
||||
// srcConfig.SourceKey);
|
||||
// continue;
|
||||
// }
|
||||
// var localSrcItem = srcConfig; // lambda scope below
|
||||
// var localIndex = i;
|
||||
// SourcesSrl.GetBoolFeedbackSig(i, 1).UserObject = new Action<bool>(b =>
|
||||
// {
|
||||
// if (IsSharingModeAdvanced)
|
||||
// {
|
||||
// if (LastSelectedSourceSig != null)
|
||||
// LastSelectedSourceSig.BoolValue = false;
|
||||
// SourceListButtonPress(localSrcItem);
|
||||
// LastSelectedSourceSig = SourcesSrl.BoolInputSig(localIndex, 1);
|
||||
// LastSelectedSourceSig.BoolValue = true;
|
||||
// }
|
||||
// else
|
||||
// Parent.CurrentRoom.DoSourceToAllDestinationsRoute(localSrcItem);
|
||||
// });
|
||||
// SourcesSrl.StringInputSig(i, 1).StringValue = srcConfig.PreferredName;
|
||||
// i++;
|
||||
|
||||
// //var item = new SubpageReferenceListSourceItem(i++, SourcesSrl, srcConfig,
|
||||
// // b => { if (!b) UiSelectSource(localSrcConfig); });
|
||||
// //SourcesSrl.AddItem(item); // add to the SRL
|
||||
// //item.RegisterForSourceChange(Parent.CurrentRoom);
|
||||
// }
|
||||
// SourcesSrl.Count = (ushort)(i - 1);
|
||||
// Parent.CurrentRoom.CurrentSingleSourceChange += CurrentRoom_CurrentSourceInfoChange;
|
||||
// Parent.CurrentRoom.CurrentDisplay1SourceChange += CurrentRoom_CurrentDisplay1SourceChange;
|
||||
// Parent.CurrentRoom.CurrentDisplay2SourceChange += CurrentRoom_CurrentDisplay2SourceChange;
|
||||
// }
|
||||
// }
|
||||
|
||||
// void SetupSourceListForAdvancedRouting()
|
||||
// {
|
||||
|
||||
// }
|
||||
|
||||
// void CurrentRoom_CurrentSourceInfoChange(EssentialsRoomBase room, SourceListItem info, ChangeType type)
|
||||
// {
|
||||
|
||||
// }
|
||||
|
||||
// void CurrentRoom_CurrentDisplay1SourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type)
|
||||
// {
|
||||
// TriList.StringInput[UIStringJoin.Display1SourceLabel].StringValue = PendingSource.PreferredName;
|
||||
|
||||
// }
|
||||
|
||||
// void CurrentRoom_CurrentDisplay2SourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type)
|
||||
// {
|
||||
// TriList.StringInput[UIStringJoin.Display2SourceLabel].StringValue = PendingSource.PreferredName;
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// void ToggleSharingModePressed()
|
||||
// {
|
||||
// Hide();
|
||||
// IsSharingModeAdvanced = !IsSharingModeAdvanced;
|
||||
// TriList.BooleanInput[UIBoolJoin.ToggleSharingModePress].BoolValue = IsSharingModeAdvanced;
|
||||
// Show();
|
||||
// }
|
||||
|
||||
// public void SourceListButtonPress(SourceListItem item)
|
||||
// {
|
||||
// // start the timer
|
||||
// // show FB on potential source
|
||||
// TriList.BooleanInput[UIBoolJoin.Display1AudioButtonEnable].BoolValue = false;
|
||||
// TriList.BooleanInput[UIBoolJoin.Display1ControlButtonEnable].BoolValue = false;
|
||||
// TriList.BooleanInput[UIBoolJoin.Display2AudioButtonEnable].BoolValue = false;
|
||||
// TriList.BooleanInput[UIBoolJoin.Display2ControlButtonEnable].BoolValue = false;
|
||||
// PendingSource = item;
|
||||
// }
|
||||
|
||||
// void EnableAppropriateDisplayButtons()
|
||||
// {
|
||||
// TriList.BooleanInput[UIBoolJoin.Display1AudioButtonEnable].BoolValue = true;
|
||||
// TriList.BooleanInput[UIBoolJoin.Display1ControlButtonEnable].BoolValue = true;
|
||||
// TriList.BooleanInput[UIBoolJoin.Display2AudioButtonEnable].BoolValue = true;
|
||||
// TriList.BooleanInput[UIBoolJoin.Display2ControlButtonEnable].BoolValue = true;
|
||||
// if (LastSelectedSourceSig != null)
|
||||
// LastSelectedSourceSig.BoolValue = false;
|
||||
// }
|
||||
|
||||
// public void Display1Press()
|
||||
// {
|
||||
// EnableAppropriateDisplayButtons();
|
||||
// Parent.CurrentRoom.SourceToDisplay1(PendingSource);
|
||||
// // Enable end meeting
|
||||
// }
|
||||
|
||||
// public void Display1AudioPress()
|
||||
// {
|
||||
|
||||
// }
|
||||
|
||||
|
||||
// public void Display1ControlPress()
|
||||
// {
|
||||
|
||||
// }
|
||||
|
||||
// public void Display2Press()
|
||||
// {
|
||||
// EnableAppropriateDisplayButtons();
|
||||
// Parent.CurrentRoom.SourceToDisplay2(PendingSource);
|
||||
// }
|
||||
|
||||
// public void Display2AudioPress()
|
||||
// {
|
||||
|
||||
// }
|
||||
|
||||
// public void Display2ControlPress()
|
||||
// {
|
||||
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
@@ -13,20 +13,114 @@ namespace PepperDashEssentials.UIDrivers.EssentialsDualDisplay
|
||||
private EssentialsDualDisplayRoom _currentRoom;
|
||||
|
||||
private readonly BoolInputSig _routeToggleVisibility;
|
||||
private readonly BoolInputSig _dualDisplayControlVisibility;
|
||||
|
||||
private readonly BoolFeedback _sharingMode;
|
||||
private readonly BoolOutputSig _sharingModeSig;
|
||||
|
||||
private readonly BoolFeedback _sharingModeFeedback;
|
||||
private readonly BoolFeedback _dualDisplayVisiblityFeedback;
|
||||
private readonly BoolFeedback _routeToggleVisiblityFeedback;
|
||||
|
||||
public EssentialsDualDisplayPanelAvFunctionsDriver(PanelDriverBase parent, CrestronTouchpanelPropertiesConfig config) : base(parent, config)
|
||||
{
|
||||
_routeToggleVisibility = parent.TriList.BooleanInput[UIBoolJoin.ToggleSharingModeVisible];
|
||||
_dualDisplayControlVisibility = parent.TriList.BooleanInput[UIBoolJoin.DualDisplayPageVisible];
|
||||
_sharingModeSig = parent.TriList.BooleanOutput[UIBoolJoin.ToggleSharingModePress];
|
||||
|
||||
_sharingMode = new BoolFeedback(() => _currentRoom.VideoRoutingBehavior == EVideoBehavior.Advanced);
|
||||
_sharingModeSig.SetBoolSigAction(ToggleVideoBehavior);
|
||||
|
||||
_sharingMode.LinkInputSig(parent.TriList.BooleanInput[UIBoolJoin.ToggleSharingModePress]);
|
||||
_sharingModeFeedback = new BoolFeedback(() => _currentRoom.VideoRoutingBehavior == EVideoBehavior.Advanced);
|
||||
_sharingModeFeedback.LinkInputSig(parent.TriList.BooleanInput[UIBoolJoin.ToggleSharingModePress]);
|
||||
|
||||
_dualDisplayVisiblityFeedback =
|
||||
new BoolFeedback(
|
||||
() =>
|
||||
_currentRoom.VideoRoutingBehavior == EVideoBehavior.Advanced &&
|
||||
CurrentMode == UiDisplayMode.Presentation);
|
||||
_dualDisplayVisiblityFeedback.LinkInputSig(_dualDisplayControlVisibility);
|
||||
|
||||
_routeToggleVisiblityFeedback =
|
||||
new BoolFeedback(
|
||||
() => _currentRoom.RoomConfig.EnableVideoBehaviorToggle && CurrentMode == UiDisplayMode.Presentation);
|
||||
_routeToggleVisiblityFeedback.LinkInputSig(_routeToggleVisibility);
|
||||
}
|
||||
|
||||
#region Overrides of EssentialsHuddleVtc1PanelAvFunctionsDriver
|
||||
|
||||
protected override void ShowCurrentSource()
|
||||
{
|
||||
if (_currentRoom.VideoRoutingBehavior == EVideoBehavior.Advanced) return;
|
||||
|
||||
base.ShowCurrentSource();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void ToggleVideoBehavior(bool value)
|
||||
{
|
||||
if (!value) return;
|
||||
|
||||
_currentRoom.VideoRoutingBehavior = _currentRoom.VideoRoutingBehavior == EVideoBehavior.Basic
|
||||
? EVideoBehavior.Advanced
|
||||
: EVideoBehavior.Basic;
|
||||
|
||||
_sharingModeFeedback.FireUpdate();
|
||||
_dualDisplayVisiblityFeedback.FireUpdate();
|
||||
|
||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, _currentRoom.VideoRoutingBehavior == EVideoBehavior.Basic);
|
||||
|
||||
if (_currentRoom.VideoRoutingBehavior == EVideoBehavior.Advanced)
|
||||
{
|
||||
CurrentSourcePageManager.Hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_currentRoom.CurrentSourceInfo != null)
|
||||
{
|
||||
UiSelectSource(_currentRoom.CurrentSourceInfoKey);
|
||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
||||
}
|
||||
CurrentSourcePageManager.Show();
|
||||
}
|
||||
}
|
||||
|
||||
#region Overrides of EssentialsHuddleVtc1PanelAvFunctionsDriver
|
||||
|
||||
#region Overrides of EssentialsHuddleVtc1PanelAvFunctionsDriver
|
||||
|
||||
protected override void SetCurrentRoom(EssentialsHuddleVtc1Room room)
|
||||
{
|
||||
_currentRoom = room as EssentialsDualDisplayRoom;
|
||||
|
||||
base.SetCurrentRoom(room);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Overrides of EssentialsHuddleVtc1PanelAvFunctionsDriver
|
||||
|
||||
protected override void ActivityShareButtonPressed()
|
||||
{
|
||||
base.ActivityShareButtonPressed();
|
||||
|
||||
_dualDisplayVisiblityFeedback.FireUpdate();
|
||||
_routeToggleVisiblityFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
#region Overrides of EssentialsHuddleVtc1PanelAvFunctionsDriver
|
||||
|
||||
public override void ActivityCallButtonPressed()
|
||||
{
|
||||
base.ActivityCallButtonPressed();
|
||||
|
||||
_dualDisplayVisiblityFeedback.FireUpdate();
|
||||
_routeToggleVisiblityFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
protected override void SetupSourceList()
|
||||
{
|
||||
var inCall = _currentRoom.InCallFeedback.BoolValue;
|
||||
@@ -40,24 +134,65 @@ namespace PepperDashEssentials.UIDrivers.EssentialsDualDisplay
|
||||
|
||||
SourceStagingSrl.Clear();
|
||||
uint i = 1;
|
||||
foreach (var src in sourceList.Where(
|
||||
src =>
|
||||
src.Value.IncludeInSourceList && (inCall && !src.Value.DisableCodecSharing) &&
|
||||
(CurrentMode != UiDisplayMode.Call && !src.Value.DisableCodecSharing)))
|
||||
foreach (var src in sourceList)
|
||||
{
|
||||
var source = src.Value;
|
||||
var sourceKey = src.Key;
|
||||
Debug.Console(1, "**** {0}, {1}, {2}, {3}, {4}", source.PreferredName, source.IncludeInSourceList,
|
||||
source.DisableCodecSharing, inCall, CurrentMode);
|
||||
|
||||
var srlItem = new SubpageReferenceListSourceItem(i++, SourceStagingSrl, src.Value,
|
||||
if (!source.IncludeInSourceList || (inCall && source.DisableCodecSharing)
|
||||
|| CurrentMode == UiDisplayMode.Call && source.DisableCodecSharing)
|
||||
{
|
||||
Debug.Console(1, "Skipping {0}", source.PreferredName);
|
||||
continue;
|
||||
}
|
||||
var srlItem = new SubpageReferenceListSourceItem(i++, SourceStagingSrl, source,
|
||||
b => { if (!b) UiSelectSource(sourceKey); });
|
||||
|
||||
SourceStagingSrl.AddItem(srlItem);
|
||||
srlItem.RegisterForSourceChange(_currentRoom);
|
||||
}
|
||||
SourceStagingSrl.Count = (ushort) (i - 1);
|
||||
Debug.Console(2, "Dual Display Source Count: {0}", SourceStagingSrl.Count);
|
||||
}
|
||||
|
||||
#region Overrides of EssentialsHuddleVtc1PanelAvFunctionsDriver
|
||||
|
||||
protected override void SetSourceFeedback()
|
||||
{
|
||||
if (!CurrentRoom.OnFeedback.BoolValue)
|
||||
{
|
||||
// If there's no default, show UI elements
|
||||
if (!CurrentRoom.RunDefaultPresentRoute() && _currentRoom.VideoRoutingBehavior == EVideoBehavior.Basic)
|
||||
{
|
||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
||||
}
|
||||
}
|
||||
else // room is on show what's active or select a source if nothing is yet active
|
||||
{
|
||||
if (CurrentRoom.CurrentSourceInfo == null ||
|
||||
CurrentRoom.CurrentSourceInfoKey == EssentialsHuddleVtc1Room.DefaultCodecRouteString)
|
||||
{
|
||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (CurrentSourcePageManager == null) return;
|
||||
|
||||
if (_currentRoom.VideoRoutingBehavior == EVideoBehavior.Advanced)
|
||||
{
|
||||
CurrentSourcePageManager.Hide();
|
||||
return;
|
||||
}
|
||||
|
||||
CurrentSourcePageManager.Show();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void RefreshRoom(EssentialsDualDisplayRoom room)
|
||||
{
|
||||
RefreshCurrentRoom(room);
|
||||
@@ -65,7 +200,7 @@ namespace PepperDashEssentials.UIDrivers.EssentialsDualDisplay
|
||||
_currentRoom = room;
|
||||
|
||||
_routeToggleVisibility.BoolValue = _currentRoom.RoomConfig.EnableVideoBehaviorToggle;
|
||||
_sharingMode.FireUpdate();
|
||||
_sharingModeFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
private void UiSelectSource(string sourceKey)
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
/// Current page manager running for a source
|
||||
/// </summary>
|
||||
private PageManager _currentSourcePageManager;
|
||||
protected PageManager CurrentSourcePageManager;
|
||||
|
||||
/// <summary>
|
||||
/// Tracks the last meeting that was cancelled
|
||||
@@ -270,7 +270,7 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void ActivityCallButtonPressed()
|
||||
public virtual void ActivityCallButtonPressed()
|
||||
{
|
||||
if (VcDriver.IsVisible)
|
||||
{
|
||||
@@ -281,9 +281,9 @@ namespace PepperDash.Essentials
|
||||
TriList.SetBool(UIBoolJoin.StartPageVisible, false);
|
||||
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false);
|
||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
||||
if (_currentSourcePageManager != null)
|
||||
if (CurrentSourcePageManager != null)
|
||||
{
|
||||
_currentSourcePageManager.Hide();
|
||||
CurrentSourcePageManager.Hide();
|
||||
}
|
||||
PowerOnFromCall();
|
||||
CurrentMode = UiDisplayMode.Call;
|
||||
@@ -691,6 +691,14 @@ namespace PepperDash.Essentials
|
||||
TriList.SetBool(UIBoolJoin.CallStagingBarVisible, false);
|
||||
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, true);
|
||||
// Run default source when room is off and share is pressed
|
||||
SetSourceFeedback();
|
||||
CurrentMode = UiDisplayMode.Presentation;
|
||||
SetupSourceList();
|
||||
SetActivityFooterFeedbacks();
|
||||
}
|
||||
|
||||
protected virtual void SetSourceFeedback()
|
||||
{
|
||||
if (!CurrentRoom.OnFeedback.BoolValue)
|
||||
{
|
||||
// If there's no default, show UI elements
|
||||
@@ -706,14 +714,11 @@ namespace PepperDash.Essentials
|
||||
{
|
||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
||||
}
|
||||
else if (_currentSourcePageManager != null)
|
||||
else if (CurrentSourcePageManager != null)
|
||||
{
|
||||
_currentSourcePageManager.Show();
|
||||
CurrentSourcePageManager.Show();
|
||||
}
|
||||
}
|
||||
CurrentMode = UiDisplayMode.Presentation;
|
||||
SetupSourceList();
|
||||
SetActivityFooterFeedbacks();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -754,7 +759,7 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
/// Loads the appropriate Sigs into CurrentDisplayModeSigsInUse and shows them
|
||||
/// </summary>
|
||||
private void ShowCurrentSource()
|
||||
protected virtual void ShowCurrentSource()
|
||||
{
|
||||
if (CurrentRoom.CurrentSourceInfo == null)
|
||||
{
|
||||
@@ -795,7 +800,7 @@ namespace PepperDash.Essentials
|
||||
pm = new DefaultPageManager(uiDev, TriList);
|
||||
}
|
||||
_pageManagers[uiDev] = pm;
|
||||
_currentSourcePageManager = pm;
|
||||
CurrentSourcePageManager = pm;
|
||||
pm.Show();
|
||||
}
|
||||
|
||||
@@ -1061,7 +1066,7 @@ namespace PepperDash.Essentials
|
||||
}
|
||||
}
|
||||
|
||||
private void SetCurrentRoom(EssentialsHuddleVtc1Room room)
|
||||
protected virtual void SetCurrentRoom(EssentialsHuddleVtc1Room room)
|
||||
{
|
||||
if (_currentRoom == room || room == null)
|
||||
{
|
||||
@@ -1346,10 +1351,10 @@ namespace PepperDash.Essentials
|
||||
// Hide whatever is showing
|
||||
if (IsVisible)
|
||||
{
|
||||
if (_currentSourcePageManager != null)
|
||||
if (CurrentSourcePageManager != null)
|
||||
{
|
||||
_currentSourcePageManager.Hide();
|
||||
_currentSourcePageManager = null;
|
||||
CurrentSourcePageManager.Hide();
|
||||
CurrentSourcePageManager = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1394,7 +1399,7 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
/// Refreshes and shows the room's current source
|
||||
/// </summary>
|
||||
private void RefreshSourceInfo()
|
||||
protected virtual void RefreshSourceInfo()
|
||||
{
|
||||
var routeInfo = CurrentRoom.CurrentSourceInfo;
|
||||
// This will show off popup too
|
||||
|
||||
@@ -14,27 +14,41 @@ namespace PepperDash.Essentials.Core.Fusion
|
||||
_room = room;
|
||||
}
|
||||
|
||||
#region Overrides of EssentialsHuddleSpaceFusionSystemControllerBase
|
||||
#region Overrides of EssentialsHuddleVtc1FusionController
|
||||
|
||||
protected override void ExecuteCustomSteps()
|
||||
{
|
||||
var leftDisplay = _room.LeftDisplay as DisplayBase;
|
||||
var rightDisplay = _room.RightDisplay as DisplayBase;
|
||||
|
||||
SetUpDisplay(leftDisplay);
|
||||
SetUpDisplay(rightDisplay);
|
||||
SetUpDisplays();
|
||||
base.ExecuteCustomSteps();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Overrides of EssentialsHuddleSpaceFusionSystemControllerBase
|
||||
|
||||
protected override void SetUpDisplay()
|
||||
private void SetUpDisplays()
|
||||
{
|
||||
Debug.Console(1, this, "No default Display fo this room");
|
||||
if (_room == null) return;
|
||||
|
||||
var leftDisplay = _room.LeftDisplay as DisplayBase;
|
||||
var rightDisplay = _room.RightDisplay as DisplayBase;
|
||||
|
||||
SetUpDisplay(leftDisplay);
|
||||
SetUpDisplay(rightDisplay);
|
||||
}
|
||||
|
||||
protected override void SetUpDefaultDisplay()
|
||||
{
|
||||
Debug.Console(0, this, "No default display for Dual Display Room");
|
||||
}
|
||||
|
||||
#region Overrides of EssentialsFusionSystemControllerBase
|
||||
|
||||
protected override void SetUpDefaultDisplayAsset()
|
||||
{
|
||||
Debug.Console(0, this, "No default display for Dual Display Room");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void SetUpDisplay(DisplayBase display)
|
||||
{
|
||||
FusionAsset tempAsset;
|
||||
@@ -77,7 +91,5 @@ namespace PepperDash.Essentials.Core.Fusion
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,19 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using PepperDash.Essentials;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Fusion;
|
||||
|
||||
namespace PepperDash_Essentials_Core.Fusion
|
||||
{
|
||||
public class EssentialsHuddleSpaceFusionController:EssentialsHuddleSpaceFusionSystemControllerBase
|
||||
public class EssentialsHuddleSpaceFusionController:EssentialsFusionSystemControllerBase
|
||||
{
|
||||
private EssentialsHuddleSpaceRoom _room;
|
||||
|
||||
public EssentialsHuddleSpaceFusionController(EssentialsHuddleSpaceRoom room, uint ipId) : base(room, ipId)
|
||||
{
|
||||
_room = room;
|
||||
Initialize();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,11 +6,10 @@ using PepperDash.Essentials.Core.Config;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Fusion
|
||||
{
|
||||
public class EssentialsHuddleVtc1FusionController : EssentialsHuddleSpaceFusionSystemControllerBase
|
||||
public class EssentialsHuddleVtc1FusionController : EssentialsFusionSystemControllerBase
|
||||
{
|
||||
private BooleanSigData _codecIsInCall;
|
||||
|
||||
private readonly EssentialsHuddleVtc1Room _room;
|
||||
private BooleanSigData _codecIsInCall;
|
||||
|
||||
public EssentialsHuddleVtc1FusionController(EssentialsHuddleVtc1Room room, uint ipId)
|
||||
: base(room, ipId)
|
||||
@@ -148,67 +147,6 @@ namespace PepperDash.Essentials.Core.Fusion
|
||||
}
|
||||
}
|
||||
|
||||
#region Overrides of EssentialsHuddleSpaceFusionSystemControllerBase
|
||||
|
||||
protected override void SetUpDisplay()
|
||||
{
|
||||
base.SetUpDisplay();
|
||||
|
||||
var defaultDisplay = _room.DefaultDisplay as DisplayBase;
|
||||
|
||||
if (defaultDisplay == null)
|
||||
{
|
||||
Debug.Console(1, this, "Cannot link null display to Fusion because default display is null");
|
||||
return;
|
||||
}
|
||||
|
||||
var deviceConfig =
|
||||
ConfigReader.ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(defaultDisplay.Key));
|
||||
|
||||
//Check for existing asset in GUIDs collection
|
||||
|
||||
FusionAsset tempAsset;
|
||||
|
||||
if (FusionStaticAssets.ContainsKey(deviceConfig.Uid))
|
||||
{
|
||||
tempAsset = FusionStaticAssets[deviceConfig.Uid];
|
||||
}
|
||||
else
|
||||
{
|
||||
// Create a new asset
|
||||
tempAsset = new FusionAsset(FusionRoomGuids.GetNextAvailableAssetNumber(FusionRoom),
|
||||
defaultDisplay.Name, "Display", "");
|
||||
FusionStaticAssets.Add(deviceConfig.Uid, tempAsset);
|
||||
}
|
||||
|
||||
var dispPowerOnAction = new Action<bool>(b =>
|
||||
{
|
||||
if (!b)
|
||||
{
|
||||
defaultDisplay.PowerOn();
|
||||
}
|
||||
});
|
||||
var dispPowerOffAction = new Action<bool>(b =>
|
||||
{
|
||||
if (!b)
|
||||
{
|
||||
defaultDisplay.PowerOff();
|
||||
}
|
||||
});
|
||||
|
||||
var dispAsset = FusionRoom.CreateStaticAsset(tempAsset.SlotNumber, tempAsset.Name, "Display",
|
||||
tempAsset.InstanceId);
|
||||
dispAsset.PowerOn.OutputSig.UserObject = dispPowerOnAction;
|
||||
dispAsset.PowerOff.OutputSig.UserObject = dispPowerOffAction;
|
||||
defaultDisplay.PowerIsOnFeedback.LinkInputSig(dispAsset.PowerOn.InputSig);
|
||||
// NO!! display.PowerIsOn.LinkComplementInputSig(dispAsset.PowerOff.InputSig);
|
||||
// Use extension methods
|
||||
dispAsset.TrySetMakeModel(defaultDisplay);
|
||||
dispAsset.TryLinkAssetErrorToCommunication(defaultDisplay);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void codec_CallStatusChange(object sender, Devices.Codec.CodecCallStatusItemChangeEventArgs e)
|
||||
{
|
||||
var codec = _room.VideoCodec;
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace PepperDash.Essentials.Core.Rooms
|
||||
|
||||
public EssentialsRoomBase Room { get; private set; }
|
||||
|
||||
private Fusion.EssentialsHuddleSpaceFusionSystemControllerBase FusionRoom;
|
||||
private Fusion.EssentialsFusionSystemControllerBase FusionRoom;
|
||||
|
||||
public RoomOnToDefaultSourceWhenOccupied(DeviceConfig config) :
|
||||
base (config)
|
||||
@@ -58,7 +58,7 @@ namespace PepperDash.Essentials.Core.Rooms
|
||||
|
||||
var fusionRoomKey = PropertiesConfig.RoomKey + "-fusion";
|
||||
|
||||
FusionRoom = DeviceManager.GetDeviceForKey(fusionRoomKey) as Core.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase;
|
||||
FusionRoom = DeviceManager.GetDeviceForKey(fusionRoomKey) as Core.Fusion.EssentialsFusionSystemControllerBase;
|
||||
|
||||
if (FusionRoom == null)
|
||||
Debug.Console(1, this, "Unable to get Fusion Room from Device Manager with key: {0}", fusionRoomKey);
|
||||
|
||||
@@ -391,7 +391,7 @@ namespace PepperDash.Essentials.Core
|
||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Timeout Minutes from Config is: {0}", timeoutMinutes);
|
||||
|
||||
// If status provider is fusion, set flag to remote
|
||||
if (statusProvider is Fusion.EssentialsHuddleSpaceFusionSystemControllerBase)
|
||||
if (statusProvider is Fusion.EssentialsFusionSystemControllerBase)
|
||||
{
|
||||
OccupancyStatusProviderIsRemote = true;
|
||||
}
|
||||
|
||||
@@ -13,11 +13,26 @@ namespace PepperDash.Essentials.Core
|
||||
public const string DefaultDestinationListKey = "default";
|
||||
private const string LeftDestinationKey = "leftDisplay";
|
||||
private const string RightDestinationKey = "rightDisplay";
|
||||
private EVideoBehavior _videoRoutingBehavior;
|
||||
|
||||
public EssentialsDualDisplayRoomPropertiesConfig RoomConfig { get; private set; }
|
||||
|
||||
public EAudioBehavior AudioRoutingBehavior { get; set; }
|
||||
public EVideoBehavior VideoRoutingBehavior { get; set; }
|
||||
|
||||
public EVideoBehavior VideoRoutingBehavior
|
||||
{
|
||||
get { return _videoRoutingBehavior; }
|
||||
set
|
||||
{
|
||||
_videoRoutingBehavior = value;
|
||||
var handler = VideoRoutingBehaviorChanged;
|
||||
|
||||
if (handler == null) return;
|
||||
handler(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
public event EventHandler VideoRoutingBehaviorChanged;
|
||||
|
||||
private string _destinationListKey;
|
||||
|
||||
@@ -153,7 +168,6 @@ namespace PepperDash.Essentials.Core
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
protected override void IsWarmingUpFeedbackOnOutputChange(object sender, FeedbackEventArgs args)
|
||||
{
|
||||
IsWarmingUpFeedback.FireUpdate();
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using PepperDash.Essentials.Core.Devices.AudioCodec;
|
||||
using PepperDash.Essentials.Core.Devices.Codec;
|
||||
|
||||
Reference in New Issue
Block a user