summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2011-05-18 16:40:03 -0700
committerJean-Baptiste Queru <jbq@google.com>2011-05-18 16:40:03 -0700
commit6e17d2c46caad76497da1070efd41481b0f40b27 (patch)
treed524572718883047d3e4a650301dfa29b90fabfe
parent128d102f3864fffa1257362d317427f573f97053 (diff)
parent48e4ab6b747e543a9e5e8152c15a3311af5c6c14 (diff)
downloadhardware_libhardware-6e17d2c46caad76497da1070efd41481b0f40b27.zip
hardware_libhardware-6e17d2c46caad76497da1070efd41481b0f40b27.tar.gz
hardware_libhardware-6e17d2c46caad76497da1070efd41481b0f40b27.tar.bz2
Merge 48e4ab6b7
Change-Id: Ie034418055ed9b10608e06fd6e35d64bddb73598
-rw-r--r--include/hardware/sensors.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/hardware/sensors.h b/include/hardware/sensors.h
index 9c2aa2a..7819a71 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
#define SENSOR_TYPE_AMBIENT_TEMPERATURE 13
/**
@@ -287,6 +288,17 @@ __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.
+ *
+ *
* Ambient Temperature
* -------------------
*
@@ -361,6 +373,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;