The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

xrt: use int64_t for timestamp in get_hand_tracking

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2298>

authored by

Simon Zeni and committed by
Rylie Pavlik
e2982445 d5ba6eec

+38 -38
+2 -2
src/xrt/drivers/ht/ht_driver.c
··· 148 148 static void 149 149 ht_device_get_hand_tracking(struct xrt_device *xdev, 150 150 enum xrt_input_name name, 151 - uint64_t at_timestamp_ns, 151 + int64_t at_timestamp_ns, 152 152 struct xrt_hand_joint_set *out_value, 153 - uint64_t *out_timestamp_ns) 153 + int64_t *out_timestamp_ns) 154 154 { 155 155 struct ht_device *htd = ht_device(xdev); 156 156
+5 -5
src/xrt/drivers/ht_ctrl_emu/ht_ctrl_emu.cpp
··· 134 134 static void 135 135 cemu_device_get_hand_tracking(struct xrt_device *xdev, 136 136 enum xrt_input_name name, 137 - uint64_t requested_timestamp_ns, 137 + int64_t requested_timestamp_ns, 138 138 struct xrt_hand_joint_set *out_value, 139 - uint64_t *out_timestamp_ns) 139 + int64_t *out_timestamp_ns) 140 140 { 141 141 // Shadows normal hand tracking - does nothing differently 142 142 ··· 231 231 } else { 232 232 other = 0; 233 233 } 234 - uint64_t noop; 235 234 235 + int64_t noop; 236 236 xrt_device_get_hand_tracking(dev->sys->in_hand, dev->sys->out_hand[other]->ht_input_name, hand_timestamp_ns, 237 237 out_secondary, &noop); 238 238 } ··· 329 329 CEMU_ERROR(dev, "unknown input name %d for controller pose", name); 330 330 return; 331 331 } 332 - static uint64_t hand_timestamp_ns; 332 + static int64_t hand_timestamp_ns; 333 333 334 334 struct xrt_hand_joint_set joint_set; 335 335 sys->in_hand->get_hand_tracking(sys->in_hand, dev->ht_input_name, at_timestamp_ns, &joint_set, ··· 384 384 struct cemu_device *dev = cemu_device(xdev); 385 385 386 386 struct xrt_hand_joint_set joint_set; 387 - uint64_t noop; 387 + int64_t noop; 388 388 389 389 xrt_device_get_hand_tracking(dev->sys->in_hand, dev->ht_input_name, os_monotonic_get_ns(), &joint_set, &noop); 390 390
+2 -2
src/xrt/drivers/multi_wrapper/multi.c
··· 134 134 static void 135 135 get_hand_tracking(struct xrt_device *xdev, 136 136 enum xrt_input_name name, 137 - uint64_t at_timestamp_ns, 137 + int64_t at_timestamp_ns, 138 138 struct xrt_hand_joint_set *out_value, 139 - uint64_t *out_timestamp_ns) 139 + int64_t *out_timestamp_ns) 140 140 { 141 141 struct multi_device *d = (struct multi_device *)xdev; 142 142 struct xrt_device *target = d->tracking_override.target;
+2 -2
src/xrt/drivers/opengloves/opengloves_device.c
··· 89 89 static void 90 90 opengloves_device_get_hand_tracking(struct xrt_device *xdev, 91 91 enum xrt_input_name name, 92 - uint64_t requested_timestamp_ns, 92 + int64_t requested_timestamp_ns, 93 93 struct xrt_hand_joint_set *out_joint_set, 94 - uint64_t *out_timestamp_ns) 94 + int64_t *out_timestamp_ns) 95 95 { 96 96 struct opengloves_device *od = opengloves_device(xdev); 97 97
+2 -2
src/xrt/drivers/remote/r_device.c
··· 135 135 static void 136 136 r_device_get_hand_tracking(struct xrt_device *xdev, 137 137 enum xrt_input_name name, 138 - uint64_t requested_timestamp_ns, 138 + int64_t requested_timestamp_ns, 139 139 struct xrt_hand_joint_set *out_value, 140 - uint64_t *out_timestamp_ns) 140 + int64_t *out_timestamp_ns) 141 141 { 142 142 struct r_device *rd = r_device(xdev); 143 143 struct r_hub *r = rd->r;
+2 -2
src/xrt/drivers/remote/r_hmd.c
··· 73 73 static void 74 74 r_hmd_get_hand_tracking(struct xrt_device *xdev, 75 75 enum xrt_input_name name, 76 - uint64_t at_timestamp_ns, 76 + int64_t at_timestamp_ns, 77 77 struct xrt_hand_joint_set *out_value, 78 - uint64_t *out_timestamp_ns) 78 + int64_t *out_timestamp_ns) 79 79 { 80 80 struct r_hmd *rh = r_hmd(xdev); 81 81 (void)rh;
+2 -2
src/xrt/drivers/simulated/simulated_controller.c
··· 162 162 static void 163 163 simulated_device_get_hand_tracking(struct xrt_device *xdev, 164 164 enum xrt_input_name name, 165 - uint64_t requested_timestamp_ns, 165 + int64_t requested_timestamp_ns, 166 166 struct xrt_hand_joint_set *out_value, 167 - uint64_t *out_timestamp_ns) 167 + int64_t *out_timestamp_ns) 168 168 { 169 169 assert(false); 170 170 }
+2 -2
src/xrt/drivers/steamvr_lh/device.cpp
··· 399 399 400 400 void 401 401 ControllerDevice::get_hand_tracking(enum xrt_input_name name, 402 - uint64_t desired_timestamp_ns, 402 + int64_t desired_timestamp_ns, 403 403 struct xrt_hand_joint_set *out_value, 404 - uint64_t *out_timestamp_ns) 404 + int64_t *out_timestamp_ns) 405 405 { 406 406 if (!has_index_hand_tracking) 407 407 return;
+2 -2
src/xrt/drivers/steamvr_lh/device.hpp
··· 176 176 177 177 void 178 178 get_hand_tracking(enum xrt_input_name name, 179 - uint64_t desired_timestamp_ns, 179 + int64_t desired_timestamp_ns, 180 180 struct xrt_hand_joint_set *out_value, 181 - uint64_t *out_timestamp_ns); 181 + int64_t *out_timestamp_ns); 182 182 183 183 xrt_hand 184 184 get_xrt_hand();
+2 -2
src/xrt/drivers/survive/survive_driver.c
··· 458 458 static void 459 459 survive_controller_get_hand_tracking(struct xrt_device *xdev, 460 460 enum xrt_input_name name, 461 - uint64_t at_timestamp_ns, 461 + int64_t at_timestamp_ns, 462 462 struct xrt_hand_joint_set *out_value, 463 - uint64_t *out_timestamp_ns) 463 + int64_t *out_timestamp_ns) 464 464 { 465 465 struct survive_device *survive = (struct survive_device *)xdev; 466 466
+2 -2
src/xrt/drivers/vive/vive_controller.c
··· 363 363 static void 364 364 vive_controller_get_hand_tracking(struct xrt_device *xdev, 365 365 enum xrt_input_name name, 366 - uint64_t requested_timestamp_ns, 366 + int64_t requested_timestamp_ns, 367 367 struct xrt_hand_joint_set *out_value, 368 - uint64_t *out_timestamp_ns) 368 + int64_t *out_timestamp_ns) 369 369 { 370 370 XRT_TRACE_MARKER(); 371 371
+4 -4
src/xrt/include/xrt/xrt_device.h
··· 338 338 */ 339 339 void (*get_hand_tracking)(struct xrt_device *xdev, 340 340 enum xrt_input_name name, 341 - uint64_t desired_timestamp_ns, 341 + int64_t desired_timestamp_ns, 342 342 struct xrt_hand_joint_set *out_value, 343 - uint64_t *out_timestamp_ns); 343 + int64_t *out_timestamp_ns); 344 344 345 345 /*! 346 346 * @brief Get the requested blend shape properties & weights for a face tracker ··· 563 563 static inline void 564 564 xrt_device_get_hand_tracking(struct xrt_device *xdev, 565 565 enum xrt_input_name name, 566 - uint64_t desired_timestamp_ns, 566 + int64_t desired_timestamp_ns, 567 567 struct xrt_hand_joint_set *out_value, 568 - uint64_t *out_timestamp_ns) 568 + int64_t *out_timestamp_ns) 569 569 { 570 570 xdev->get_hand_tracking(xdev, name, desired_timestamp_ns, out_value, out_timestamp_ns); 571 571 }
+2 -2
src/xrt/ipc/client/ipc_client_device.c
··· 102 102 static void 103 103 ipc_client_device_get_hand_tracking(struct xrt_device *xdev, 104 104 enum xrt_input_name name, 105 - uint64_t at_timestamp_ns, 105 + int64_t at_timestamp_ns, 106 106 struct xrt_hand_joint_set *out_value, 107 - uint64_t *out_timestamp_ns) 107 + int64_t *out_timestamp_ns) 108 108 { 109 109 ipc_client_device_t *icd = ipc_client_device(xdev); 110 110
+2 -2
src/xrt/ipc/server/ipc_server_handler.c
··· 1892 1892 ipc_handle_device_get_hand_tracking(volatile struct ipc_client_state *ics, 1893 1893 uint32_t id, 1894 1894 enum xrt_input_name name, 1895 - uint64_t at_timestamp, 1895 + int64_t at_timestamp, 1896 1896 struct xrt_hand_joint_set *out_value, 1897 - uint64_t *out_timestamp) 1897 + int64_t *out_timestamp) 1898 1898 { 1899 1899 1900 1900 // To make the code a bit more readable.
+2 -2
src/xrt/ipc/shared/proto.json
··· 406 406 "in": [ 407 407 {"name": "id", "type": "uint32_t"}, 408 408 {"name": "name", "type": "enum xrt_input_name"}, 409 - {"name": "at_timestamp", "type": "uint64_t"} 409 + {"name": "at_timestamp", "type": "int64_t"} 410 410 ], 411 411 "out": [ 412 412 {"name": "value", "type": "struct xrt_hand_joint_set"}, 413 - {"name": "timestamp", "type": "uint64_t"} 413 + {"name": "timestamp", "type": "int64_t"} 414 414 ] 415 415 }, 416 416
+2 -2
src/xrt/state_trackers/oxr/oxr_xdev.c
··· 122 122 struct xrt_hand_joint_set *out_value) 123 123 { 124 124 //! Convert at_time to monotonic and give to device. 125 - uint64_t at_timestamp_ns = time_state_ts_to_monotonic_ns(inst->timekeeping, at_time); 125 + int64_t at_timestamp_ns = time_state_ts_to_monotonic_ns(inst->timekeeping, at_time); 126 126 127 127 struct xrt_hand_joint_set value; 128 128 129 - uint64_t ignored; 129 + int64_t ignored; 130 130 131 131 xrt_device_get_hand_tracking(xdev, name, at_timestamp_ns, &value, &ignored); 132 132
+1 -1
src/xrt/state_trackers/steamvr_drv/ovrd_driver.cpp
··· 970 970 971 971 timepoint_ns now_ns = os_monotonic_get_ns(); 972 972 struct xrt_hand_joint_set out_joint_set_value; 973 - uint64_t out_timestamp_ns; 973 + int64_t out_timestamp_ns; 974 974 975 975 m_xdev->get_hand_tracking(m_xdev, 976 976 m_hand == XRT_HAND_LEFT ? XRT_INPUT_GENERIC_HAND_TRACKING_LEFT