From a314fc736c46fed63f3e921b6572f0a77f7a5920 Mon Sep 17 00:00:00 2001 From: Remi Bettan Date: Mon, 1 Apr 2024 15:59:54 +0300 Subject: [PATCH] forcing only max value in range --- src/ds/d500/d500-color.cpp | 7 +------ src/ds/d500/d500-options.h | 8 +++++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/ds/d500/d500-color.cpp b/src/ds/d500/d500-color.cpp index ec92b6d9aa..4ecdc81b7b 100644 --- a/src/ds/d500/d500-color.cpp +++ b/src/ds/d500/d500-color.cpp @@ -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(raw_color_ep, RS2_OPTION_POWER_LINE_FREQUENCY, + std::make_shared(raw_color_ep, RS2_OPTION_POWER_LINE_FREQUENCY, description_per_value)); color_ep.register_pu(RS2_OPTION_AUTO_EXPOSURE_PRIORITY); diff --git a/src/ds/d500/d500-options.h b/src/ds/d500/d500-options.h index ecd84ec068..4196974412 100644 --- a/src/ds/d500/d500-options.h +++ b/src/ds/d500/d500-options.h @@ -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; } }; }