NucuCar/NucuCar.Sensors/Modules/Environment/Bme680Worker.cs

18 lines
586 B
C#
Raw Normal View History

2019-11-09 13:34:49 +00:00
using Microsoft.Extensions.Logging;
2021-04-24 18:44:54 +00:00
using Microsoft.Extensions.Options;
2020-08-01 15:07:13 +00:00
using NucuCar.Sensors.Abstractions;
2019-11-09 13:34:49 +00:00
namespace NucuCar.Sensors.Modules.Environment
2019-11-09 13:34:49 +00:00
{
public class Bme680Worker : SensorWorker
2019-11-09 13:34:49 +00:00
{
2021-04-24 18:44:54 +00:00
public Bme680Worker(ILogger<Bme680Worker> logger, Telemetry.Telemetry telemetry, ISensor<Bme680Sensor> sensor,
IOptions<Bme680Config> options)
2019-11-09 13:34:49 +00:00
{
Logger = logger;
2021-04-24 18:44:54 +00:00
MeasurementInterval = options.Value.MeasurementInterval;
TelemetryPublisher = telemetry.Publisher;
Sensor = sensor.Object;
2019-11-09 13:34:49 +00:00
}
}
}