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);
// If the tracking device is created use it.
if (ns->tracker != NULL) {
xrt_device_get_tracked_pose(ns->tracker, name, at_timestamp_ns, out_relation);
if (name != XRT_INPUT_GENERIC_HEAD_POSE) {
NS_ERROR(ns, "unknown input name");
return;
}
if (name != XRT_INPUT_GENERIC_HEAD_POSE) {
NS_ERROR(ns, "unknown input name");
// If the tracking device is created use it.
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;
}

View file

@ -324,7 +324,7 @@ rs_6dof_get_tracked_pose(struct xrt_device *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");
return;
}
@ -386,8 +386,7 @@ rs_6dof_create(void)
// Print name.
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_HEAD_POSE;
rs->base.inputs[0].name = XRT_INPUT_GENERIC_TRACKER_POSE;
// Thread and other state.
ret = os_thread_helper_init(&rs->oth);