mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-04 07:14:58 +00:00
lots of changes. Getting things working
This commit is contained in:
@@ -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