summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEva Chen <evaschen@google.com>2022-01-26 00:15:26 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2022-01-26 00:15:26 +0000
commitf4e1d6a272a073b0b3fea5133b93f26fe5efa684 (patch)
tree9652aeb1e145ab9b91ab8af5d7a03c54d9d4deac
parent8681aa977e00f2268582e26c67859fef0015b94f (diff)
parent6515145f9c77acc3194b85c2325413a0384439d3 (diff)
downloadlibhardware-f4e1d6a272a073b0b3fea5133b93f26fe5efa684.tar.gz
Merge "Add limited axes imu types to sensors_event_t"
-rw-r--r--include/hardware/sensors.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/include/hardware/sensors.h b/include/hardware/sensors.h
index d6bf9a95..589aba02 100644
--- a/include/hardware/sensors.h
+++ b/include/hardware/sensors.h
@@ -307,6 +307,58 @@ typedef struct {
} head_tracker_event_t;
/**
+ * limited axes imu event data
+ */
+typedef struct {
+ union {
+ float calib[3];
+ struct {
+ float x;
+ float y;
+ float z;
+ };
+ };
+ union {
+ float supported[3];
+ struct {
+ float x_supported;
+ float y_supported;
+ float z_supported;
+ };
+ };
+} limited_axes_imu_event_t;
+
+/**
+ * limited axes uncalibrated imu event data
+ */
+typedef struct {
+ union {
+ float uncalib[3];
+ struct {
+ float x_uncalib;
+ float y_uncalib;
+ float z_uncalib;
+ };
+ };
+ union {
+ float bias[3];
+ struct {
+ float x_bias;
+ float y_bias;
+ float z_bias;
+ };
+ };
+ union {
+ float supported[3];
+ struct {
+ float x_supported;
+ float y_supported;
+ float z_supported;
+ };
+ };
+} limited_axes_imu_uncalibrated_event_t;
+
+/**
* Union of the various types of sensor data
* that can be returned.
*/
@@ -386,6 +438,20 @@ typedef struct sensors_event_t {
/* vector describing head orientation (added for legacy code support only) */
head_tracker_event_t head_tracker;
+
+ /*
+ * limited axes imu event, See
+ * SENSOR_TYPE_GYROSCOPE_LIMITED_AXES and
+ * SENSOR_TYPE_ACCELEROMETER_LIMITED_AXES for details.
+ */
+ limited_axes_imu_event_t limited_axes_imu;
+
+ /*
+ * limited axes imu uncalibrated event, See
+ * SENSOR_TYPE_GYROSCOPE_LIMITED_AXES_UNCALIBRATED and
+ * SENSOR_TYPE_ACCELEROMETER_LIMITED_AXES_UNCALIBRATED for details.
+ */
+ limited_axes_imu_uncalibrated_event_t limited_axes_imu_uncalibrated;
};
union {