Skip to content

Commit

Permalink
forcing only max value in range
Browse files Browse the repository at this point in the history
  • Loading branch information
remibettan committed Apr 1, 2024
1 parent cac4618 commit a314fc7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
7 changes: 1 addition & 6 deletions src/ds/d500/d500-color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,8 @@ namespace librealsense
{ 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,
std::make_shared<power_line_freq_option>(raw_color_ep, RS2_OPTION_POWER_LINE_FREQUENCY,
description_per_value));

color_ep.register_pu(RS2_OPTION_AUTO_EXPOSURE_PRIORITY);
Expand Down
8 changes: 5 additions & 3 deletions src/ds/d500/d500-options.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ namespace librealsense

virtual option_range get_range() const override
{
// this range had to be harcoded to avoid collisions with linux patches
// which have been upstreamed for d400 devices
return { 0.f /*min*/, 2.f /*max*/, 1.f /*step*/, 0.f /*default*/ };
// this hardcoded max range has been done because
// some d500 devices do not support the "AUTO" value
auto range = uvc_pu_option::get_range();
range.max = 2.f;
return range;
}
};
}

0 comments on commit a314fc7

Please sign in to comment.