From d3d2fd776bd709cd92f9f68caa51df8cdfcf1fa2 Mon Sep 17 00:00:00 2001 From: tyeth Date: Tue, 20 Dec 2022 17:25:10 +0000 Subject: [PATCH] change indexes to floats --- Adafruit_Sensor.h | 7 ++++--- README.md | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Adafruit_Sensor.h b/Adafruit_Sensor.h index c18489f..b0169d8 100755 --- a/Adafruit_Sensor.h +++ b/Adafruit_Sensor.h @@ -138,9 +138,10 @@ typedef struct { float current; /**< current in milliamps (mA) */ float voltage; /**< voltage in volts (V) */ float tvoc; /**< Total Volatile Organic Compounds, in ppb */ - int32_t voc_index; /**< VOC (Volatile Organic Compound) index where 100 is - normal */ - int32_t nox_index; /**< NOx (Nitrogen Oxides) index where 100 is normal */ + float voc_index; /**< VOC (Volatile Organic Compound) index where 100 is + normal (unitless) */ + float nox_index; /**< NOx (Nitrogen Oxides) index where 100 is normal + (unitless) */ sensors_color_t color; /**< color in RGB component values */ }; ///< Union for the wide ranges of data we can carry } sensors_event_t; diff --git a/README.md b/README.md index 293bd4b..1e87bed 100644 --- a/README.md +++ b/README.md @@ -141,8 +141,8 @@ typedef struct float current; float voltage; float tvoc; - int32_t voc_index; - int32_t nox_index; + float voc_index; + float nox_index; sensors_color_t color; }; } sensors_event_t;