summaryrefslogtreecommitdiffstats
path: root/include/hardware/sensors.h
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2011-05-18 15:15:48 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-05-18 15:15:48 -0700
commit48e4ab6b747e543a9e5e8152c15a3311af5c6c14 (patch)
treea4afda59d8fd5e3a6f2105d27031d7047236f791 /include/hardware/sensors.h
parent61b16262441607f1ecee6dd087246302c6889a39 (diff)
parent83eb0af000c80bc9d9b2a19eb15ab22bb0dddb1b (diff)
downloadhardware_libhardware-48e4ab6b747e543a9e5e8152c15a3311af5c6c14.zip
hardware_libhardware-48e4ab6b747e543a9e5e8152c15a3311af5c6c14.tar.gz
hardware_libhardware-48e4ab6b747e543a9e5e8152c15a3311af5c6c14.tar.bz2
am 83eb0af0: Merge "support humidity sensor type"
* commit '83eb0af000c80bc9d9b2a19eb15ab22bb0dddb1b': support humidity sensor type
Diffstat (limited to 'include/hardware/sensors.h')
-rw-r--r--include/hardware/sensors.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/hardware/sensors.h b/include/hardware/sensors.h
index 04768a0..1dcd5fa 100644
--- a/include/hardware/sensors.h
+++ b/include/hardware/sensors.h
@@ -61,6 +61,7 @@ __BEGIN_DECLS
#define SENSOR_TYPE_GRAVITY 9
#define SENSOR_TYPE_LINEAR_ACCELERATION 10
#define SENSOR_TYPE_ROTATION_VECTOR 11
+#define SENSOR_TYPE_RELATIVE_HUMIDITY 12
/**
* Values returned by the accelerometer in various locations in the universe.
@@ -274,6 +275,14 @@ __BEGIN_DECLS
* sensors_event_t.data[2] = z*sin(theta/2)
* sensors_event_t.data[3] = cos(theta/2)
*
+ * Relative Humidity
+ * -----------------
+ *
+ * A relative humidity sensor measures relative ambient air humidity and
+ * returns a value in percent.
+ *
+ * Relative humidity sensors report a value only when it changes and each
+ * time the sensor is enabled. setDelay() is ignored.
*/
typedef struct {
@@ -340,6 +349,9 @@ typedef struct sensors_event_t {
/* pressure in hectopascal (hPa) */
float pressure;
+
+ /* relative humidity in percent */
+ float relative_humidity;
};
uint32_t reserved1[4];
} sensors_event_t;