The open source OpenXR runtime
0
fork

Configure Feed

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

t/common: Fix North Star builder

Closes #296

+20 -13
+20 -13
src/xrt/targets/common/target_builder_north_star.c
··· 273 273 #ifdef XRT_BUILD_DRIVER_DEPTHAI 274 274 static xrt_result_t 275 275 ns_setup_depthai_device(struct ns_builder *nsb, 276 - struct u_system_devices *usysd, 276 + struct xrt_frame_context *xfctx, 277 277 struct xrt_device **out_hand_device, 278 278 struct xrt_device **out_head_device) 279 279 { ··· 285 285 settings.want_cameras = true; 286 286 settings.want_imu = true; 287 287 288 - struct xrt_fs *the_fs = depthai_fs_slam(&usysd->xfctx, &settings); 288 + struct xrt_fs *the_fs = depthai_fs_slam(xfctx, &settings); 289 289 290 290 if (the_fs == NULL) { 291 291 return XRT_ERROR_DEVICE_CREATION_FAILED; ··· 311 311 extra_camera_info.views[0].boundary_type = HT_IMAGE_BOUNDARY_NONE; 312 312 extra_camera_info.views[1].boundary_type = HT_IMAGE_BOUNDARY_NONE; 313 313 314 - int create_status = ht_device_create(&usysd->xfctx, // 315 - calib, // 316 - extra_camera_info, // 317 - &hand_sinks, // 318 - out_hand_device); 314 + int create_status = ht_device_create( // 315 + xfctx, // 316 + calib, // 317 + extra_camera_info, // 318 + &hand_sinks, // 319 + out_hand_device); // 319 320 t_stereo_camera_calibration_reference(&calib, NULL); 320 321 if (create_status != 0) { 321 322 return XRT_ERROR_DEVICE_CREATION_FAILED; ··· 323 324 #endif 324 325 325 326 struct xrt_slam_sinks *slam_sinks = NULL; 326 - xret = twrap_slam_create_device(&usysd->xfctx, XRT_DEVICE_DEPTHAI, &slam_sinks, out_head_device); 327 + xret = twrap_slam_create_device(xfctx, XRT_DEVICE_DEPTHAI, &slam_sinks, out_head_device); 327 328 if (xret != XRT_SUCCESS) { 328 329 U_LOG_E("twrap_slam_create_device: %u", xret); 329 330 return xret; ··· 338 339 struct xrt_frame_sink *entry_right_sink = NULL; 339 340 340 341 #ifdef XRT_BUILD_DRIVER_HANDTRACKING 341 - u_sink_split_create(&usysd->xfctx, slam_sinks->cams[0], hand_sinks->cams[0], &entry_left_sink); 342 - u_sink_split_create(&usysd->xfctx, slam_sinks->cams[1], hand_sinks->cams[1], &entry_right_sink); 342 + u_sink_split_create(xfctx, slam_sinks->cams[0], hand_sinks->cams[0], &entry_left_sink); 343 + u_sink_split_create(xfctx, slam_sinks->cams[1], hand_sinks->cams[1], &entry_right_sink); 343 344 #else 344 345 entry_left_sink = slam_sinks->cams[0]; 345 346 entry_right_sink = slam_sinks->cams[1]; ··· 355 356 struct xrt_slam_sinks dummy_slam_sinks = {0}; 356 357 dummy_slam_sinks.imu = entry_sinks.imu; 357 358 358 - u_sink_force_genlock_create(&usysd->xfctx, entry_sinks.cams[0], entry_sinks.cams[1], &dummy_slam_sinks.cams[0], 359 - &dummy_slam_sinks.cams[1]); 359 + u_sink_force_genlock_create( // 360 + xfctx, // 361 + entry_sinks.cams[0], // 362 + entry_sinks.cams[1], // 363 + &dummy_slam_sinks.cams[0], // 364 + &dummy_slam_sinks.cams[1]); // 360 365 361 366 xrt_fs_slam_stream_start(the_fs, &dummy_slam_sinks); 362 367 ··· 445 450 // Use the static system devices helper, no dynamic roles. 446 451 struct u_system_devices_static *usysds = u_system_devices_static_allocate(); 447 452 struct xrt_system_devices *xsysd = &usysds->base.base; 453 + struct xrt_frame_context *xfctx = &usysds->base.xfctx; 448 454 449 455 if (out_xsysd == NULL || *out_xsysd != NULL) { 450 456 NS_ERROR("Invalid output system pointer"); ··· 501 507 if (nsb->depthai_device.active) { 502 508 #ifdef XRT_BUILD_DRIVER_DEPTHAI 503 509 NS_INFO("Using DepthAI device!"); 504 - ns_setup_depthai_device(nsb, usysd, &hand_device, &slam_device); 510 + ns_setup_depthai_device(nsb, xfctx, &hand_device, &slam_device); 505 511 head_offset = nsb->depthai_device.P_middleofeyes_to_imu_oxr; 506 512 ns_compute_depthai_ht_offset(&nsb->depthai_device.P_imu_to_left_camera_basalt, &hand_offset); 507 513 // got_head_tracker = true; 508 514 #else 515 + (void)xfctx; 509 516 NS_ERROR("DepthAI head+hand tracker specified in config but DepthAI support was not compiled in!"); 510 517 #endif 511 518