Skip to content

Commit

Permalink
update l500_serializable
Browse files Browse the repository at this point in the history
  • Loading branch information
aangerma committed May 6, 2021
1 parent 33f7025 commit 1ce3ae7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/l500/l500-serializable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,15 @@ namespace librealsense
RS2_OPTION_RESET_CAMERA_ACCURACY_HEALTH };

// We have to set the sensor mode (resolution) first
auto & sensor_mode = _depth_sensor.get_option( RS2_OPTION_SENSOR_MODE );
auto found_sensor_mode = j.find( get_string( RS2_OPTION_SENSOR_MODE ) );
if( found_sensor_mode != j.end() )
if (_depth_sensor.supports_option(RS2_OPTION_SENSOR_MODE))
{
float sensor_mode_val = found_sensor_mode.value();
sensor_mode.set( sensor_mode_val );
auto & sensor_mode = _depth_sensor.get_option(RS2_OPTION_SENSOR_MODE);
auto found_sensor_mode = j.find(get_string(RS2_OPTION_SENSOR_MODE));
if (found_sensor_mode != j.end())
{
float sensor_mode_val = found_sensor_mode.value();
sensor_mode.set(sensor_mode_val);
}
}

// If a non custom preset is used, we should ignore all the settings that are
Expand Down

0 comments on commit 1ce3ae7

Please sign in to comment.