Exemplo n.º 1
0
        public override void Run()
        {
            var results = new RaspberryIRDotNet.DeviceAssessment.DeviceAssessor().AssessAll();

            foreach (var result in results)
            {
                result.WriteToString(Console.WriteLine);
                Console.WriteLine();
            }
        }
        public Task StartAsync(CancellationToken cancellationToken)
        {
            _logger.LogDebug("Start request.");

            string irDevice = Program.Config.GeneralConfig.IRTXDevice;

            if (string.IsNullOrEmpty(irDevice))
            {
                irDevice = new RaspberryIRDotNet.DeviceAssessment.DeviceAssessor().GetPathToTheTransmitterDevice();
            }
            _irInterface.TransmissionDevice = irDevice;
            _logger.LogInformation($"IR transmission device: {irDevice}");

            return(Task.CompletedTask);
        }