Finished GlsOccupancySensorBaseControllerBridge to handle both single and dual technology sensors.

This commit is contained in:
Neil Dorin
2019-09-17 11:12:00 -06:00
parent 1257dde4ce
commit c7b813447c
3 changed files with 70 additions and 11 deletions

View File

@@ -348,12 +348,10 @@ namespace PepperDash.Essentials.Devices.Common
{
var comm = CommFactory.GetControlPropertiesConfig(dc);
GlsOccupancySensorBase occSensor = null;
occSensor = new GlsOdtCCn(comm.CresnetIdInt, Global.ControlSystem);
var occSensor = new GlsOdtCCn(comm.CresnetIdInt, Global.ControlSystem);
if (occSensor != null)
return new GlsOccupancySensorBaseController(key, name, occSensor);
return new GlsOdtOccupancySensorController(key, name, occSensor);
else
Debug.Console(0, "ERROR: Unable to create Occupancy Sensor Device. Key: '{0}'", key);
}