mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 04:34:56 +00:00
#753 EssentialsCombinedHuddleVtc1Room should be ready for testing
This commit is contained in:
@@ -57,10 +57,11 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
return () =>
|
return () =>
|
||||||
{
|
{
|
||||||
var disp = DefaultDisplay as DisplayBase;
|
var displays = Displays.Where((d) => d is DisplayBase) as List<DisplayBase>;
|
||||||
|
|
||||||
var val = CurrentSourceInfo != null
|
var val = CurrentSourceInfo != null
|
||||||
&& CurrentSourceInfo.Type == eSourceListItemType.Route
|
&& CurrentSourceInfo.Type == eSourceListItemType.Route
|
||||||
&& disp != null;
|
&& displays.Count() > 0;
|
||||||
//&& disp.PowerIsOnFeedback.BoolValue;
|
//&& disp.PowerIsOnFeedback.BoolValue;
|
||||||
return val;
|
return val;
|
||||||
};
|
};
|
||||||
@@ -246,6 +247,8 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
DefaultAudioDevice = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultAudioKey) as IBasicVolumeControls;
|
DefaultAudioDevice = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultAudioKey) as IBasicVolumeControls;
|
||||||
|
|
||||||
|
Displays = new List<IRoutingSinkWithSwitching>();
|
||||||
|
|
||||||
Initialize();
|
Initialize();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
@@ -347,8 +350,8 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
if (dispTwoWay.PowerIsOnFeedback.BoolValue != OnFeedback.BoolValue)
|
if (dispTwoWay.PowerIsOnFeedback.BoolValue != OnFeedback.BoolValue)
|
||||||
{
|
{
|
||||||
if (!dispTwoWay.PowerIsOnFeedback.BoolValue)
|
//if (!dispTwoWay.PowerIsOnFeedback.BoolValue)
|
||||||
CurrentSourceInfo = null;
|
// CurrentSourceInfo = null;
|
||||||
OnFeedback.FireUpdate();
|
OnFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
if (dispTwoWay.PowerIsOnFeedback.BoolValue)
|
if (dispTwoWay.PowerIsOnFeedback.BoolValue)
|
||||||
@@ -371,41 +374,6 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var disp = DefaultDisplay as DisplayBase;
|
|
||||||
if (disp != null)
|
|
||||||
{
|
|
||||||
// Link power, warming, cooling to display
|
|
||||||
var dispTwoWay = disp as IHasPowerControlWithFeedback;
|
|
||||||
if (dispTwoWay != null)
|
|
||||||
{
|
|
||||||
dispTwoWay.PowerIsOnFeedback.OutputChange += (o, a) =>
|
|
||||||
{
|
|
||||||
if (dispTwoWay.PowerIsOnFeedback.BoolValue != OnFeedback.BoolValue)
|
|
||||||
{
|
|
||||||
if (!dispTwoWay.PowerIsOnFeedback.BoolValue)
|
|
||||||
CurrentSourceInfo = null;
|
|
||||||
OnFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
if (dispTwoWay.PowerIsOnFeedback.BoolValue)
|
|
||||||
{
|
|
||||||
SetDefaultLevels();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
disp.IsWarmingUpFeedback.OutputChange += (o, a) =>
|
|
||||||
{
|
|
||||||
IsWarmingUpFeedback.FireUpdate();
|
|
||||||
if (!IsWarmingUpFeedback.BoolValue)
|
|
||||||
(CurrentVolumeControls as IBasicVolumeWithFeedback).SetVolume(DefaultVolume);
|
|
||||||
};
|
|
||||||
disp.IsCoolingDownFeedback.OutputChange += (o, a) =>
|
|
||||||
{
|
|
||||||
IsCoolingDownFeedback.FireUpdate();
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetSourceListKey()
|
private void SetSourceListKey()
|
||||||
@@ -624,8 +592,8 @@ namespace PepperDash.Essentials
|
|||||||
if (string.IsNullOrEmpty(item.VolumeControlKey)
|
if (string.IsNullOrEmpty(item.VolumeControlKey)
|
||||||
|| item.VolumeControlKey.Equals("$defaultAudio", StringComparison.OrdinalIgnoreCase))
|
|| item.VolumeControlKey.Equals("$defaultAudio", StringComparison.OrdinalIgnoreCase))
|
||||||
volDev = DefaultVolumeControls;
|
volDev = DefaultVolumeControls;
|
||||||
else if (item.VolumeControlKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase))
|
//else if (item.VolumeControlKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase))
|
||||||
volDev = DefaultDisplay as IBasicVolumeControls;
|
// volDev = DefaultDisplay as IBasicVolumeControls;
|
||||||
// Or a specific device, probably rarely used.
|
// Or a specific device, probably rarely used.
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -717,14 +685,16 @@ namespace PepperDash.Essentials
|
|||||||
// if there is a $defaultAll on route, run two separate
|
// if there is a $defaultAll on route, run two separate
|
||||||
if (route.DestinationKey.Equals("$defaultAll", StringComparison.OrdinalIgnoreCase))
|
if (route.DestinationKey.Equals("$defaultAll", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
// Going to assume a single-path route for now
|
foreach (var display in Displays)
|
||||||
var tempVideo = new SourceRouteListItem
|
|
||||||
{
|
{
|
||||||
DestinationKey = "$defaultDisplay",
|
var tempVideo = new SourceRouteListItem
|
||||||
SourceKey = route.SourceKey,
|
{
|
||||||
Type = eRoutingSignalType.Video
|
DestinationKey = display.Key,
|
||||||
};
|
SourceKey = route.SourceKey,
|
||||||
DoRoute(tempVideo);
|
Type = eRoutingSignalType.Video
|
||||||
|
};
|
||||||
|
DoRoute(tempVideo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DoRoute(route);
|
DoRoute(route);
|
||||||
@@ -740,11 +710,11 @@ namespace PepperDash.Essentials
|
|||||||
IRoutingSink dest = null;
|
IRoutingSink dest = null;
|
||||||
|
|
||||||
if (route.DestinationKey.Equals("$defaultaudio", StringComparison.OrdinalIgnoreCase))
|
if (route.DestinationKey.Equals("$defaultaudio", StringComparison.OrdinalIgnoreCase))
|
||||||
dest = DefaultAudioDevice as IRoutingSinkNoSwitching;
|
dest = DefaultAudioDevice as IRoutingSink;
|
||||||
else if (route.DestinationKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase))
|
//else if (route.DestinationKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase))
|
||||||
dest = DefaultDisplay;
|
// dest = DefaultDisplay;
|
||||||
else
|
else
|
||||||
dest = DeviceManager.GetDeviceForKey(route.DestinationKey) as IRoutingSinkNoSwitching;
|
dest = DeviceManager.GetDeviceForKey(route.DestinationKey) as IRoutingSink;
|
||||||
|
|
||||||
if (dest == null)
|
if (dest == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -306,7 +306,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.DisplayPowerTogglePress, () =>
|
TriList.SetSigFalseAction(UIBoolJoin.DisplayPowerTogglePress, () =>
|
||||||
{
|
{
|
||||||
if (CurrentRoom != null && CurrentRoom.DefaultDisplay is IHasPowerControl)
|
if (CurrentRoom != null && CurrentRoom.DefaultDisplay != null && CurrentRoom.DefaultDisplay is IHasPowerControl)
|
||||||
(CurrentRoom.DefaultDisplay as IHasPowerControl).PowerToggle();
|
(CurrentRoom.DefaultDisplay as IHasPowerControl).PowerToggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -319,7 +319,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.DisplayPowerTogglePress, () =>
|
TriList.SetSigFalseAction(UIBoolJoin.DisplayPowerTogglePress, () =>
|
||||||
{
|
{
|
||||||
if (CurrentRoom != null && CurrentRoom.DefaultDisplay is IHasPowerControl)
|
if (CurrentRoom != null && CurrentRoom.DefaultDisplay != null && CurrentRoom.DefaultDisplay is IHasPowerControl)
|
||||||
(CurrentRoom.DefaultDisplay as IHasPowerControl).PowerToggle();
|
(CurrentRoom.DefaultDisplay as IHasPowerControl).PowerToggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user