From aa52da072fcc11072f923d2e39eb932001e7a123 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Thu, 24 Oct 2019 21:51:07 +0100 Subject: [PATCH] xrt: Remove relation input type --- src/xrt/drivers/hdk/hdk_device.cpp | 4 ++-- src/xrt/drivers/ohmd/oh_device.c | 4 ++-- src/xrt/drivers/psvr/psvr_device.c | 4 ++-- src/xrt/drivers/vive/vive_device.c | 4 ++-- src/xrt/include/xrt/xrt_defines.h | 4 +--- src/xrt/state_trackers/oxr/oxr_session.c | 2 +- 6 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/xrt/drivers/hdk/hdk_device.cpp b/src/xrt/drivers/hdk/hdk_device.cpp index 066804739..46905f5d8 100644 --- a/src/xrt/drivers/hdk/hdk_device.cpp +++ b/src/xrt/drivers/hdk/hdk_device.cpp @@ -114,7 +114,7 @@ hdk_device_get_tracked_pose(struct xrt_device *xdev, { struct hdk_device *hd = hdk_device(xdev); - if (name != XRT_INPUT_GENERIC_HEAD_RELATION) { + if (name != XRT_INPUT_GENERIC_HEAD_POSE) { HDK_ERROR(hd, "unknown input name"); return; } @@ -271,7 +271,7 @@ hdk_device_create(struct os_hid_device *dev, hd->base.get_tracked_pose = hdk_device_get_tracked_pose; hd->base.get_view_pose = hdk_device_get_view_pose; hd->base.destroy = hdk_device_destroy; - hd->base.inputs[0].name = XRT_INPUT_GENERIC_HEAD_RELATION; + hd->base.inputs[0].name = XRT_INPUT_GENERIC_HEAD_POSE; hd->base.name = XRT_DEVICE_GENERIC_HMD; hd->dev = dev; hd->print_spew = print_spew; diff --git a/src/xrt/drivers/ohmd/oh_device.c b/src/xrt/drivers/ohmd/oh_device.c index 423c14a75..e6d5b5994 100644 --- a/src/xrt/drivers/ohmd/oh_device.c +++ b/src/xrt/drivers/ohmd/oh_device.c @@ -66,7 +66,7 @@ oh_device_get_tracked_pose(struct xrt_device *xdev, struct oh_device *ohd = oh_device(xdev); struct xrt_quat quat = {0.f, 0.f, 0.f, 1.f}; - if (name != XRT_INPUT_GENERIC_HEAD_RELATION) { + if (name != XRT_INPUT_GENERIC_HEAD_POSE) { OH_ERROR(ohd, "unknown input name"); return; } @@ -362,7 +362,7 @@ oh_device_create(ohmd_context *ctx, ohd->base.get_tracked_pose = oh_device_get_tracked_pose; ohd->base.get_view_pose = oh_device_get_view_pose; ohd->base.destroy = oh_device_destroy; - ohd->base.inputs[0].name = XRT_INPUT_GENERIC_HEAD_RELATION; + ohd->base.inputs[0].name = XRT_INPUT_GENERIC_HEAD_POSE; ohd->base.name = XRT_DEVICE_GENERIC_HMD; ohd->ctx = ctx; ohd->dev = dev; diff --git a/src/xrt/drivers/psvr/psvr_device.c b/src/xrt/drivers/psvr/psvr_device.c index 396f6f6f5..4540dd573 100644 --- a/src/xrt/drivers/psvr/psvr_device.c +++ b/src/xrt/drivers/psvr/psvr_device.c @@ -682,7 +682,7 @@ psvr_device_get_tracked_pose(struct xrt_device *xdev, { struct psvr_device *psvr = psvr_device(xdev); - if (name != XRT_INPUT_GENERIC_HEAD_RELATION) { + if (name != XRT_INPUT_GENERIC_HEAD_POSE) { PSVR_ERROR(psvr, "unknown input name"); return; } @@ -778,7 +778,7 @@ psvr_device_create(struct hid_device_info *hmd_handle_info, psvr->base.get_tracked_pose = psvr_device_get_tracked_pose; psvr->base.get_view_pose = psvr_device_get_view_pose; psvr->base.destroy = psvr_device_destroy; - psvr->base.inputs[0].name = XRT_INPUT_GENERIC_HEAD_RELATION; + psvr->base.inputs[0].name = XRT_INPUT_GENERIC_HEAD_POSE; psvr->base.name = XRT_DEVICE_GENERIC_HMD; psvr->base.hmd->distortion.models = XRT_DISTORTION_MODEL_MESHUV; psvr->base.hmd->distortion.preferred = XRT_DISTORTION_MODEL_MESHUV; diff --git a/src/xrt/drivers/vive/vive_device.c b/src/xrt/drivers/vive/vive_device.c index c330e535a..901eaa5d9 100644 --- a/src/xrt/drivers/vive/vive_device.c +++ b/src/xrt/drivers/vive/vive_device.c @@ -85,7 +85,7 @@ vive_device_get_tracked_pose(struct xrt_device *xdev, { struct vive_device *d = vive_device(xdev); - if (name != XRT_INPUT_GENERIC_HEAD_RELATION) { + if (name != XRT_INPUT_GENERIC_HEAD_POSE) { VIVE_ERROR("unknown input name"); return; } @@ -871,7 +871,7 @@ vive_device_create(struct os_hid_device *mainboard_dev, d->base.get_tracked_pose = vive_device_get_tracked_pose; d->base.get_view_pose = vive_device_get_view_pose; d->base.destroy = vive_device_destroy; - d->base.inputs[0].name = XRT_INPUT_GENERIC_HEAD_RELATION; + d->base.inputs[0].name = XRT_INPUT_GENERIC_HEAD_POSE; d->base.name = XRT_DEVICE_GENERIC_HMD; d->mainboard_dev = mainboard_dev; d->sensors_dev = sensors_dev; diff --git a/src/xrt/include/xrt/xrt_defines.h b/src/xrt/include/xrt/xrt_defines.h index da90ee86d..922542418 100644 --- a/src/xrt/include/xrt/xrt_defines.h +++ b/src/xrt/include/xrt/xrt_defines.h @@ -358,8 +358,6 @@ enum xrt_input_type XRT_INPUT_TYPE_BOOLEAN = 0x04, //! A tracked pose XRT_INPUT_TYPE_POSE = 0x05, - //! A static relationship? - XRT_INPUT_TYPE_RELATION = 0x06, // clang-format on }; @@ -396,7 +394,7 @@ enum xrt_input_type enum xrt_input_name { // clang-format off - XRT_INPUT_GENERIC_HEAD_RELATION = XRT_INPUT_NAME(0x0000, RELATION), + XRT_INPUT_GENERIC_HEAD_POSE = XRT_INPUT_NAME(0x0000, POSE), XRT_INPUT_GENERIC_HEAD_DETECT = XRT_INPUT_NAME(0x0001, BOOLEAN), XRT_INPUT_PSMV_PS_CLICK = XRT_INPUT_NAME(0x0020, BOOLEAN), diff --git a/src/xrt/state_trackers/oxr/oxr_session.c b/src/xrt/state_trackers/oxr/oxr_session.c index 74a19f9f0..6c2f4efb7 100644 --- a/src/xrt/state_trackers/oxr/oxr_session.c +++ b/src/xrt/state_trackers/oxr/oxr_session.c @@ -202,7 +202,7 @@ oxr_session_get_view_pose_at(struct oxr_logger *log, struct xrt_space_relation relation; int64_t timestamp; - xdev->get_tracked_pose(xdev, XRT_INPUT_GENERIC_HEAD_RELATION, + xdev->get_tracked_pose(xdev, XRT_INPUT_GENERIC_HEAD_POSE, sess->sys->inst->timekeeping, ×tamp, &relation);