summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Trephan <tylertrephan@google.com>2022-01-21 00:04:35 +0000
committerTyler Trephan <tylertrephan@google.com>2022-01-26 18:27:43 +0000
commit3d9af7ccfda5b3e74a2728f397e339543053a407 (patch)
treeda4f5a3f6b9571e8c6e1a6b8b49adae074e9edcb
parentf4e1d6a272a073b0b3fea5133b93f26fe5efa684 (diff)
downloadlibhardware-3d9af7ccfda5b3e74a2728f397e339543053a407.tar.gz
Add heading to sensors_event_t
Bug: 189983308 Test: compile (definitions only) Change-Id: I01b75ecae37755bf43321d99e465a9dc42e2e318
-rw-r--r--include/hardware/sensors.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/hardware/sensors.h b/include/hardware/sensors.h
index 589aba02..a8bc4ec6 100644
--- a/include/hardware/sensors.h
+++ b/include/hardware/sensors.h
@@ -359,6 +359,14 @@ typedef struct {
} limited_axes_imu_uncalibrated_event_t;
/**
+ * Heading event data
+ */
+typedef struct {
+ float heading;
+ float accuracy;
+} heading_event_t;
+
+/**
* Union of the various types of sensor data
* that can be returned.
*/
@@ -452,6 +460,9 @@ typedef struct sensors_event_t {
* SENSOR_TYPE_ACCELEROMETER_LIMITED_AXES_UNCALIBRATED for details.
*/
limited_axes_imu_uncalibrated_event_t limited_axes_imu_uncalibrated;
+
+ /* heading data containing value in degrees and its accuracy */
+ heading_event_t heading;
};
union {