L515 - Add digital gain option that replace ambient light option - #7563
Merged
maloel merged 7 commits intoOct 19, 2020
Conversation
maloel
reviewed
Oct 18, 2020
maloel
reviewed
Oct 18, 2020
maloel
reviewed
Oct 18, 2020
maloel
reviewed
Oct 18, 2020
maloel
reviewed
Oct 18, 2020
maloel
reviewed
Oct 18, 2020
maloel
reviewed
Oct 18, 2020
| { float(RS2_AMBIENT_LIGHT_LOW_AMBIENT), "Low Ambient" }})); | ||
| (RS2_OPTION_VISUAL_PRESET, std::make_shared<uvc_xu_option<int >>(raw_depth_sensor, ivcam2::depth_xu, ivcam2::L500_DIGITAL_GAIN, | ||
| "Change the depth digital gain to: 1 for high gain and 2 for low gain", | ||
| std::map<float, std::string>{ { float(RS2_DIGITAL_GAIN_HIGH_GAIN), "High Gain"}, |
Contributor
There was a problem hiding this comment.
Interesting... it doesn't take the string representation from the get_string() functions?
Collaborator
Author
There was a problem hiding this comment.
It was implemented this way with ambient light so I kept it.
If I remove the map the viewer will display it as a slider (we don't want it), the strings map makes the viewer display it as a combo box.
maloel
reviewed
Oct 18, 2020
| { RS2_AMBIENT_LIGHT_LOW_AMBIENT, "Low Ambient" }}); | ||
| _digital_gain = register_option<uvc_xu_option<int>, uvc_sensor&, platform::extension_unit, uint8_t, std::string, const std::map<float, std::string>& > | ||
| (RS2_OPTION_DIGITAL_GAIN, raw_depth_sensor, ivcam2::depth_xu, ivcam2::L500_DIGITAL_GAIN, | ||
| "Change the depth digital gain to values: 1 for high gain and 2 for low gain", |
maloel
reviewed
Oct 18, 2020
maloel
reviewed
Oct 18, 2020
| const char* rs2_calibration_type_to_string(rs2_calibration_type type) { return get_string(type); } | ||
| const char* rs2_calibration_status_to_string(rs2_calibration_status status) { return get_string(status); } | ||
| const char* rs2_host_perf_mode_to_string(rs2_host_perf_mode mode) { return get_string(mode); } | ||
| const char* rs2_digital_gain_to_string(rs2_digital_gain gain) { return get_string(gain); } |
Contributor
There was a problem hiding this comment.
Can we move this to right after the rs2_ambient_light?
maloel
reviewed
Oct 18, 2020
| RS2_ENUM_HELPERS_CUSTOMIZED(rs2_ambient_light, RS2_AMBIENT_LIGHT_NO_AMBIENT, RS2_AMBIENT_LIGHT_LOW_AMBIENT) | ||
| RS2_ENUM_HELPERS(rs2_cah_trigger, CAH_TRIGGER) | ||
| RS2_ENUM_HELPERS(rs2_host_perf_mode, HOST_PERF) | ||
| RS2_ENUM_HELPERS_CUSTOMIZED(rs2_digital_gain, RS2_DIGITAL_GAIN_HIGH_GAIN, RS2_DIGITAL_GAIN_LOW_GAIN) |
Contributor
There was a problem hiding this comment.
Move right after rs2_ambient_light
maloel
reviewed
Oct 18, 2020
maloel
reviewed
Oct 18, 2020
maloel
reviewed
Oct 18, 2020
Nir-Az
force-pushed
the
add_digital_gain_option_2
branch
from
October 18, 2020 18:55
22312bd to
5d34d85
Compare
maloel
reviewed
Oct 19, 2020
maloel
approved these changes
Oct 19, 2020
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.
Original Requirement : "Rename ambient light option to digital gain"
Add digital gain option at same option value as ambient light
Add comment on LRS API option ambient light that it is deprecates
Replace ambient light option registration with digital gain option (same value for both) from L515 depth sensor
Add it to all wrappers
Add special case for python wrapper for dealing with 2 options with the same value
no ambient == high gain
Tested on:
Tracked on [RS5-9152]