diff --git a/Adafruit_Sensor.cpp b/Adafruit_Sensor.cpp index 5107a93..b854a5a 100644 --- a/Adafruit_Sensor.cpp +++ b/Adafruit_Sensor.cpp @@ -100,6 +100,9 @@ void Adafruit_Sensor::printSensorDetails(void) { case SENSOR_TYPE_UNITLESS_PERCENT: Serial.print(F("Unitless Percent (%)")); break; + case SENSOR_TYPE_ALTITUDE: + Serial.print(F("Altitude (m)")); + break; } Serial.println(); diff --git a/Adafruit_Sensor.h b/Adafruit_Sensor.h index 1d854fd..8c6a07d 100644 --- a/Adafruit_Sensor.h +++ b/Adafruit_Sensor.h @@ -79,7 +79,8 @@ typedef enum { SENSOR_TYPE_PM25_ENV = (27), SENSOR_TYPE_PM100_ENV = (28), SENSOR_TYPE_GAS_RESISTANCE = (29), - SENSOR_TYPE_UNITLESS_PERCENT = (30) + SENSOR_TYPE_UNITLESS_PERCENT = (30), + SENSOR_TYPE_ALTITUDE = (31) } sensors_type_t; /** struct sensors_vec_s is used to return a vector in a common format. */ @@ -171,7 +172,9 @@ typedef struct { the air (Ohms) */ float unitless_percent; /** maintainer=Adafruit sentence=Required for all Adafruit Unified Sensor based libraries.