Move generic tracker active status in own class
This commit is contained in:
@@ -148,7 +148,8 @@ xrt_result_t wivrn_generic_tracker::get_tracked_pose(xrt_input_name name, int64_
|
||||
{
|
||||
std::tie(extrapolation_time, *res) = poses.get_pose_at(at_timestamp_ns);
|
||||
|
||||
cnx.set_tracker_enabled(index, true);
|
||||
active = true;
|
||||
cnx.update_tracker_enabled();
|
||||
cnx.add_predict_offset(extrapolation_time);
|
||||
return XRT_SUCCESS;
|
||||
}
|
||||
@@ -160,6 +161,9 @@ xrt_result_t wivrn_generic_tracker::get_tracked_pose(xrt_input_name name, int64_
|
||||
void wivrn_generic_tracker::update_tracking(const from_headset::body_tracking & tracking, const from_headset::body_tracking::pose & pose, const clock_offset & offset)
|
||||
{
|
||||
if (!poses.update_tracking(tracking.production_timestamp, tracking.timestamp, pose, offset))
|
||||
cnx.set_tracker_enabled(index, false);
|
||||
{
|
||||
active = false;
|
||||
cnx.update_tracker_enabled();
|
||||
}
|
||||
}
|
||||
} // namespace wivrn
|
||||
|
||||
Reference in New Issue
Block a user