-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Setting preset does not update color options for D500 #12272
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
fcd1955
D500 devices do not change color options when setting visual preset
OhadMeir 6d2d918
Do not run live presets test on GHA
OhadMeir f5d9cbc
Adjust test to older python versions
OhadMeir 61d6684
Fix LibCI test run
OhadMeir 1c5553f
D457 does not support Hue, use Gain instead
OhadMeir 21b5f1f
Using Gain is problematic, use Hue and skip unsupporting modules e.g.…
OhadMeir File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# License: Apache 2.0. See LICENSE file in root directory. | ||
# Copyright(c) 2023 Intel Corporation. All Rights Reserved. | ||
|
||
# test:donotrun:gha | ||
|
||
import pyrealsense2 as rs | ||
from rspy import test | ||
from rspy import log | ||
|
||
dev = test.find_first_device_or_exit() | ||
depth_sensor = dev.first_depth_sensor() | ||
color_sensor = dev.first_color_sensor() | ||
product_line = dev.get_info(rs.camera_info.product_line) | ||
|
||
|
||
with test.closure( 'visual preset support', on_fail=test.ABORT ): # No use continuing the test if there is no preset support | ||
test.check( depth_sensor.supports(rs.option.visual_preset) ) | ||
|
||
with test.closure( 'set presets' ): | ||
depth_sensor.set_option( rs.option.visual_preset, int(rs.rs400_visual_preset.high_accuracy ) ) | ||
test.check( depth_sensor.get_option( rs.option.visual_preset ) == rs.rs400_visual_preset.high_accuracy ) | ||
depth_sensor.set_option( rs.option.visual_preset, int(rs.rs400_visual_preset.default ) ) | ||
test.check( depth_sensor.get_option( rs.option.visual_preset ) == rs.rs400_visual_preset.default ) | ||
|
||
with test.closure( 'save/load preset' ): | ||
am_dev = rs.rs400_advanced_mode(dev) | ||
saved_values = am_dev.serialize_json() | ||
depth_control_group = am_dev.get_depth_control() | ||
depth_control_group.textureCountThreshold = 250 | ||
am_dev.set_depth_control( depth_control_group ) | ||
test.check( depth_sensor.get_option( rs.option.visual_preset ) == rs.rs400_visual_preset.custom ) | ||
|
||
am_dev.load_json( saved_values ) | ||
test.check( am_dev.get_depth_control().textureCountThreshold != 250 ) | ||
|
||
with test.closure( 'setting color options' ): | ||
color_sensor.set_option( rs.option.hue, 123 ) | ||
test.check( color_sensor.get_option( rs.option.hue ) == 123 ) | ||
|
||
depth_sensor.set_option( rs.option.visual_preset, int(rs.rs400_visual_preset.default ) ) | ||
if product_line == "D400": | ||
# D400 devices set color options as part of preset setting | ||
test.check( color_sensor.get_option( rs.option.hue ) != 123 ) | ||
elif product_line == "D500": | ||
# D500 devices do not set color options as part of preset setting | ||
test.check( color_sensor.get_option( rs.option.hue ) == 123 ) | ||
else: | ||
raise RuntimeError( 'unsupported product line' ) | ||
|
||
|
||
test.print_results_and_exit() |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does it means?
Where would this test run?
Aren't we missing
#device d400*
#device D500*? (not sure it will work)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beside that question, great test!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked,
LibCI: -D- test-live-options-presets is not live; skipping
GHA - -D- test-live-options-presets is marked do-not-run; skipping
GHA is not running live tests IMO.
You should add the matching #device keywords