mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-12 19:24:53 +00:00
Added Activate cycle try/catch for individual devices; added test abilities to feedbacks
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user