From efde7f185cd9d0e1fe5a303e763e8eae7d136164 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Fri, 3 Dec 2021 13:38:53 +0000 Subject: [PATCH] a/math: Put m_relation_history_get out argument last --- src/xrt/auxiliary/math/m_relation_history.cpp | 2 +- src/xrt/auxiliary/math/m_relation_history.h | 2 +- src/xrt/drivers/realsense/rs_ddev.c | 2 +- src/xrt/drivers/survive/survive_driver.c | 4 ++-- src/xrt/drivers/vive/vive_device.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/xrt/auxiliary/math/m_relation_history.cpp b/src/xrt/auxiliary/math/m_relation_history.cpp index 645aa5e28..eacd7d435 100644 --- a/src/xrt/auxiliary/math/m_relation_history.cpp +++ b/src/xrt/auxiliary/math/m_relation_history.cpp @@ -81,7 +81,7 @@ m_relation_history_push(struct m_relation_history *rh, struct xrt_space_relation } enum m_relation_history_result -m_relation_history_get(struct m_relation_history *rh, struct xrt_space_relation *out_relation, uint64_t at_timestamp_ns) +m_relation_history_get(struct m_relation_history *rh, uint64_t at_timestamp_ns, struct xrt_space_relation *out_relation) { XRT_TRACE_MARKER(); os_mutex_lock(&rh->mutex); diff --git a/src/xrt/auxiliary/math/m_relation_history.h b/src/xrt/auxiliary/math/m_relation_history.h index 2de084519..470fda207 100644 --- a/src/xrt/auxiliary/math/m_relation_history.h +++ b/src/xrt/auxiliary/math/m_relation_history.h @@ -63,7 +63,7 @@ m_relation_history_push(struct m_relation_history *rh, struct xrt_space_relation * @public @memberof m_relation_history */ enum m_relation_history_result -m_relation_history_get(struct m_relation_history *rh, struct xrt_space_relation *out_relation, uint64_t at_time_ns); +m_relation_history_get(struct m_relation_history *rh, uint64_t at_time_ns, struct xrt_space_relation *out_relation); /*! * Destroys an opaque relation_history object. diff --git a/src/xrt/drivers/realsense/rs_ddev.c b/src/xrt/drivers/realsense/rs_ddev.c index 9456586ff..36198cd18 100644 --- a/src/xrt/drivers/realsense/rs_ddev.c +++ b/src/xrt/drivers/realsense/rs_ddev.c @@ -408,7 +408,7 @@ rs_ddev_get_tracked_pose(struct xrt_device *xdev, return; } - m_relation_history_get(rs->relation_hist, out_relation, at_timestamp_ns); + m_relation_history_get(rs->relation_hist, at_timestamp_ns, out_relation); } static void diff --git a/src/xrt/drivers/survive/survive_driver.c b/src/xrt/drivers/survive/survive_driver.c index 5dbb7a3b1..9470cf7f8 100644 --- a/src/xrt/drivers/survive/survive_driver.c +++ b/src/xrt/drivers/survive/survive_driver.c @@ -332,7 +332,7 @@ survive_device_get_tracked_pose(struct xrt_device *xdev, return; } - m_relation_history_get(survive->relation_hist, out_relation, at_timestamp_ns); + m_relation_history_get(survive->relation_hist, at_timestamp_ns, out_relation); struct xrt_pose *p = &out_relation->pose; SURVIVE_TRACE(survive, "GET_POSITION (%f %f %f) GET_ORIENTATION (%f, %f, %f, %f)", p->position.x, p->position.y, @@ -434,7 +434,7 @@ survive_controller_get_hand_tracking(struct xrt_device *xdev, struct xrt_space_relation hand_relation; - m_relation_history_get(survive->relation_hist, &hand_relation, at_timestamp_ns); + m_relation_history_get(survive->relation_hist, at_timestamp_ns, &hand_relation); u_hand_joints_set_out_data(&survive->ctrl.hand_tracking, hand, &hand_relation, &hand_on_handle_pose, out_value); diff --git a/src/xrt/drivers/vive/vive_device.c b/src/xrt/drivers/vive/vive_device.c index a26ef0e87..0ab1c9a1f 100644 --- a/src/xrt/drivers/vive/vive_device.c +++ b/src/xrt/drivers/vive/vive_device.c @@ -113,7 +113,7 @@ vive_device_get_tracked_pose(struct xrt_device *xdev, // Clear out the relation. U_ZERO(out_relation); - m_relation_history_get(d->relation_hist, out_relation, at_timestamp_ns); + m_relation_history_get(d->relation_hist, at_timestamp_ns, out_relation); } static void