updates to get things back working

This commit is contained in:
Andrew Welker
2020-11-19 08:00:17 -07:00
parent 97995df962
commit 7b3ef897fb
10 changed files with 22 additions and 22 deletions

View File

@@ -1259,11 +1259,11 @@ namespace PepperDash.Essentials.Core.Fusion
{
//Setup Display Usage Monitoring
var displays = DeviceManager.AllDevices.Where(d => d is DisplayBase);
var displays = DeviceManager.AllDevices.Where(d => d is TwoWayDisplayBase);
// Consider updating this in multiple display systems
foreach (var display in displays.Cast<DisplayBase>())
foreach (var display in displays.Cast<TwoWayDisplayBase>())
{
display.UsageTracker = new UsageTracking(display) {UsageIsTracked = true};
display.UsageTracker.DeviceUsageEnded +=
@@ -1276,7 +1276,7 @@ namespace PepperDash.Essentials.Core.Fusion
return;
}
var defaultDisplay = hasDefaultDisplay.DefaultDisplay as DisplayBase;
var defaultDisplay = hasDefaultDisplay.DefaultDisplay as TwoWayDisplayBase;
if (defaultDisplay == null)
{
Debug.Console(1, this, "Cannot link null display to Fusion because default display is null");
@@ -1326,7 +1326,7 @@ namespace PepperDash.Essentials.Core.Fusion
/// <param name="display"></param>
/// <param name="displayIndex"></param>
/// a
protected virtual void MapDisplayToRoomJoins(int displayIndex, int joinOffset, DisplayBase display)
protected virtual void MapDisplayToRoomJoins(int displayIndex, int joinOffset, TwoWayDisplayBase display)
{
var displayName = string.Format("Display {0} - ", displayIndex);

View File

@@ -154,7 +154,7 @@ namespace PepperDash.Essentials.Core.Fusion
{
base.SetUpDisplay();
var defaultDisplay = _room.DefaultDisplay as DisplayBase;
var defaultDisplay = _room.DefaultDisplay as TwoWayDisplayBase;
if (defaultDisplay == null)
{

View File

@@ -186,19 +186,17 @@
<Compile Include="Device Info\DeviceInfo.cs" />
<Compile Include="Device Info\DeviceInfoEventArgs.cs" />
<Compile Include="Device Info\IDeviceInfoProvider.cs" />
<Compile Include="Devices\AudioCodecBase.cs" />
<Compile Include="Devices\CodecInterfaces.cs" />
<Compile Include="Devices\Base Classes\AudioCodecBase.cs" />
<Compile Include="Devices\Base Classes\EssentialsBridgeableDevice.cs" />
<Compile Include="Devices\Base Classes\EssentialsDevice.cs" />
<Compile Include="Devices\Interfaces\CodecInterfaces.cs" />
<Compile Include="Devices\CrestronProcessor.cs" />
<Compile Include="Devices\DestinationListItem.cs" />
<Compile Include="Devices\Base Classes\DeviceApiBase.cs" />
<Compile Include="Devices\DeviceFeedbackExtensions.cs" />
<Compile Include="Devices\EssentialsBridgeableDevice.cs" />
<Compile Include="Devices\EssentialsDevice.cs" />
<Compile Include="Devices\GenericIRController.cs" />
<Compile Include="Devices\IDspPreset.cs" />
<Compile Include="Devices\IProjectorInterfaces.cs" />
<Compile Include="Devices\Interfaces\IProjectorInterfaces.cs" />
<Compile Include="Devices\PC\InRoomPc.cs" />
<Compile Include="Devices\PC\Laptop.cs" />
<Compile Include="Devices\Base Classes\ReconfigurableDevice.cs" />

View File

@@ -241,7 +241,7 @@ namespace PepperDash.Essentials.Core
ShutdownType = eShutdownType.None;
}
protected void InitializeDisplay(DisplayBase display)
protected void InitializeDisplay(TwoWayDisplayBase display)
{
// Link power, warming, cooling to display
display.PowerIsOnFeedback.OutputChange += PowerIsOnFeedbackOnOutputChange;
@@ -615,9 +615,9 @@ namespace PepperDash.Essentials.Core
if (route.SourceKey.Equals("$off", StringComparison.OrdinalIgnoreCase))
{
dest.ReleaseRoute();
if (dest is IPower)
if (dest is IHasPowerControl)
{
(dest as IPower).PowerOff();
(dest as IHasPowerControl).PowerOff();
}
}
else

View File

@@ -210,8 +210,8 @@ namespace PepperDash.Essentials
return;
}
var leftDisplay = leftDest.SinkDevice as DisplayBase;
var rightDisplay = rightDest.SinkDevice as DisplayBase;
var leftDisplay = leftDest.SinkDevice as TwoWayDisplayBase;
var rightDisplay = rightDest.SinkDevice as TwoWayDisplayBase;
if (leftDisplay == null || rightDisplay == null)
{
@@ -279,8 +279,8 @@ namespace PepperDash.Essentials
protected override void PowerIsOnFeedbackOnOutputChange(object sender, FeedbackEventArgs args)
{
var ld = LeftDisplay as DisplayBase;
var rd = RightDisplay as DisplayBase;
var ld = LeftDisplay as TwoWayDisplayBase;
var rd = RightDisplay as TwoWayDisplayBase;
if (ld == null || rd == null)
{

View File

@@ -52,7 +52,7 @@ namespace PepperDash.Essentials
EnablePowerOnToLastSource = true;
var disp = DefaultDisplay as DisplayBase;
var disp = DefaultDisplay as TwoWayDisplayBase;
if (disp == null)
{
return;
@@ -75,7 +75,7 @@ namespace PepperDash.Essentials
protected override void PowerIsOnFeedbackOnOutputChange(object sender, FeedbackEventArgs feedbackEventArgs)
{
var display = sender as DisplayBase;
var display = sender as TwoWayDisplayBase;
if (display == null)
{

View File

@@ -195,7 +195,7 @@ namespace PepperDash.Essentials
SourceListKey = "default";
EnablePowerOnToLastSource = true;
var disp = DefaultDisplay as DisplayBase;
var disp = DefaultDisplay as TwoWayDisplayBase;
if (disp == null)
{
return;
@@ -272,7 +272,7 @@ namespace PepperDash.Essentials
protected override void PowerIsOnFeedbackOnOutputChange(object sender, FeedbackEventArgs args)
{
var disp = sender as DisplayBase;
var disp = sender as TwoWayDisplayBase;
if (disp == null)
{