Ejemplo n.º 1
0
        public IRControlService(IIRSlingerCsharp irService, IACDeviceService acDeviceService, IHostDeviceService hostDeviceService)
        {
            _irService = irService;

            _currentAcDevice = acDeviceService.GetCurrentDevice();
            _hostDevice      = hostDeviceService.GetCurrentDevice();
        }
Ejemplo n.º 2
0
        public CodeRecordingService(IACDeviceService acDeviceService, IHostDeviceService hostDeviceService, ILogger <CodeRecordingService> logger)
        {
            _logger          = logger;
            _currentAcDevice = acDeviceService.GetCurrentDevice();
            var currentRaspberryPiDevice = hostDeviceService.GetCurrentDevice();

            try
            {
                _inputPin         = Pi.Gpio.Pins.Single(x => x.HeaderPinNumber == currentRaspberryPiDevice.BoardInPin);
                _inputPin.PinMode = GpioPinDriveMode.Input;
            }
            catch (Exception e)
            {
                _logger.LogError(e.Message);
                _logger.LogError(e.InnerException.InnerException.Message);
            }
        }
Ejemplo n.º 3
0
        public ACScheduleService(IACScheduleRepository scheduleRepository, IACStateControlService stateControlService, IACDeviceService acDeviceService, ILogger <ACScheduleService> logger)
        {
            _acStateControlService = stateControlService;
            _logger             = logger;
            _scheduleRepository = scheduleRepository;
            _currentAcDevice    = acDeviceService.GetCurrentDevice();

            try
            {
                if (_isFirstInstance)
                {
                    RegisterAllSchedulesFromRepository();
                }
                _isFirstInstance = false;
            }
            catch (CurrentACDeviceNotSetException) { }
        }
Ejemplo n.º 4
0
 public ACDeviceController(IACDeviceService acDeviceService, ILogger <ACDeviceController> logger)
 {
     _acDeviceService = acDeviceService;
     _logger          = logger;
 }
 public ACStateControlService(IIRControlService irControlService, IACDeviceService acDeviceService)
 {
     _irControlService = irControlService;
     _currentAcDevice  = acDeviceService.GetCurrentDevice();
 }
Ejemplo n.º 6
0
 public ACSettingsService(IACDeviceService acDeviceService, ICodeRecordingService codeRecordingService)
 {
     _codeRecordingService = codeRecordingService;
     _currentAcDevice      = acDeviceService.GetCurrentDevice();
 }