The open source OpenXR runtime
0
fork

Configure Feed

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

d/*: fix format modifiers for 32 bits

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

authored by

Simon Zeni and committed by
Rylie Pavlik
967847c7 39535666

+18 -18
+3 -2
src/xrt/drivers/android/android_sensors.c
··· 54 54 accel.y = -event.acceleration.x; 55 55 accel.z = event.acceleration.z; 56 56 57 - ANDROID_TRACE(d, "accel %ld %.2f %.2f %.2f", event.timestamp, accel.x, accel.y, accel.z); 57 + ANDROID_TRACE(d, "accel %" PRId64 " %.2f %.2f %.2f", event.timestamp, accel.x, accel.y, 58 + accel.z); 58 59 break; 59 60 } 60 61 case ASENSOR_TYPE_GYROSCOPE: { ··· 62 63 gyro.y = event.data[0]; 63 64 gyro.z = event.data[2]; 64 65 65 - ANDROID_TRACE(d, "gyro %ld %.2f %.2f %.2f", event.timestamp, gyro.x, gyro.y, gyro.z); 66 + ANDROID_TRACE(d, "gyro %" PRId64 " %.2f %.2f %.2f", event.timestamp, gyro.x, gyro.y, gyro.z); 66 67 67 68 // TODO: Make filter handle accelerometer 68 69 struct xrt_vec3 null_accel;
+1 -2
src/xrt/drivers/qwerty/qwerty_device.c
··· 26 26 #include <stdio.h> 27 27 #include <assert.h> 28 28 29 - 30 29 #define QWERTY_HMD_INITIAL_MOVEMENT_SPEED 0.002f // in meters per frame 31 30 #define QWERTY_HMD_INITIAL_LOOK_SPEED 0.02f // in radians per frame 32 31 #define QWERTY_CONTROLLER_INITIAL_MOVEMENT_SPEED 0.005f ··· 132 131 if (amplitude || duration || frequency) { 133 132 QWERTY_INFO(qd, 134 133 "[%s] Haptic output: \n" 135 - "\tfrequency=%.2f amplitude=%.2f duration=%ld", 134 + "\tfrequency=%.2f amplitude=%.2f duration=%" PRId64, 136 135 xd->str, frequency, amplitude, duration); 137 136 } 138 137 }
+1 -1
src/xrt/drivers/steamvr_lh/device.cpp
··· 353 353 { 354 354 // this should only be set once 355 355 assert(output == nullptr); 356 - DEV_DEBUG("setting haptic handle for %lu", handle); 356 + DEV_DEBUG("setting haptic handle for %" PRIu64, handle); 357 357 haptic_handle = handle; 358 358 xrt_output_name name; 359 359 switch (this->name) {
+5 -6
src/xrt/drivers/steamvr_lh/steamvr_lh.cpp
··· 570 570 } else if (components->y == ulComponent) { 571 571 input->value.vec2.y = fNewValue; 572 572 } else { 573 - CTX_WARN( 574 - "Attempted to update component with handle %lu" 575 - " but it was neither the x nor y " 576 - "component of its associated input", 577 - ulComponent); 573 + CTX_WARN("Attempted to update component with handle %" PRIu64 574 + " but it was neither the x nor y " 575 + "component of its associated input", 576 + ulComponent); 578 577 } 579 578 580 579 } else { ··· 592 591 finger_input->second->timestamp = timestamp; 593 592 finger_input->second->value = fNewValue; 594 593 } else { 595 - CTX_WARN("Unmapped component %lu", ulComponent); 594 + CTX_WARN("Unmapped component %" PRIu64, ulComponent); 596 595 } 597 596 } 598 597 }
+4 -3
src/xrt/drivers/vive/vive_controller.c
··· 731 731 } 732 732 733 733 if (buf > end) 734 - VIVE_ERROR(d, "overshoot: %ld\n", buf - end); 734 + VIVE_ERROR(d, "overshoot: %td\n", (ptrdiff_t)(buf - end)); 735 735 736 736 if (buf < end) 737 737 vive_controller_handle_lighthousev1(d, buf, end - buf); ··· 899 899 #endif 900 900 901 901 if (buf < end) { 902 - VIVE_TRACE(d, "%ld bytes unparsed data in message\n", message->len - (buf - message->payload) - 1); 902 + VIVE_TRACE(d, "%td bytes unparsed data in message\n", 903 + (ptrdiff_t)(message->len - (buf - message->payload) - 1)); 903 904 } 904 905 if (buf > end) 905 - VIVE_ERROR(d, "overshoot: %ld\n", buf - end); 906 + VIVE_ERROR(d, "overshoot: %td\n", (ptrdiff_t)(buf - end)); 906 907 907 908 //! @todo: Parse lighthouse v2 data 908 909 }
+3 -3
src/xrt/drivers/vive/vive_source.c
··· 130 130 bool should_push = vive_source_try_convert_v4l2_timestamp(vs, xf); 131 131 132 132 if (!should_push) { 133 - VIVE_TRACE(vs, "skipped sbs img t=%ld source_t=%ld", xf->timestamp, xf->source_timestamp); 133 + VIVE_TRACE(vs, "skipped sbs img t=%" PRId64 " source_t=%" PRId64, xf->timestamp, xf->source_timestamp); 134 134 return; 135 135 } 136 136 137 - VIVE_TRACE(vs, "sbs img t=%ld source_t=%ld", xf->timestamp, xf->source_timestamp); 137 + VIVE_TRACE(vs, "sbs img t=%" PRId64 " source_t=%" PRId64, xf->timestamp, xf->source_timestamp); 138 138 139 139 if (vs->out_sinks.cams[0]) { // The split into left right will happen downstream 140 140 xrt_sink_push_frame(vs->out_sinks.cams[0], xf); ··· 149 149 timepoint_ns ts = s->timestamp_ns; 150 150 struct xrt_vec3_f64 a = s->accel_m_s2; 151 151 struct xrt_vec3_f64 w = s->gyro_rad_secs; 152 - VIVE_TRACE(vs, "imu t=%ld a=(%f %f %f) w=(%f %f %f)", ts, a.x, a.y, a.z, w.x, w.y, w.z); 152 + VIVE_TRACE(vs, "imu t=%" PRId64 " a=(%f %f %f) w=(%f %f %f)", ts, a.x, a.y, a.z, w.x, w.y, w.z); 153 153 154 154 if (vs->out_sinks.imu) { 155 155 xrt_sink_push_imu(vs->out_sinks.imu, s);
+1 -1
src/xrt/drivers/xreal_air/xreal_air_hmd.c
··· 558 558 // If this is larger then one second something bad is going on. 559 559 if (hmd->fusion.state != M_IMU_3DOF_STATE_START && 560 560 inter_sample_duration_ns >= (time_duration_ns)U_TIME_1S_IN_NS) { 561 - XREAL_AIR_ERROR(hmd, "Drop packet (sensor too slow): %lu", inter_sample_duration_ns); 561 + XREAL_AIR_ERROR(hmd, "Drop packet (sensor too slow): %" PRId64, inter_sample_duration_ns); 562 562 return; 563 563 } 564 564