diff --git a/Adafruit_Sensor.cpp b/Adafruit_Sensor.cpp index 94aa0b5..4447362 100644 --- a/Adafruit_Sensor.cpp +++ b/Adafruit_Sensor.cpp @@ -94,6 +94,12 @@ void Adafruit_Sensor::printSensorDetails(void) { case SENSOR_TYPE_PM100_ENV: Serial.print(F("Environmental Particulate Matter 100 (ppm)")); break; + case SENSOR_TYPE_GAS_RESISTANCE: + Serial.print(F("Gas Resistance (ohms)")); + break; + case SENSOR_TYPE_UNITLESS_PERCENT: + Serial.print(F("Unitless Percent (%)")); + break; } Serial.println(); diff --git a/Adafruit_Sensor.h b/Adafruit_Sensor.h index 8cb6c97..b83a97b 100644 --- a/Adafruit_Sensor.h +++ b/Adafruit_Sensor.h @@ -77,7 +77,9 @@ typedef enum { SENSOR_TYPE_PM100_STD = (25), SENSOR_TYPE_PM10_ENV = (26), SENSOR_TYPE_PM25_ENV = (27), - SENSOR_TYPE_PM100_ENV = (28) + SENSOR_TYPE_PM100_ENV = (28), + SENSOR_TYPE_GAS_RESISTANCE = (29), + SENSOR_TYPE_UNITLESS_PERCENT = (30) } sensors_type_t; /** struct sensors_vec_s is used to return a vector in a common format. */ @@ -131,7 +133,7 @@ typedef struct { int32_t reserved0; /**< reserved */ int32_t timestamp; /**< time is in milliseconds */ union { - float data[4]; ///< Raw data + float data[4]; ///< Raw data */ sensors_vec_t acceleration; /**< acceleration values are in meter per second per second (m/s^2) */ sensors_vec_t @@ -163,10 +165,13 @@ typedef struct { million (ppm) */ float pm25_env; /**< Environmental Particulate Matter 2.5 in parts per million (ppm) */ - float pm100_env; /**< EnvironmentalParticulate Matter 100 in parts per + float pm100_env; /**< Environmental Particulate Matter 100 in parts per million (ppm) */ - sensors_color_t color; /**< color in RGB component values */ - }; ///< Union for the wide ranges of data we can carry + float gas_resistance; /**< Proportional to the amount of VOC particles in + the air (Ohms) */ + float unitless_percent; /**