Added Activate cycle try/catch for individual devices; added test abilities to feedbacks

This commit is contained in:
Heath Volmer
2018-01-22 14:53:09 -07:00
parent cb41b31018
commit b7bab6cfd1
15 changed files with 112 additions and 57113 deletions

View File

@@ -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())

View File

@@ -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;
}
}