mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 21:24:54 +00:00
Merge ecs-665
This commit is contained in:
@@ -16,10 +16,25 @@ namespace PepperDash.Essentials.Devices.Common.Occupancy
|
|||||||
|
|
||||||
public BoolFeedback RoomIsOccupiedFeedback { get; private set; }
|
public BoolFeedback RoomIsOccupiedFeedback { get; private set; }
|
||||||
|
|
||||||
|
public Func<bool> RoomIsOccupiedFeedbackFunc
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return () => OccSensor.OccupancyDetectedFeedback.BoolValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public EssentialsGlsOccupancySensorBaseController(string key, string name, GlsOccupancySensorBase sensor, GlsOccupancySensorConfigurationProperties props)
|
public EssentialsGlsOccupancySensorBaseController(string key, string name, GlsOccupancySensorBase sensor, GlsOccupancySensorConfigurationProperties props)
|
||||||
: base(key, name, sensor)
|
: base(key, name, sensor)
|
||||||
{
|
{
|
||||||
|
OccSensor = sensor;
|
||||||
|
|
||||||
|
OccSensor.GlsOccupancySensorChange += new GlsOccupancySensorChangeEventHandler(sensor_GlsOccupancySensorChange);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sensor_GlsOccupancySensorChange(GlsOccupancySensorBase device, GlsOccupancySensorChangeEventArgs args)
|
||||||
|
{
|
||||||
|
RoomIsOccupiedFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
RunDefaultPresentRoute();
|
RunDefaultPresentRoute();
|
||||||
|
|
||||||
CrestronEnvironment.Sleep(200);
|
CrestronEnvironment.Sleep(1000);
|
||||||
|
|
||||||
RunRouteAction("roomOff");
|
RunRouteAction("roomOff");
|
||||||
}
|
}
|
||||||
@@ -280,7 +280,7 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool RunDefaultPresentRoute()
|
public bool RunDefaultPresentRoute()
|
||||||
{
|
{
|
||||||
if (DefaultSourceItem != null)
|
//if (DefaultSourceItem != null)
|
||||||
RunRouteAction(DefaultSourceItem);
|
RunRouteAction(DefaultSourceItem);
|
||||||
return DefaultSourceItem != null;
|
return DefaultSourceItem != null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,8 +123,11 @@ namespace PepperDash.Essentials
|
|||||||
StartRoomVacancyTimer(eVacancyMode.InShutdownWarning);
|
StartRoomVacancyTimer(eVacancyMode.InShutdownWarning);
|
||||||
break;
|
break;
|
||||||
case eVacancyMode.InShutdownWarning:
|
case eVacancyMode.InShutdownWarning:
|
||||||
|
{
|
||||||
StartShutdown(eShutdownType.Vacancy);
|
StartShutdown(eShutdownType.Vacancy);
|
||||||
|
Debug.Console(0, this, "Shutting Down due to vacancy.");
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -154,6 +157,8 @@ namespace PepperDash.Essentials
|
|||||||
RoomVacancyShutdownTimer.SecondsToCount = RoomVacancyShutdownSeconds;
|
RoomVacancyShutdownTimer.SecondsToCount = RoomVacancyShutdownSeconds;
|
||||||
VacancyMode = mode;
|
VacancyMode = mode;
|
||||||
RoomVacancyShutdownTimer.Start();
|
RoomVacancyShutdownTimer.Start();
|
||||||
|
|
||||||
|
Debug.Console(0, this, "Vacancy Timer Started.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -196,13 +201,15 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
if ((sender as IOccupancyStatusProvider).RoomIsOccupiedFeedback.BoolValue == false)
|
if ((sender as IOccupancyStatusProvider).RoomIsOccupiedFeedback.BoolValue == false)
|
||||||
{
|
{
|
||||||
|
Debug.Console(0, this, "Vacancy Detected");
|
||||||
// Trigger the timer when the room is vacant
|
// Trigger the timer when the room is vacant
|
||||||
StartRoomVacancyTimer(eVacancyMode.InInitialVacancy);
|
StartRoomVacancyTimer(eVacancyMode.InInitialVacancy);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Debug.Console(0, this, "Occupancy Detected");
|
||||||
// Reset the timer when the room is occupied
|
// Reset the timer when the room is occupied
|
||||||
if(RoomVacancyShutdownTimer.IsRunningFeedback.BoolValue)
|
|
||||||
RoomVacancyShutdownTimer.Cancel();
|
RoomVacancyShutdownTimer.Cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -642,12 +642,15 @@ namespace PepperDash.Essentials
|
|||||||
TriList.SetBool(UIBoolJoin.CallStagingBarVisible, false);
|
TriList.SetBool(UIBoolJoin.CallStagingBarVisible, false);
|
||||||
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, true);
|
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, true);
|
||||||
// Run default source when room is off and share is pressed
|
// Run default source when room is off and share is pressed
|
||||||
|
if (!CurrentRoom.OnFeedback.BoolValue)
|
||||||
|
{
|
||||||
if (!CurrentRoom.OnFeedback.BoolValue)
|
if (!CurrentRoom.OnFeedback.BoolValue)
|
||||||
{
|
{
|
||||||
// If there's no default, show UI elements
|
// If there's no default, show UI elements
|
||||||
if (!CurrentRoom.RunDefaultPresentRoute())
|
if (!CurrentRoom.RunDefaultPresentRoute())
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else // room is on show what's active or select a source if nothing is yet active
|
else // room is on show what's active or select a source if nothing is yet active
|
||||||
{
|
{
|
||||||
if(CurrentRoom.CurrentSourceInfo == null || CurrentRoom.CurrentSourceInfoKey == CurrentRoom.DefaultCodecRouteString)
|
if(CurrentRoom.CurrentSourceInfo == null || CurrentRoom.CurrentSourceInfoKey == CurrentRoom.DefaultCodecRouteString)
|
||||||
|
|||||||
BIN
docs/PepperDash Essentials Installation v1.0.x.docx
Normal file
BIN
docs/PepperDash Essentials Installation v1.0.x.docx
Normal file
Binary file not shown.
Reference in New Issue
Block a user