-
Notifications
You must be signed in to change notification settings - Fork 5k
Pipeline new API #13135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pipeline new API #13135
Changes from 1 commit
dc62f8e
cf14296
5f151f2
d525b27
3d15731
b01bb8b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # License: Apache 2.0. See LICENSE file in root directory. | ||
|
noacoohen marked this conversation as resolved.
|
||
| # Copyright(c) 2024 Intel Corporation. All Rights Reserved. | ||
|
|
||
| # LibCI doesn't have D435i so //test:device D435I// is disabled for now | ||
| # test:device D455 | ||
|
|
||
| import pyrealsense2 as rs | ||
| from rspy import test | ||
|
|
||
| gyro_sensitivity_value = 4.0 | ||
|
|
||
| with test.closure("pipeline - set device"): | ||
| cfg = rs.config() | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Used?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, now I see, why not declare before usage? it's C++ :)
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's python :) |
||
| ctx = rs.context() | ||
|
|
||
| dev = test.find_first_device_or_exit() | ||
|
Nir-Az marked this conversation as resolved.
|
||
| motion_sensor = dev.first_motion_sensor() | ||
| pipe = rs.pipeline(ctx) | ||
| pipe.set_device(dev) | ||
|
|
||
| motion_sensor.set_option(rs.option.gyro_sensitivity, 4) | ||
|
noacoohen marked this conversation as resolved.
Outdated
|
||
|
|
||
| cfg.enable_stream(rs.stream.accel, rs.format.motion_xyz32f, 200) | ||
| cfg.enable_stream(rs.stream.gyro, rs.format.motion_xyz32f, 200) | ||
|
|
||
| profile = pipe.start(cfg) | ||
| device_from_profile = profile.get_device() | ||
| sensor = device_from_profile.first_motion_sensor() | ||
| sensor_gyro_sensitivity_value = sensor.get_option(rs.option.gyro_sensitivity) | ||
| test.check_equal(gyro_sensitivity_value, sensor_gyro_sensitivity_value) | ||
| pipe.stop() | ||
|
|
||
| test.print_results_and_exit() | ||
Uh oh!
There was an error while loading. Please reload this page.