Corrects issue where "new" GlsOdtCCn OccSensor needed to be assigned in GlsOdtOccupancySensorController constructor for adiditional feedbacks to work correctly and not throw null ref exceptions.

This commit is contained in:
Neil Dorin
2019-11-19 14:50:40 -07:00
parent 6c7bc1a24e
commit f44bde2d83
2 changed files with 7 additions and 5 deletions

View File

@@ -30,6 +30,8 @@ namespace PepperDash.Essentials.Devices.Common.Occupancy
public GlsOdtOccupancySensorController(string key, string name, GlsOdtCCn sensor)
: base(key, name, sensor)
{
OccSensor = sensor;
AndWhenVacatedFeedback = new BoolFeedback(() => OccSensor.AndWhenVacatedFeedback.BoolValue);
OrWhenVacatedFeedback = new BoolFeedback(() => OccSensor.OrWhenVacatedFeedback.BoolValue);