summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEtienne Le Grand <etn@google.com>2014-05-27 18:02:49 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-27 18:02:49 +0000
commit9dcd38ad3b8335308b59932718e3f145aa50d318 (patch)
tree315c06e410f908245563ca32afe997090cf7f641
parent1236710bccd8f5870c0281e24a899c3d58f708e6 (diff)
parent630e31d6ed539f5193fd20dde6c5afa58bd34a73 (diff)
downloadframeworks_native-9dcd38ad3b8335308b59932718e3f145aa50d318.zip
frameworks_native-9dcd38ad3b8335308b59932718e3f145aa50d318.tar.gz
frameworks_native-9dcd38ad3b8335308b59932718e3f145aa50d318.tar.bz2
Merge "Add heart rate to ASensorEvent" into klp-modular-dev
-rw-r--r--include/android/sensor.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/android/sensor.h b/include/android/sensor.h
index 21e471e..b71bccb 100644
--- a/include/android/sensor.h
+++ b/include/android/sensor.h
@@ -66,6 +66,7 @@ enum {
* Sensor accuracy measure
*/
enum {
+ ASENSOR_STATUS_NO_CONTACT = -1,
ASENSOR_STATUS_UNRELIABLE = 0,
ASENSOR_STATUS_ACCURACY_LOW = 1,
ASENSOR_STATUS_ACCURACY_MEDIUM = 2,
@@ -130,6 +131,11 @@ typedef struct AUncalibratedEvent {
};
} AUncalibratedEvent;
+typedef struct AHeartRateEvent {
+ float bpm;
+ int8_t status;
+} AHeartRateEvent;
+
/* NOTE: Must match hardware/sensors.h */
typedef struct ASensorEvent {
int32_t version; /* sizeof(struct ASensorEvent) */
@@ -151,6 +157,7 @@ typedef struct ASensorEvent {
AUncalibratedEvent uncalibrated_gyro;
AUncalibratedEvent uncalibrated_magnetic;
AMetaDataEvent meta_data;
+ AHeartRateEvent heart_rate;
};
union {
uint64_t data[8];