am b3a65bb0: am 9dcd38ad: Merge "Add heart rate to ASensorEvent" into klp-modular-dev
* commit 'b3a65bb0c2d2f6e660510efe0d93b3d26b0b2bf9': Add heart rate to ASensorEvent
This commit is contained in:
commit
03b1a9db9d
|
@ -66,6 +66,7 @@ enum {
|
||||||
* Sensor accuracy measure
|
* Sensor accuracy measure
|
||||||
*/
|
*/
|
||||||
enum {
|
enum {
|
||||||
|
ASENSOR_STATUS_NO_CONTACT = -1,
|
||||||
ASENSOR_STATUS_UNRELIABLE = 0,
|
ASENSOR_STATUS_UNRELIABLE = 0,
|
||||||
ASENSOR_STATUS_ACCURACY_LOW = 1,
|
ASENSOR_STATUS_ACCURACY_LOW = 1,
|
||||||
ASENSOR_STATUS_ACCURACY_MEDIUM = 2,
|
ASENSOR_STATUS_ACCURACY_MEDIUM = 2,
|
||||||
|
@ -130,6 +131,11 @@ typedef struct AUncalibratedEvent {
|
||||||
};
|
};
|
||||||
} AUncalibratedEvent;
|
} AUncalibratedEvent;
|
||||||
|
|
||||||
|
typedef struct AHeartRateEvent {
|
||||||
|
float bpm;
|
||||||
|
int8_t status;
|
||||||
|
} AHeartRateEvent;
|
||||||
|
|
||||||
/* NOTE: Must match hardware/sensors.h */
|
/* NOTE: Must match hardware/sensors.h */
|
||||||
typedef struct ASensorEvent {
|
typedef struct ASensorEvent {
|
||||||
int32_t version; /* sizeof(struct ASensorEvent) */
|
int32_t version; /* sizeof(struct ASensorEvent) */
|
||||||
|
@ -151,6 +157,7 @@ typedef struct ASensorEvent {
|
||||||
AUncalibratedEvent uncalibrated_gyro;
|
AUncalibratedEvent uncalibrated_gyro;
|
||||||
AUncalibratedEvent uncalibrated_magnetic;
|
AUncalibratedEvent uncalibrated_magnetic;
|
||||||
AMetaDataEvent meta_data;
|
AMetaDataEvent meta_data;
|
||||||
|
AHeartRateEvent heart_rate;
|
||||||
};
|
};
|
||||||
union {
|
union {
|
||||||
uint64_t data[8];
|
uint64_t data[8];
|
||||||
|
|
Loading…
Reference in New Issue