Skip to content

Commit

Permalink
PR IntelRealSense#12722 from remibettan: Auto removed from d500 popup…
Browse files Browse the repository at this point in the history
…, remained in d400
  • Loading branch information
Nir-Az authored Mar 5, 2024
2 parents 2ce56a1 + 582a6aa commit 1acf84c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
9 changes: 9 additions & 0 deletions src/ds/d400/d400-color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ namespace librealsense

register_color_features();
register_options();

if (_pid != ds::RS457_PID)
{
register_metadata(color_ep);
Expand All @@ -157,6 +158,14 @@ namespace librealsense
{
_ds_color_common->register_color_options();
color_ep.register_pu(RS2_OPTION_BACKLIGHT_COMPENSATION);

auto raw_color_ep = get_raw_color_sensor();
color_ep.register_option(RS2_OPTION_POWER_LINE_FREQUENCY,
std::make_shared<uvc_pu_option>(raw_color_ep, RS2_OPTION_POWER_LINE_FREQUENCY,
std::map<float, std::string>{ { 0.f, "Disabled"},
{ 1.f, "50Hz" },
{ 2.f, "60Hz" },
{ 3.f, "Auto" }, }));
}

if (_separate_color)
Expand Down
14 changes: 14 additions & 0 deletions src/ds/d500/d500-color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,20 @@ namespace librealsense

_ds_color_common->register_color_options();

std::map< float, std::string > description_per_value = std::map<float, std::string>{
{ 0.f, "Disabled"},
{ 1.f, "50Hz" },
{ 2.f, "60Hz" } };

if (val_in_range(_pid, { ds::D555E_PID }))
{
description_per_value.insert(std::make_pair(3.f, "AUTO"));
}

color_ep.register_option(RS2_OPTION_POWER_LINE_FREQUENCY,
std::make_shared<uvc_pu_option>(raw_color_ep, RS2_OPTION_POWER_LINE_FREQUENCY,
description_per_value));

color_ep.register_pu(RS2_OPTION_AUTO_EXPOSURE_PRIORITY);

_ds_color_common->register_standard_options();
Expand Down
8 changes: 0 additions & 8 deletions src/ds/ds-color-common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,6 @@ namespace librealsense
std::make_shared<auto_disabling_control>(
white_balance_option,
auto_white_balance_option));


_color_ep.register_option(RS2_OPTION_POWER_LINE_FREQUENCY,
std::make_shared<uvc_pu_option>(_raw_color_ep, RS2_OPTION_POWER_LINE_FREQUENCY,
std::map<float, std::string>{ { 0.f, "Disabled"},
{ 1.f, "50Hz" },
{ 2.f, "60Hz" },
{ 3.f, "Auto" }, }));
}

void ds_color_common::register_standard_options()
Expand Down

0 comments on commit 1acf84c

Please sign in to comment.