Merge "Add an uncalibrated accelerometer type."
diff --git a/include/hardware/sensors-base.h b/include/hardware/sensors-base.h
index 65d21a8..03e3729 100644
--- a/include/hardware/sensors-base.h
+++ b/include/hardware/sensors-base.h
@@ -49,6 +49,7 @@
SENSOR_TYPE_DYNAMIC_SENSOR_META = 32,
SENSOR_TYPE_ADDITIONAL_INFO = 33,
SENSOR_TYPE_LOW_LATENCY_OFFBODY_DETECT = 34,
+ SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED = 35,
SENSOR_TYPE_DEVICE_PRIVATE_BASE = 65536, // 0x10000
};
diff --git a/include/hardware/sensors.h b/include/hardware/sensors.h
index ba6248a..20c5ce6 100644
--- a/include/hardware/sensors.h
+++ b/include/hardware/sensors.h
@@ -176,6 +176,7 @@
#define SENSOR_STRING_TYPE_DYNAMIC_SENSOR_META "android.sensor.dynamic_sensor_meta"
#define SENSOR_STRING_TYPE_ADDITIONAL_INFO "android.sensor.additional_info"
#define SENSOR_STRING_TYPE_LOW_LATENCY_OFFBODY_DETECT "android.sensor.low_latency_offbody"
+#define SENSOR_STRING_TYPE_ACCELEROMETER_UNCALIBRATED "android.sensor.accelerometer_uncalibrated"
/**
* Values returned by the accelerometer in various locations in the universe.
@@ -214,7 +215,7 @@
} sensors_vec_t;
/**
- * uncalibrated gyroscope and magnetometer event data
+ * uncalibrated accelerometer, gyroscope and magnetometer event data
*/
typedef struct {
union {
@@ -338,6 +339,9 @@
/* uncalibrated magnetometer values are in micro-Teslas */
uncalibrated_event_t uncalibrated_magnetic;
+ /* uncalibrated accelerometer values are in meter per second per second (m/s^2) */
+ uncalibrated_event_t uncalibrated_accelerometer;
+
/* heart rate data containing value in bpm and status */
heart_rate_event_t heart_rate;