mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-17 04:15:44 +00:00
t/hand: Apply formatting
This commit is contained in:
parent
f7a9317b8e
commit
8e3a47dd94
|
@ -21,7 +21,8 @@ extern "C" {
|
|||
* @ingroup aux_tracking
|
||||
*/
|
||||
struct t_hand_tracking_sync *
|
||||
t_hand_tracking_sync_mercury_create(struct t_stereo_camera_calibration *calib, enum hand_tracking_output_space output_space);
|
||||
t_hand_tracking_sync_mercury_create(struct t_stereo_camera_calibration *calib,
|
||||
enum hand_tracking_output_space output_space);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
|
|
@ -258,7 +258,8 @@ applyJointWidths(struct HandTracking *htd, struct xrt_hand_joint_set *set)
|
|||
.040f * .5f; // Measured my wrist thickness with calipers
|
||||
}
|
||||
|
||||
static bool handle_changed_image_size(HandTracking *htd, xrt_size &new_one_view_size)
|
||||
static bool
|
||||
handle_changed_image_size(HandTracking *htd, xrt_size &new_one_view_size)
|
||||
{
|
||||
int gcd_calib = std::gcd(htd->calibration_one_view_size_px.h, htd->calibration_one_view_size_px.w);
|
||||
int gcd_new = std::gcd(new_one_view_size.h, new_one_view_size.w);
|
||||
|
@ -272,7 +273,8 @@ static bool handle_changed_image_size(HandTracking *htd, xrt_size &new_one_view_
|
|||
bool good = (lcm_h_calib == lcm_h_new) && (lcm_w_calib == lcm_w_new);
|
||||
|
||||
if (!good) {
|
||||
HT_WARN(htd, "Can't process this frame, wrong aspect ratio. What we wanted: %dx%d, what we got: %dx%d", lcm_h_calib, lcm_w_calib, lcm_h_new, lcm_w_new);
|
||||
HT_WARN(htd, "Can't process this frame, wrong aspect ratio. What we wanted: %dx%d, what we got: %dx%d",
|
||||
lcm_h_calib, lcm_w_calib, lcm_h_new, lcm_w_new);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -345,8 +347,8 @@ HandTracking::cCallbackProcess(struct t_hand_tracking_sync *ht_sync,
|
|||
const int full_height = left_frame->height;
|
||||
const int full_width = left_frame->width * 2;
|
||||
|
||||
if ((left_frame->width != (uint32_t)htd->last_frame_one_view_size_px.w) || (left_frame->height != (uint32_t)htd->last_frame_one_view_size_px.h))
|
||||
{
|
||||
if ((left_frame->width != (uint32_t)htd->last_frame_one_view_size_px.w) ||
|
||||
(left_frame->height != (uint32_t)htd->last_frame_one_view_size_px.h)) {
|
||||
xrt_size new_one_view_size;
|
||||
new_one_view_size.h = left_frame->height;
|
||||
new_one_view_size.w = left_frame->width;
|
||||
|
|
|
@ -458,8 +458,8 @@ getCalibration(struct HandTracking *htd, t_stereo_camera_calibration *calibratio
|
|||
htd->one_view_size_px.w = wrap.view[0].image_size_pixels.w;
|
||||
htd->one_view_size_px.h = wrap.view[0].image_size_pixels.h;
|
||||
|
||||
U_LOG_E("%d %d %p %p", htd->one_view_size_px.w, htd->one_view_size_px.h,
|
||||
(void *)&htd->one_view_size_px.w, (void *)&htd->one_view_size_px.h);
|
||||
U_LOG_E("%d %d %p %p", htd->one_view_size_px.w, htd->one_view_size_px.h, (void *)&htd->one_view_size_px.w,
|
||||
(void *)&htd->one_view_size_px.h);
|
||||
|
||||
|
||||
|
||||
|
@ -1002,8 +1002,8 @@ HandTracking::cCallbackProcess(struct t_hand_tracking_sync *ht_sync,
|
|||
htd->histories_3d[past_indices[i]].last_hands_unfiltered.push_back(
|
||||
hands_unfiltered[present_indices[i]]);
|
||||
}
|
||||
// The preceding may not do anything, because we'll start out with no hand histories! All the numbers of elements
|
||||
// should be zero.
|
||||
// The preceding may not do anything, because we'll start out with no hand histories! All the numbers of
|
||||
// elements should be zero.
|
||||
|
||||
|
||||
for (size_t i = 0; i < present_hands_taken.size(); i++) {
|
||||
|
@ -1189,7 +1189,8 @@ HandTracking::cCallbackProcess(struct t_hand_tracking_sync *ht_sync,
|
|||
applyJointWidths(put_in_set);
|
||||
applyJointOrientations(put_in_set, xr_indices[i]);
|
||||
}
|
||||
htExitFrame(htd, false, final_hands_ordered_by_handedness, filtered_hands[0].timestamp, out_left_hand, out_right_hand, out_timestamp_ns);
|
||||
htExitFrame(htd, false, final_hands_ordered_by_handedness, filtered_hands[0].timestamp, out_left_hand,
|
||||
out_right_hand, out_timestamp_ns);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue