-
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
L515 - Add digital gain option that replace ambient light option #7563
L515 - Add digital gain option that replace ambient light option #7563
Conversation
src/l500/l500-options.cpp
Outdated
{ 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"}, |
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.
Interesting... it doesn't take the string representation from the get_string() functions?
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.
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.
src/l500/l500-options.cpp
Outdated
{ 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", |
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.
to values:
-> to:
src/rs.cpp
Outdated
@@ -1271,6 +1271,7 @@ const char* rs2_cah_trigger_to_string( rs2_cah_trigger mode ) | |||
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); } |
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.
Can we move this to right after the rs2_ambient_light
?
src/types.h
Outdated
@@ -558,6 +558,7 @@ namespace librealsense | |||
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) |
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.
Move right after rs2_ambient_light
wrappers/android/librealsense/src/main/java/com/intel/realsense/librealsense/Option.java
Show resolved
Hide resolved
22312bd
to
5d34d85
Compare
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]