mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-12 03:05:01 +00:00
Renamed Config in Essentials room type classes to PropertiesConfig and modified EssentialsRoomBase to derive from ReconfigurableDevice
This commit is contained in:
@@ -66,7 +66,7 @@ namespace PepperDash.Essentials
|
||||
}
|
||||
}
|
||||
|
||||
public EssentialsRoomPropertiesConfig Config { get; private set; }
|
||||
public EssentialsRoomPropertiesConfig PropertiesConfig { get; private set; }
|
||||
|
||||
public IRoutingSinkWithSwitching DefaultDisplay { get; private set; }
|
||||
public IRoutingSinkNoSwitching DefaultAudioDevice { get; private set; }
|
||||
@@ -156,7 +156,7 @@ namespace PepperDash.Essentials
|
||||
IRoutingSinkNoSwitching defaultAudio, EssentialsRoomPropertiesConfig config)
|
||||
: base(key, name)
|
||||
{
|
||||
Config = config;
|
||||
PropertiesConfig = config;
|
||||
DefaultDisplay = defaultDisplay;
|
||||
DefaultAudioDevice = defaultAudio;
|
||||
if (defaultAudio is IBasicVolumeControls)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,6 +7,7 @@ using Crestron.SimplSharp.Scheduler;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Devices;
|
||||
using PepperDash.Essentials.Devices.Common.Occupancy;
|
||||
|
||||
namespace PepperDash.Essentials
|
||||
@@ -14,7 +15,7 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public abstract class EssentialsRoomBase : Device
|
||||
public abstract class EssentialsRoomBase : ReconfigurableDevice
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
@@ -80,12 +81,9 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
public bool ZeroVolumeWhenSwtichingVolumeDevices { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="name"></param>
|
||||
public EssentialsRoomBase(string key, string name) : base(key, name)
|
||||
|
||||
public EssentialsRoomBase(DeviceConfig config)
|
||||
: base(config)
|
||||
{
|
||||
// Setup the ShutdownPromptTimer
|
||||
ShutdownPromptTimer = new SecondsCountdownTimer(Key + "-offTimer");
|
||||
@@ -124,6 +122,50 @@ namespace PepperDash.Essentials
|
||||
});
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
/////
|
||||
///// </summary>
|
||||
///// <param name="key"></param>
|
||||
///// <param name="name"></param>
|
||||
//public EssentialsRoomBase(string key, string name) : base(key, name)
|
||||
//{
|
||||
// // Setup the ShutdownPromptTimer
|
||||
// ShutdownPromptTimer = new SecondsCountdownTimer(Key + "-offTimer");
|
||||
// ShutdownPromptTimer.IsRunningFeedback.OutputChange += (o, a) =>
|
||||
// {
|
||||
// if (!ShutdownPromptTimer.IsRunningFeedback.BoolValue)
|
||||
// ShutdownType = eShutdownType.None;
|
||||
// };
|
||||
// ShutdownPromptTimer.HasFinished += (o, a) => Shutdown(); // Shutdown is triggered
|
||||
|
||||
// ShutdownPromptSeconds = 60;
|
||||
// ShutdownVacancySeconds = 120;
|
||||
// ShutdownType = eShutdownType.None;
|
||||
|
||||
// RoomVacancyShutdownTimer = new SecondsCountdownTimer(Key + "-vacancyOffTimer");
|
||||
// //RoomVacancyShutdownTimer.IsRunningFeedback.OutputChange += (o, a) =>
|
||||
// //{
|
||||
// // if (!RoomVacancyShutdownTimer.IsRunningFeedback.BoolValue)
|
||||
// // ShutdownType = ShutdownType.Vacancy;
|
||||
// //};
|
||||
// RoomVacancyShutdownTimer.HasFinished += new EventHandler<EventArgs>(RoomVacancyShutdownPromptTimer_HasFinished); // Shutdown is triggered
|
||||
|
||||
// RoomVacancyShutdownPromptSeconds = 1500; // 25 min to prompt warning
|
||||
// RoomVacancyShutdownSeconds = 240; // 4 min after prompt will trigger shutdown prompt
|
||||
// VacancyMode = eVacancyMode.None;
|
||||
|
||||
// OnFeedback = new BoolFeedback(OnFeedbackFunc);
|
||||
|
||||
// IsWarmingUpFeedback = new BoolFeedback(IsWarmingFeedbackFunc);
|
||||
// IsCoolingDownFeedback = new BoolFeedback(IsCoolingFeedbackFunc);
|
||||
|
||||
// AddPostActivationAction(() =>
|
||||
// {
|
||||
// if (RoomOccupancy != null)
|
||||
// OnRoomOccupancyIsSet();
|
||||
// });
|
||||
//}
|
||||
|
||||
void RoomVacancyShutdownPromptTimer_HasFinished(object sender, EventArgs e)
|
||||
{
|
||||
switch (VacancyMode)
|
||||
|
||||
Reference in New Issue
Block a user