From 81dda269a841231a0b335a58e6ecc91c44a9a41a Mon Sep 17 00:00:00 2001 From: Denis-Cosmin Nutiu Date: Sun, 9 Feb 2020 16:37:45 +0200 Subject: [PATCH] NUC-30: Round VOC to two digits --- NucuCar.Sensors/Environment/Bme680Sensor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NucuCar.Sensors/Environment/Bme680Sensor.cs b/NucuCar.Sensors/Environment/Bme680Sensor.cs index 94d1fd3..5f363bd 100644 --- a/NucuCar.Sensors/Environment/Bme680Sensor.cs +++ b/NucuCar.Sensors/Environment/Bme680Sensor.cs @@ -130,7 +130,7 @@ namespace NucuCar.Sensors.Environment _lastMeasurement.Temperature = temp.Celsius; _lastMeasurement.Pressure = pressure.Hectopascal; _lastMeasurement.Humidity = humidity; - _lastMeasurement.VolatileOrganicCompounds = gasResistance; + _lastMeasurement.VolatileOrganicCompounds = Math.Round(gasResistance / 1000, 2); Logger?.LogDebug($"{DateTimeOffset.Now}:BME680: reading"); Logger?.LogInformation(