mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 05:05:00 +00:00
#753 Updates some of the Funcs
This commit is contained in:
@@ -75,9 +75,18 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
return () =>
|
return () =>
|
||||||
{
|
{
|
||||||
var disp = DefaultDisplay as DisplayBase;
|
var displays = Displays.Where((d) => d is TwoWayDisplayBase) as List<TwoWayDisplayBase>;
|
||||||
if (disp != null)
|
if (displays != null)
|
||||||
return disp.IsWarmingUpFeedback.BoolValue;
|
{
|
||||||
|
var warmingDisplays = displays.Where((d) => d.IsWarmingUpFeedback.BoolValue);
|
||||||
|
|
||||||
|
if (warmingDisplays.Count() > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
@@ -92,9 +101,18 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
return () =>
|
return () =>
|
||||||
{
|
{
|
||||||
var disp = DefaultDisplay as DisplayBase;
|
var displays = Displays.Where((d) => d is TwoWayDisplayBase) as List<TwoWayDisplayBase>;
|
||||||
if (disp != null)
|
if (displays != null)
|
||||||
return disp.IsCoolingDownFeedback.BoolValue;
|
{
|
||||||
|
var coolingDisplays = displays.Where((d) => d.IsCoolingDownFeedback.BoolValue);
|
||||||
|
|
||||||
|
if (coolingDisplays.Count() > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
@@ -307,6 +325,53 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
//DefaultDisplay = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultDisplayKey) as IRoutingSinkWithSwitching;
|
//DefaultDisplay = DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultDisplayKey) as IRoutingSinkWithSwitching;
|
||||||
|
|
||||||
|
var destinationList = ConfigReader.ConfigObject.DestinationLists[PropertiesConfig.DestinationListKey];
|
||||||
|
|
||||||
|
foreach (var destination in destinationList)
|
||||||
|
{
|
||||||
|
var dest = destination.Value.SinkDevice as IRoutingSinkWithSwitching;
|
||||||
|
|
||||||
|
if (dest != null)
|
||||||
|
{
|
||||||
|
Displays.Add(dest);
|
||||||
|
}
|
||||||
|
|
||||||
|
var display = dest as DisplayBase;
|
||||||
|
if (display != null)
|
||||||
|
{
|
||||||
|
// Link power, warming, cooling to display
|
||||||
|
var dispTwoWay = display 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();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
display.IsWarmingUpFeedback.OutputChange += (o, a) =>
|
||||||
|
{
|
||||||
|
IsWarmingUpFeedback.FireUpdate();
|
||||||
|
if (!IsWarmingUpFeedback.BoolValue)
|
||||||
|
(CurrentVolumeControls as IBasicVolumeWithFeedback).SetVolume(DefaultVolume);
|
||||||
|
};
|
||||||
|
display.IsCoolingDownFeedback.OutputChange += (o, a) =>
|
||||||
|
{
|
||||||
|
IsCoolingDownFeedback.FireUpdate();
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var disp = DefaultDisplay as DisplayBase;
|
var disp = DefaultDisplay as DisplayBase;
|
||||||
if (disp != null)
|
if (disp != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
EssentialsConferenceRoomPropertiesConfig PropertiesConfig { get; }
|
EssentialsConferenceRoomPropertiesConfig PropertiesConfig { get; }
|
||||||
|
|
||||||
|
bool ExcludeFromGlobalFunctions { get; }
|
||||||
|
|
||||||
void RunRouteAction(string routeKey);
|
void RunRouteAction(string routeKey);
|
||||||
|
|
||||||
IHasScheduleAwareness ScheduleSource { get; }
|
IHasScheduleAwareness ScheduleSource { get; }
|
||||||
|
|||||||
Reference in New Issue
Block a user