diff --git a/src/xrt/drivers/depthai/depthai_driver.cpp b/src/xrt/drivers/depthai/depthai_driver.cpp index b89831e16..686e7a82a 100644 --- a/src/xrt/drivers/depthai/depthai_driver.cpp +++ b/src/xrt/drivers/depthai/depthai_driver.cpp @@ -894,11 +894,11 @@ depthai_fs_slam_stream_start(struct xrt_fs *xfs, struct xrt_slam_sinks *sinks) struct depthai_fs *depthai = depthai_fs(xfs); DEPTHAI_DEBUG(depthai, "DepthAI: SLAM stream start called"); - depthai->sink[0] = nullptr; // 0 == CamA-4L / RGB - depthai->sink[1] = sinks->left; // 1 == CamB-2L / Left Gray - depthai->sink[2] = sinks->right; // 2 == CamC-2L / Right Gray - depthai->sink[3] = nullptr; // 3 == CamD-4L - if (depthai->want_cameras && sinks->left != NULL && sinks->right != NULL) { + depthai->sink[0] = nullptr; // 0 == CamA-4L / RGB + depthai->sink[1] = sinks->cams[0]; // 1 == CamB-2L / Left Gray + depthai->sink[2] = sinks->cams[1]; // 2 == CamC-2L / Right Gray + depthai->sink[3] = nullptr; // 3 == CamD-4L + if (depthai->want_cameras && sinks->cams[0] != NULL && sinks->cams[1] != NULL) { os_thread_helper_start(&depthai->image_thread, depthai_mainloop, depthai); } if (depthai->want_imu && sinks->imu != NULL) { diff --git a/src/xrt/state_trackers/gui/gui_scene_hand_tracking_demo.c b/src/xrt/state_trackers/gui/gui_scene_hand_tracking_demo.c index 0f37a2979..0e6b457b9 100644 --- a/src/xrt/state_trackers/gui/gui_scene_hand_tracking_demo.c +++ b/src/xrt/state_trackers/gui/gui_scene_hand_tracking_demo.c @@ -94,10 +94,10 @@ gui_scene_hand_tracking_demo(struct gui_program *p) struct xrt_slam_sinks gen_lock = {0}; u_sink_force_genlock_create( // &usysd->xfctx, // - hand_sinks->left, // - hand_sinks->right, // - &gen_lock.left, // - &gen_lock.right); // + hand_sinks->cams[0], // + hand_sinks->cams[1], // + &gen_lock.cams[0], // + &gen_lock.cams[1]); // xrt_fs_slam_stream_start(the_fs, &gen_lock); diff --git a/src/xrt/state_trackers/gui/gui_scene_record.c b/src/xrt/state_trackers/gui/gui_scene_record.c index a1c300707..f5c71fc0a 100644 --- a/src/xrt/state_trackers/gui/gui_scene_record.c +++ b/src/xrt/state_trackers/gui/gui_scene_record.c @@ -224,7 +224,7 @@ create_depthai_stereo(struct camera_window *cw) struct xrt_frame_sink *tmp = &cw->base.sink; struct xrt_slam_sinks sinks; - u_sink_combiner_create(&cw->camera.xfctx, tmp, &sinks.left, &sinks.right); + u_sink_combiner_create(&cw->camera.xfctx, tmp, &sinks.cams[0], &sinks.cams[1]); // Now that we have setup a node graph, start it. xrt_fs_slam_stream_start(cw->camera.xfs, &sinks); diff --git a/src/xrt/targets/common/target_builder_north_star.c b/src/xrt/targets/common/target_builder_north_star.c index 6d48b8c70..16438ea0e 100644 --- a/src/xrt/targets/common/target_builder_north_star.c +++ b/src/xrt/targets/common/target_builder_north_star.c @@ -313,16 +313,16 @@ ns_setup_depthai_device(struct ns_builder *nsb, struct xrt_frame_sink *entry_right_sink = NULL; #ifdef XRT_BUILD_DRIVER_HANDTRACKING - u_sink_split_create(&usysd->xfctx, slam_sinks->left, hand_sinks->left, &entry_left_sink); - u_sink_split_create(&usysd->xfctx, slam_sinks->right, hand_sinks->right, &entry_right_sink); + u_sink_split_create(&usysd->xfctx, slam_sinks->cams[0], hand_sinks->cams[0], &entry_left_sink); + u_sink_split_create(&usysd->xfctx, slam_sinks->cams[1], hand_sinks->cams[1], &entry_right_sink); #else - entry_left_sink = slam_sinks->left; - entry_right_sink = slam_sinks->right; + entry_left_sink = slam_sinks->cams[0]; + entry_right_sink = slam_sinks->cams[1]; #endif entry_sinks = (struct xrt_slam_sinks){ - .left = entry_left_sink, - .right = entry_right_sink, + .cams[0] = entry_left_sink, + .cams[1] = entry_right_sink, .imu = slam_sinks->imu, .gt = slam_sinks->gt, }; @@ -330,8 +330,8 @@ ns_setup_depthai_device(struct ns_builder *nsb, struct xrt_slam_sinks dummy_slam_sinks = {0}; dummy_slam_sinks.imu = entry_sinks.imu; - u_sink_force_genlock_create(&usysd->xfctx, entry_sinks.left, entry_sinks.right, &dummy_slam_sinks.left, - &dummy_slam_sinks.right); + u_sink_force_genlock_create(&usysd->xfctx, entry_sinks.cams[0], entry_sinks.cams[1], &dummy_slam_sinks.cams[0], + &dummy_slam_sinks.cams[1]); xrt_fs_slam_stream_start(the_fs, &dummy_slam_sinks);