Skip to content

Options: add BOOLEAN & ENUM; rs2_set_option_value - #12708

Merged
maloel merged 17 commits into
realsenseai:developmentfrom
maloel:bool-enum
Mar 4, 2024
Merged

Options: add BOOLEAN & ENUM; rs2_set_option_value#12708
maloel merged 17 commits into
realsenseai:developmentfrom
maloel:bool-enum

Conversation

@maloel

@maloel maloel commented Feb 26, 2024

Copy link
Copy Markdown
Contributor

Followup to previous options PR:

  • add is_valid member to rs2_option_value
  • add BOOLEAN and ENUM option types
  • added tests for librealsense interoperability
  • options now have get_value() returning json and get_value_type()
  • get booleans and enums with the old APIs (to get them as floats)
  • add rs2::options_list::get_supported_option_values() alongside get_supported_options() (the latter only returned the option IDs; now you can get the values, as well)
  • set with rs2_set_option
  • added rs2_set_option_value, enabling string (IP address, enum, etc.) sets
  • revise Viewer options handling and fix crash caused by changes in JSON-based DDS options #12650 (HSD 15015552561)
  • fix options_watcher querying options that aren't enabled (and in thermal loop)

@maloel
maloel requested a review from OhadMeir February 26, 2024 20:16
Comment thread src/dds/rs-dds-option.cpp
Comment thread src/dds/rs-dds-option.cpp Outdated
@maloel maloel changed the title Options: add BOOLEAN & ENUM Options: add BOOLEAN & ENUM; rs2_set_option_value Mar 1, 2024
Comment thread src/rs.cpp
Comment thread src/rs.cpp Outdated
Comment thread src/dds/rs-dds-option.cpp Outdated
Comment thread unit-tests/dds/test-option-value.py
Comment thread common/option-model.cpp Outdated

try
{
int tmp_selected = selected;

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

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...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@maloel
maloel merged commit a65aa0b into realsenseai:development Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants