The open source OpenXR runtime
0
fork

Configure Feed

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

a/tracking: Use PRId64 instead of %ld

Use the stdint 64-bit format specifiers when printing 64-bit ints
for better cross-platform compatibility

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

+5 -3
+5 -3
src/xrt/auxiliary/tracking/t_tracker_slam.cpp
··· 1295 1295 SLAM_TRACE("[%ld] imu t=%ld a=[%f,%f,%f] w=[%f,%f,%f]", now, ts, a.x, a.y, a.z, w.x, w.y, w.z); 1296 1296 // Check monotonically increasing timestamps 1297 1297 if (ts <= t.last_imu_ts) { 1298 - SLAM_WARN("Sample (%ld) is older than last (%ld)", ts, t.last_imu_ts); 1298 + SLAM_WARN("Sample (%" PRId64 ") is older than last (%" PRId64 ") by %" PRId64 " ns", ts, t.last_imu_ts, 1299 + t.last_imu_ts - ts); 1299 1300 return; 1300 1301 } 1301 1302 t.last_imu_ts = ts; ··· 1347 1348 // Check monotonically increasing timestamps 1348 1349 timepoint_ns &last_ts = t.last_cam_ts[cam_index]; 1349 1350 timepoint_ns ts = (int64_t)frame->timestamp; 1350 - SLAM_TRACE("[%ld] cam%d frame t=%ld", os_monotonic_get_ns(), cam_index, ts); 1351 + SLAM_TRACE("[%" PRId64 "] cam%d frame t=%" PRId64, os_monotonic_get_ns(), cam_index, ts); 1351 1352 if (last_ts >= ts) { 1352 - SLAM_WARN("Frame (%ld) is older than last (%ld)", ts, last_ts); 1353 + SLAM_WARN("Frame (%" PRId64 ") is older than last (%" PRId64 ") by %" PRId64 " ns", ts, last_ts, 1354 + last_ts - ts); 1353 1355 } 1354 1356 last_ts = ts; 1355 1357