File tree 4 files changed +11
-3
lines changed 4 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,9 @@ void Adafruit_Sensor::printSensorDetails(void) {
100
100
case SENSOR_TYPE_UNITLESS_PERCENT:
101
101
Serial.print (F (" Unitless Percent (%)" ));
102
102
break ;
103
+ case SENSOR_TYPE_ALTITUDE:
104
+ Serial.print (F (" Altitude (m)" ));
105
+ break ;
103
106
}
104
107
105
108
Serial.println ();
Original file line number Diff line number Diff line change @@ -79,7 +79,8 @@ typedef enum {
79
79
SENSOR_TYPE_PM25_ENV = (27 ),
80
80
SENSOR_TYPE_PM100_ENV = (28 ),
81
81
SENSOR_TYPE_GAS_RESISTANCE = (29 ),
82
- SENSOR_TYPE_UNITLESS_PERCENT = (30 )
82
+ SENSOR_TYPE_UNITLESS_PERCENT = (30 ),
83
+ SENSOR_TYPE_ALTITUDE = (31 )
83
84
} sensors_type_t ;
84
85
85
86
/* * struct sensors_vec_s is used to return a vector in a common format. */
@@ -171,6 +172,7 @@ typedef struct {
171
172
the air (Ohms) */
172
173
float unitless_percent; /* *<Percentage, unit-less (%) */
173
174
sensors_color_t color; /* *< color in RGB component values */
175
+ float altitude; /* *< Distance between a reference datum and a point or object, in meters. */
174
176
}; // /< Union for the wide ranges of data we can carry
175
177
} sensors_event_t ;
176
178
Original file line number Diff line number Diff line change @@ -87,7 +87,8 @@ typedef enum
87
87
SENSOR_TYPE_PM25_ENV = (27),
88
88
SENSOR_TYPE_PM100_ENV = (28),
89
89
SENSOR_TYPE_GAS_RESISTANCE = (29),
90
- SENSOR_TYPE_UNITLESS_PERCENT = (30)
90
+ SENSOR_TYPE_UNITLESS_PERCENT = (30),
91
+ SENSOR_TYPE_ALTITUDE = (31),
91
92
} sensors_type_t ;
92
93
```
93
94
@@ -163,6 +164,7 @@ typedef struct
163
164
float pm100_env,
164
165
float gas_resistance,
165
166
float unitless_percent,
167
+ float altitude,
166
168
sensors_color_t color;
167
169
};
168
170
} sensors_event_t ;
@@ -218,6 +220,7 @@ A key part of the abstraction layer is the standardization of values on SI units
218
220
- ** pm100_env** : values are in ** parts per million** (ppm)
219
221
- ** gas_resistance** : values are in ** ohms**
220
222
- ** unitless_percent** : values are in ** %**
223
+ - ** altitude** : values are in ** meters** (m)
221
224
222
225
## The Unified Driver Abstraction Layer in Practice ##
223
226
Original file line number Diff line number Diff line change 1
1
name =Adafruit Unified Sensor
2
- version =1.1.11
2
+ version =1.1.12
3
3
author =Adafruit <info@adafruit.com>
4
4
maintainer =Adafruit <info@adafruit.com>
5
5
sentence =Required for all Adafruit Unified Sensor based libraries.
You can’t perform that action at this time.
0 commit comments