Added occupacy debug console messages and linked crestron sensor event to generic interface event

This commit is contained in:
Neil Dorin
2018-01-18 06:51:27 -07:00
parent 3c256564c6
commit 2ee365447c
5 changed files with 26 additions and 4 deletions

View File

@@ -4,5 +4,5 @@
[assembly: AssemblyCompany("PepperDash Technology Corp")]
[assembly: AssemblyProduct("PepperDashEssentials")]
[assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2017")]
[assembly: AssemblyVersion("1.0.17.*")]
[assembly: AssemblyVersion("1.0.18.*")]

View File

@@ -123,8 +123,11 @@ namespace PepperDash.Essentials
StartRoomVacancyTimer(eVacancyMode.InShutdownWarning);
break;
case eVacancyMode.InShutdownWarning:
StartShutdown(eShutdownType.Vacancy);
break;
{
StartShutdown(eShutdownType.Vacancy);
Debug.Console(0, this, "Shutting Down due to vacancy.");
break;
}
default:
break;
}
@@ -154,6 +157,8 @@ namespace PepperDash.Essentials
RoomVacancyShutdownTimer.SecondsToCount = RoomVacancyShutdownSeconds;
VacancyMode = mode;
RoomVacancyShutdownTimer.Start();
Debug.Console(0, this, "Vacancy Timer Started.");
}
/// <summary>
@@ -196,13 +201,15 @@ namespace PepperDash.Essentials
{
if ((sender as IOccupancyStatusProvider).RoomIsOccupiedFeedback.BoolValue == false)
{
Debug.Console(0, this, "Vacancy Detected");
// Trigger the timer when the room is vacant
StartRoomVacancyTimer(eVacancyMode.InInitialVacancy);
}
else
{
Debug.Console(0, this, "Occupancy Detected");
// Reset the timer when the room is occupied
if(RoomVacancyShutdownTimer.IsRunningFeedback.BoolValue)
RoomVacancyShutdownTimer.Cancel();
}
}