Skip to content
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

Enable runtime exposure update in HDR mode #12908

Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/ds/ds-options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,22 @@ namespace librealsense
void hdr_conditional_option::set(float value)
{
if (_hdr_cfg->is_config_in_process())
_hdr_option->set(value);
{
if( _hdr_cfg->is_enabled() )
Nir-Az marked this conversation as resolved.
Show resolved Hide resolved
{
// Changing exposure while HDR is enabled was requested by customers.It is currently disabled by D400
// FW, so we workaround it by disabling HDR,changing exposure and enabling again.Disabling/Enabling
// resets the sequence index so we need to keep and restore it.
auto _current_hdr_sequence_index = _hdr_cfg->get( RS2_OPTION_SEQUENCE_ID );
_hdr_cfg->set( RS2_OPTION_HDR_ENABLED, 0, { 0, 1, 1, 0 } );
_hdr_cfg->set( RS2_OPTION_SEQUENCE_ID, _current_hdr_sequence_index, { 0, 2, 1, 0 } );
_hdr_option->set( value );
_hdr_cfg->set( RS2_OPTION_HDR_ENABLED, 1, { 0, 1, 1, 0 } );
_hdr_cfg->set( RS2_OPTION_SEQUENCE_ID, _current_hdr_sequence_index, { 0, 2, 1, 0 } );
Nir-Az marked this conversation as resolved.
Show resolved Hide resolved
}
else
_hdr_option->set( value );
}
else
{
if (_hdr_cfg->is_enabled())
Expand Down