-
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
Min Distance can't get higher value than the Max Distance #6564
Conversation
7d31065
to
72ed5be
Compare
src/rs.cpp
Outdated
@@ -534,6 +534,21 @@ void rs2_set_option(const rs2_options* options, rs2_option option, float value, | |||
VALIDATE_NOT_NULL(options); | |||
VALIDATE_OPTION(options, option); | |||
options->options->get_option(option).set(value); | |||
|
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.
The logic should be dowstreamed from the API level to the core class, in a way that resembles the Auto-exposure/manual gain relationship.
src/rs.cpp
Outdated
|
||
if (option == RS2_OPTION_MIN_DISTANCE) { | ||
float max_val = options->options->get_option(RS2_OPTION_MAX_DISTANCE).query(); | ||
if (max_val < value) { |
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.
This flow will result in having min=max=val. It is not clear that this is better than throwing exception
72ed5be
to
4537f40
Compare
src/option.h
Outdated
|
||
/** \brief class provided a control | ||
* that changes min distance when changing the max distance value */ | ||
class max_distance_control : public proxy_option |
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 call these options and not controls?
|
||
void enable_recording(std::function<void(const option &)> record_action) override | ||
{ | ||
_recording_function = record_action; |
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.
Shouldn't this call _proxy->enable_recording(...)
?
I'm OK leaving it as-is, since that's the way it was before, but I'll get @ev-mp input...
Min Distance can't get higher value than the Max Distance in Threshold Filter and Depth Visualization
Tracked on: DSO-12346, DSO-12163, RS5-8689