mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-11 02:35:00 +00:00
Merge branch 'development' into feature/ecs-1209
# Conflicts: # PepperDashEssentials/Room/Types/EssentialsHuddleSpaceRoom.cs # PepperDashEssentials/Room/Types/EssentialsHuddleVtc1Room.cs # essentials-framework/Essentials Devices Common/Essentials Devices Common/DSP/DspBase.cs # essentials-framework/Essentials Devices Common/Essentials Devices Common/Power Controllers/Digitallogger.cs
This commit is contained in:
@@ -100,7 +100,8 @@ namespace PepperDash.Essentials.Core
|
||||
ShutdownPromptTimer.HasFinished += (o, a) => Shutdown(); // Shutdown is triggered
|
||||
|
||||
ShutdownPromptSeconds = 60;
|
||||
ShutdownVacancySeconds = 120;
|
||||
ShutdownVacancySeconds = 120;
|
||||
|
||||
ShutdownType = eShutdownType.None;
|
||||
|
||||
RoomVacancyShutdownTimer = new SecondsCountdownTimer(Key + "-vacancyOffTimer");
|
||||
@@ -140,7 +141,7 @@ namespace PepperDash.Essentials.Core
|
||||
case eVacancyMode.InShutdownWarning:
|
||||
{
|
||||
StartShutdown(eShutdownType.Vacancy);
|
||||
Debug.Console(0, this, "Shutting Down due to vacancy.");
|
||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Shutting Down due to vacancy.");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -163,7 +164,7 @@ namespace PepperDash.Essentials.Core
|
||||
ShutdownType = type;
|
||||
ShutdownPromptTimer.Start();
|
||||
|
||||
Debug.Console(0, this, "ShutdwonPromptTimer Started. Type: {0}. Seconds: {1}", ShutdownType, ShutdownPromptTimer.SecondsToCount);
|
||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "ShutdownPromptTimer Started. Type: {0}. Seconds: {1}", ShutdownType, ShutdownPromptTimer.SecondsToCount);
|
||||
}
|
||||
|
||||
public void StartRoomVacancyTimer(eVacancyMode mode)
|
||||
@@ -177,7 +178,7 @@ namespace PepperDash.Essentials.Core
|
||||
VacancyMode = mode;
|
||||
RoomVacancyShutdownTimer.Start();
|
||||
|
||||
Debug.Console(0, this, "Vacancy Timer Started. Mode: {0}. Seconds: {1}", VacancyMode, RoomVacancyShutdownTimer.SecondsToCount);
|
||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Vacancy Timer Started. Mode: {0}. Seconds: {1}", VacancyMode, RoomVacancyShutdownTimer.SecondsToCount);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -213,6 +214,9 @@ namespace PepperDash.Essentials.Core
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Room Occupancy set to device: '{0}'", (statusProvider as Device).Key);
|
||||
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 Core.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase)
|
||||
OccupancyStatusProviderIsRemote = true;
|
||||
@@ -220,16 +224,14 @@ namespace PepperDash.Essentials.Core
|
||||
if(timeoutMinutes > 0)
|
||||
RoomVacancyShutdownSeconds = timeoutMinutes * 60;
|
||||
|
||||
Debug.Console(1, this, "RoomVacancyShutdownSeconds set to {0}", RoomVacancyShutdownSeconds);
|
||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "RoomVacancyShutdownSeconds set to {0}", RoomVacancyShutdownSeconds);
|
||||
|
||||
RoomOccupancy = statusProvider;
|
||||
|
||||
OnRoomOccupancyIsSet();
|
||||
|
||||
RoomOccupancy.RoomIsOccupiedFeedback.OutputChange -= RoomIsOccupiedFeedback_OutputChange;
|
||||
RoomOccupancy.RoomIsOccupiedFeedback.OutputChange += RoomIsOccupiedFeedback_OutputChange;
|
||||
|
||||
Debug.Console(0, this, "Room Occupancy set to device: '{0}'", (statusProvider as Device).Key);
|
||||
OnRoomOccupancyIsSet();
|
||||
}
|
||||
|
||||
void OnRoomOccupancyIsSet()
|
||||
@@ -254,13 +256,13 @@ namespace PepperDash.Essentials.Core
|
||||
{
|
||||
if (RoomOccupancy.RoomIsOccupiedFeedback.BoolValue == false)
|
||||
{
|
||||
Debug.Console(1, this, "Notice: Vacancy Detected");
|
||||
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Notice: Vacancy Detected");
|
||||
// Trigger the timer when the room is vacant
|
||||
StartRoomVacancyTimer(eVacancyMode.InInitialVacancy);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(1, this, "Notice: Occupancy Detected");
|
||||
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Notice: Occupancy Detected");
|
||||
// Reset the timer when the room is occupied
|
||||
RoomVacancyShutdownTimer.Cancel();
|
||||
}
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash.Essentials
|
||||
{
|
||||
public static class RoomCue
|
||||
{
|
||||
// Commands/
|
||||
//bools
|
||||
public static readonly Cue RoomOnToggle = Cue.BoolCue("RoomOnToggle", 2001);
|
||||
public static readonly Cue RoomOn = Cue.BoolCue("RoomOn", 2002);
|
||||
public static readonly Cue RoomOff = Cue.BoolCue("RoomOff", 2003);
|
||||
public static readonly Cue VolumeUp = Cue.BoolCue("VolumeUp", 2011);
|
||||
public static readonly Cue VolumeDown = Cue.BoolCue("VolumeDown", 2012);
|
||||
public static readonly Cue VolumeDefault = Cue.BoolCue("VolumeDefault", 2013);
|
||||
public static readonly Cue MuteToggle = Cue.BoolCue("MuteToggle", 2014);
|
||||
public static readonly Cue MuteOn = Cue.BoolCue("MuteOn", 2015);
|
||||
public static readonly Cue MuteOff = Cue.BoolCue("MuteOff", 2016);
|
||||
|
||||
//ushorts
|
||||
public static readonly Cue SelectSourceByNumber = Cue.UShortCue("SelectSourceByNumber", 2001);
|
||||
public static readonly Cue VolumeLevel = Cue.UShortCue("VolumeLevel", 2011);
|
||||
public static readonly Cue VolumeLevelPercent = Cue.UShortCue("VolumeLevelPercent", 2012);
|
||||
|
||||
//strings
|
||||
public static readonly Cue SelectSourceByKey = Cue.StringCue("SelectSourceByKey", 2001);
|
||||
|
||||
// Outputs
|
||||
//Bools
|
||||
public static readonly Cue RoomIsOn = Cue.BoolCue("RoomIsOn", 2002);
|
||||
public static readonly Cue RoomIsOnStandby = Cue.BoolCue("RoomIsOnStandby", 2003);
|
||||
public static readonly Cue RoomIsWarmingUp = Cue.BoolCue("RoomIsWarmingUp", 2004);
|
||||
public static readonly Cue RoomIsCoolingDown = Cue.BoolCue("RoomIsCoolingDown", 2005);
|
||||
public static readonly Cue RoomIsOccupied = Cue.BoolCue("RoomIsOccupied", 2006);
|
||||
|
||||
//Ushorts
|
||||
public static readonly Cue SourcesCount = Cue.UShortCue("SourcesCount", 2001);
|
||||
public static readonly Cue CurrentSourceNumber = Cue.UShortCue("CurrentSourceNumber", 2002);
|
||||
public static readonly Cue CurrentSourceType = Cue.UShortCue("CurrentSourceType", 2003);
|
||||
|
||||
//Strings
|
||||
public static readonly Cue CurrentSourceKey = Cue.StringCue("CurrentSourceKey", 2001);
|
||||
public static readonly Cue CurrentSourceName = Cue.StringCue("CurrentSourceName", 2002);
|
||||
|
||||
public static readonly Cue VolumeLevelText = Cue.StringCue("VolumeLevelText", 2012);
|
||||
|
||||
public static readonly Cue Key = Cue.StringCue("RoomKey", 2021);
|
||||
public static readonly Cue Name = Cue.StringCue("RoomName", 2022);
|
||||
public static readonly Cue Description = Cue.StringCue("Description", 2023);
|
||||
public static readonly Cue HelpMessage = Cue.StringCue("HelpMessage", 2024);
|
||||
|
||||
//Special
|
||||
public static readonly Cue Source = new Cue("Source", 0, eCueType.Other);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user