diff options
author | Etienne Le Grand <etn@google.com> | 2014-05-22 17:15:08 -0700 |
---|---|---|
committer | Etienne Le Grand <etn@google.com> | 2014-05-23 12:35:10 -0700 |
commit | 630e31d6ed539f5193fd20dde6c5afa58bd34a73 (patch) | |
tree | 4addf9e155faed6b1a35e7b8d9e18422973b731d /include/android | |
parent | 035839c6c291e831c51eea1e9d8b54f9e2382707 (diff) | |
download | frameworks_native-630e31d6ed539f5193fd20dde6c5afa58bd34a73.tar.gz frameworks_native-630e31d6ed539f5193fd20dde6c5afa58bd34a73.tar.bz2 frameworks_native-630e31d6ed539f5193fd20dde6c5afa58bd34a73.zip |
Add heart rate to ASensorEvent
Change-Id: Ic82838b17a575de93d499e44a454bb382f17678f
Diffstat (limited to 'include/android')
-rw-r--r-- | include/android/sensor.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/android/sensor.h b/include/android/sensor.h index b4e7ebee9..95d43355b 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]; |