mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 03:57:27 +00:00
Added Activate cycle try/catch for individual devices; added test abilities to feedbacks
This commit is contained in:
parent
cb41b31018
commit
b7bab6cfd1
15 changed files with 112 additions and 57113 deletions
|
|
@ -300,7 +300,7 @@ namespace PepperDash.Essentials.Devices.Common
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(0, "ERROR:Unable to convert Crestnet ID: {0} to hex. Error:\n{1}", props.CresnetId, e);
|
||||
Debug.Console(0, "ERROR:Unable to convert Cresnet ID: {0} to hex. Error:\n{1}", props.CresnetId, e);
|
||||
}
|
||||
|
||||
switch (props.Model.ToLower())
|
||||
|
|
|
|||
|
|
@ -16,11 +16,18 @@ namespace PepperDash.Essentials.Devices.Common.Occupancy
|
|||
|
||||
public BoolFeedback RoomIsOccupiedFeedback { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Set by debugging functions
|
||||
/// </summary>
|
||||
public bool InMockMode { get; private set; }
|
||||
|
||||
public bool MockRoomIsOccupiedFeedback { get; private set; }
|
||||
|
||||
public Func<bool> RoomIsOccupiedFeedbackFunc
|
||||
{
|
||||
get
|
||||
{
|
||||
return () => OccSensor.OccupancyDetectedFeedback.BoolValue;
|
||||
return () => InMockMode ? MockRoomIsOccupiedFeedback : OccSensor.OccupancyDetectedFeedback.BoolValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue