d/rs: Use XRT_INPUT_GENERIC_TRACKER_POSE instead of XRT_INPUT_GENERIC_HEAD_POSE

This commit is contained in:
Christoph Haag 2021-02-08 22:44:13 +01:00
parent 9760f6d123
commit ea6d6bfb3f
2 changed files with 8 additions and 9 deletions

View file

@ -86,15 +86,15 @@ ns_hmd_get_tracked_pose(struct xrt_device *xdev,
{ {
struct ns_hmd *ns = ns_hmd(xdev); struct ns_hmd *ns = ns_hmd(xdev);
if (name != XRT_INPUT_GENERIC_HEAD_POSE) {
// If the tracking device is created use it. NS_ERROR(ns, "unknown input name");
if (ns->tracker != NULL) {
xrt_device_get_tracked_pose(ns->tracker, name, at_timestamp_ns, out_relation);
return; return;
} }
if (name != XRT_INPUT_GENERIC_HEAD_POSE) { // If the tracking device is created use it.
NS_ERROR(ns, "unknown input name"); if (ns->tracker != NULL) {
enum xrt_input_name tracker_name = XRT_INPUT_GENERIC_TRACKER_POSE;
xrt_device_get_tracked_pose(ns->tracker, tracker_name, at_timestamp_ns, out_relation);
return; return;
} }

View file

@ -324,7 +324,7 @@ rs_6dof_get_tracked_pose(struct xrt_device *xdev,
{ {
struct rs_6dof *rs = rs_6dof(xdev); struct rs_6dof *rs = rs_6dof(xdev);
if (name != XRT_INPUT_GENERIC_HEAD_POSE) { if (name != XRT_INPUT_GENERIC_TRACKER_POSE) {
U_LOG_E("unknown input name"); U_LOG_E("unknown input name");
return; return;
} }
@ -386,8 +386,7 @@ rs_6dof_create(void)
// Print name. // Print name.
snprintf(rs->base.str, XRT_DEVICE_NAME_LEN, "Intel RealSense 6-DOF"); snprintf(rs->base.str, XRT_DEVICE_NAME_LEN, "Intel RealSense 6-DOF");
// Setup input, this is a lie. rs->base.inputs[0].name = XRT_INPUT_GENERIC_TRACKER_POSE;
rs->base.inputs[0].name = XRT_INPUT_GENERIC_HEAD_POSE;
// Thread and other state. // Thread and other state.
ret = os_thread_helper_init(&rs->oth); ret = os_thread_helper_init(&rs->oth);