mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-04 06:06:17 +00:00
d/ns: Remove tracker logic in favor of tracking overrides
This commit is contained in:
parent
44e375dd8a
commit
12ad9a6766
|
@ -64,13 +64,7 @@ ns_hmd_destroy(struct xrt_device *xdev)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ns_hmd_update_inputs(struct xrt_device *xdev)
|
ns_hmd_update_inputs(struct xrt_device *xdev)
|
||||||
{
|
{}
|
||||||
struct ns_hmd *ns = ns_hmd(xdev);
|
|
||||||
|
|
||||||
if (ns->tracker != NULL) {
|
|
||||||
xrt_device_update_inputs(ns->tracker);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
|
@ -91,13 +85,6 @@ ns_hmd_get_tracked_pose(struct xrt_device *xdev,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
out_relation->pose = ns->pose;
|
out_relation->pose = ns->pose;
|
||||||
out_relation->relation_flags = (enum xrt_space_relation_flags)(XRT_SPACE_RELATION_ORIENTATION_VALID_BIT |
|
out_relation->relation_flags = (enum xrt_space_relation_flags)(XRT_SPACE_RELATION_ORIENTATION_VALID_BIT |
|
||||||
XRT_SPACE_RELATION_POSITION_VALID_BIT |
|
XRT_SPACE_RELATION_POSITION_VALID_BIT |
|
||||||
|
@ -560,23 +547,10 @@ ns_hmd_create(const char *config_path)
|
||||||
ns->base.compute_distortion = ns_mesh_calc;
|
ns->base.compute_distortion = ns_mesh_calc;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If built, try to load the realsense tracker.
|
|
||||||
#ifdef XRT_BUILD_DRIVER_RS
|
|
||||||
ns->tracker = rs_6dof_create();
|
|
||||||
if (ns->tracker == NULL) {
|
|
||||||
NS_ERROR(ns, "Couldn't create realsense device!");
|
|
||||||
} else {
|
|
||||||
rs_update_offset(t265_to_nose_bridge, ns->tracker);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
// Setup variable tracker.
|
// Setup variable tracker.
|
||||||
u_var_add_root(ns, "North Star", true);
|
u_var_add_root(ns, "North Star", true);
|
||||||
u_var_add_pose(ns, &ns->pose, "pose");
|
u_var_add_pose(ns, &ns->pose, "pose");
|
||||||
ns->base.orientation_tracking_supported = true;
|
ns->base.orientation_tracking_supported = true;
|
||||||
ns->base.position_tracking_supported = ns->tracker != NULL;
|
|
||||||
if (ns->tracker) {
|
|
||||||
ns->base.tracking_origin->type = ns->tracker->tracking_origin->type;
|
|
||||||
}
|
|
||||||
ns->base.device_type = XRT_DEVICE_TYPE_HMD;
|
ns->base.device_type = XRT_DEVICE_TYPE_HMD;
|
||||||
|
|
||||||
return &ns->base;
|
return &ns->base;
|
||||||
|
|
|
@ -121,8 +121,6 @@ struct ns_hmd
|
||||||
|
|
||||||
struct ns_leap leap_config; // will be NULL if is_v2
|
struct ns_leap leap_config; // will be NULL if is_v2
|
||||||
|
|
||||||
struct xrt_device *tracker;
|
|
||||||
|
|
||||||
enum u_logging_level ll;
|
enum u_logging_level ll;
|
||||||
bool is_v2; // True if V2, false if V1. If we ever get a v3 this should
|
bool is_v2; // True if V2, false if V1. If we ever get a v3 this should
|
||||||
// be an enum or something
|
// be an enum or something
|
||||||
|
|
Loading…
Reference in a new issue