protected void InitializeHealthMonitor(int pi2GpioPinWithLed)
        {
            var pi2PortController = new Pi2PortController();
            var ledPin            = pi2PortController.GetOutput(pi2GpioPinWithLed);

            _healthMonitor = new HealthMonitor(ledPin, Timer, HttpApiController);
        }
Beispiel #2
0
        private void InitializeHealthMonitor()
        {
            IBinaryOutput ledPin = null;

            if (_statusLedNumber.HasValue)
            {
                var pi2PortController = new Pi2PortController();
                ledPin = pi2PortController.GetOutput(_statusLedNumber.Value);
            }

            ServiceLocator.RegisterService(typeof(HealthService), new HealthService(ledPin, Timer, ServiceLocator.GetService <ISystemInformationService>()));
        }