Skip to content

Conversation

@aangerma
Copy link
Contributor

@aangerma aangerma commented Feb 1, 2021

In custom mode we need to update the sensor with sensor mode before start.

auto depth_profile = dev.get_stream(RS2_STREAM_DEPTH);
auto w = depth_profile.as<video_stream_profile>().width();
auto h = depth_profile.as<video_stream_profile>().height();
depth_sensor.set_option(RS2_OPTION_SENSOR_MODE, resolution_from_width_height(w, h));
Copy link
Collaborator

Choose a reason for hiding this comment

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

The option is L500-only. Will throws with D400

@maloel maloel requested a review from ev-mp February 1, 2021 18:09
Copy link
Collaborator

@ev-mp ev-mp left a comment

Choose a reason for hiding this comment

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

Looks Ok, some minor fix is required

{ RS2_L500_VISUAL_PRESET_LOW_AMBIENT, { RS2_DIGITAL_GAIN_LOW, defualt_laser } },
{ RS2_L500_VISUAL_PRESET_SHORT_RANGE, { RS2_DIGITAL_GAIN_LOW, max_laser } } };
{ RS2_L500_VISUAL_PRESET_LOW_AMBIENT, { RS2_DIGITAL_GAIN_LOW, max_laser } },
{ RS2_L500_VISUAL_PRESET_SHORT_RANGE, { RS2_DIGITAL_GAIN_LOW, defualt_laser } } };
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo - default


const std::map< rs2_l500_visual_preset, std::pair< rs2_digital_gain, presets_useful_laser_values > >
preset_to_gain_and_laser_map
= { { RS2_L500_VISUAL_PRESET_NO_AMBIENT, { RS2_DIGITAL_GAIN_HIGH, defualt_laser } },
Copy link
Collaborator

Choose a reason for hiding this comment

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

default

@maloel maloel merged commit 7e72d61 into IntelRealSense:development Feb 1, 2021
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.

3 participants