Add sensor extensions - #5468
Merged
Merged
Conversation
sr300_color_sensor and l500_color_sensor inherit from color_sensor.
ev-mp
reviewed
Dec 17, 2019
ev-mp
left a comment
Contributor
There was a problem hiding this comment.
Pls verify C#, Matlab and NodeJS bindings
| std::string("0B3A"), | ||
| std::string("0B3D") })) | ||
| { | ||
| WARN("Skipping test - no motion sensor is device type: " << PID.first << (PID.second ? " USB3" : " USB2")); |
| } | ||
| } | ||
|
|
||
| TEST_CASE("color sensor API", "[live][options]") |
Contributor
There was a problem hiding this comment.
It is better to rearrange the test so that there will be a concentrated map of all the sensors extensions per PID for clearness and maintenance instead of having separate tests per sensor type.
| TEST_CASE("color sensor API", "[live][options]") | ||
| { | ||
| rs2::context ctx; | ||
| if (make_context(SECTION_FROM_TEST_NAME, &ctx, "2.17.1")) |
| REQUIRE(profile); | ||
| REQUIRE_NOTHROW(dev = profile.get_device()); | ||
| REQUIRE(dev); | ||
| dev_type PID = get_PID(dev); |
Contributor
There was a problem hiding this comment.
Using pipe can be avoided here as you'd probably iterate over ctx.query_devices() list
dorodnic
approved these changes
Dec 30, 2019
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add color_sensor, motion_sensor and fisheye_sensor extensions.
Enable the option to dev.firstrs2::color_sensor() or sensor.isrs2::color_sensor() etc.