-
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
Options: add BOOLEAN & ENUM; rs2_set_option_value #12708
Conversation
common/option-model.cpp
Outdated
labels.push_back( endpoint->get_option_value_description( opt, i ) ); | ||
} | ||
int selected; | ||
std::vector< const char * > labels = get_combo_labels( &selected ); | ||
ImGui::PushStyleColor( ImGuiCol_TextSelectedBg, { 1, 1, 1, 1 } ); | ||
|
||
try | ||
{ | ||
int tmp_selected = selected; |
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.
Why do we need tmp_selected, can't we just use selected?
Don't we need to update selected 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.
You're right, it should be possible to just use selected
. Doesn't look like selected
is used after...
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.
Done
Followup to previous options PR:
is_valid
member tors2_option_value
BOOLEAN
andENUM
option typesget_value()
returning json andget_value_type()
rs2::options_list::get_supported_option_values()
alongsideget_supported_options()
(the latter only returned the option IDs; now you can get the values, as well)rs2_set_option
rs2_set_option_value
, enabling string (IP address, enum, etc.) setsoptions_watcher
querying options that aren't enabled (and in thermal loop)