public EmployeeManager(ILedControl ledControl, IParamConfig paramConfig, ILogService logService) { _ledControl = ledControl; _paramConfig = paramConfig; _logService = logService; Thresholds thresholds = _paramConfig.ReadThresholds(); ManagerSensors.Add(ESensorType.PressureSensor, new SensorStatus(thresholds.PsLow, thresholds.PsHigh)); ManagerSensors.Add(ESensorType.DistanceMeter1, new SensorStatus(thresholds.Dm1Low, thresholds.Dm1High)); ManagerSensors.Add(ESensorType.DistanceMeter2, new SensorStatus(thresholds.Dm2Low, thresholds.Dm2High)); ManagerSensors.Add(ESensorType.EmployeeCardReader, new SensorStatus(0, 0)); _lastExitTime = lastEntryTime = lastWashTime = DateTime.Now; // init time references // _logService.SerializeObjectAndSendToDb(new ManInTheRoom()); }
public RoomWashManager2ProxSensors(ILedControl ledControl, IParamConfig paramConfig) { _ledControl = ledControl; _paramConfig = paramConfig; _ledControl.Connect(); _ledControl.TurnOn(); _ledControl.ChangeColor(69, 69, 69); Thresholds thresholds = _paramConfig.ReadThresholds(); ManagerSensors.Add(ESensorType.PressureSensor, new SensorStatus(thresholds.PsLow, thresholds.PsHigh)); ManagerSensors.Add(ESensorType.DistanceMeter1, new SensorStatus(thresholds.Dm1Low, thresholds.Dm1High)); ManagerSensors.Add(ESensorType.DistanceMeter2, new SensorStatus(thresholds.Dm2Low, thresholds.Dm2High)); ManagerSensors.Add(ESensorType.EmployeeCardReader, new SensorStatus(0, 0)); _lastExitTime = lastEntryTime = lastWashTime = DateTime.Now; // init time references }