From debadddd17b17ac5d98ca8e0f7cbe79a2bd5926b Mon Sep 17 00:00:00 2001 From: Remi Bettan Date: Mon, 4 Mar 2024 14:00:49 +0200 Subject: [PATCH 1/3] Auto removed from d500 popup, remained in d400 --- src/ds/d400/d400-color.cpp | 9 +++++++++ src/ds/d500/d500-color.cpp | 6 ++++++ src/ds/ds-color-common.cpp | 8 -------- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/ds/d400/d400-color.cpp b/src/ds/d400/d400-color.cpp index f7c280b9bc..24d618f97d 100644 --- a/src/ds/d400/d400-color.cpp +++ b/src/ds/d400/d400-color.cpp @@ -138,6 +138,7 @@ namespace librealsense register_color_features(); register_options(); + if (_pid != ds::RS457_PID) { register_metadata(color_ep); @@ -152,6 +153,14 @@ namespace librealsense void d400_color::register_options() { auto& color_ep = get_color_sensor(); + auto raw_color_ep = get_raw_color_sensor(); + + color_ep.register_option(RS2_OPTION_POWER_LINE_FREQUENCY, + std::make_shared(raw_color_ep, RS2_OPTION_POWER_LINE_FREQUENCY, + std::map{ { 0.f, "Disabled"}, + { 1.f, "50Hz" }, + { 2.f, "60Hz" }, + { 3.f, "Auto" }, })); if (!val_in_range(_pid, { ds::RS457_PID })) { diff --git a/src/ds/d500/d500-color.cpp b/src/ds/d500/d500-color.cpp index 4cc33404dc..25319934a0 100644 --- a/src/ds/d500/d500-color.cpp +++ b/src/ds/d500/d500-color.cpp @@ -138,6 +138,12 @@ namespace librealsense _ds_color_common->register_color_options(); + color_ep.register_option(RS2_OPTION_POWER_LINE_FREQUENCY, + std::make_shared(raw_color_ep, RS2_OPTION_POWER_LINE_FREQUENCY, + std::map{ { 0.f, "Disabled"}, + { 1.f, "50Hz" }, + { 2.f, "60Hz" } })); + color_ep.register_pu(RS2_OPTION_AUTO_EXPOSURE_PRIORITY); _ds_color_common->register_standard_options(); diff --git a/src/ds/ds-color-common.cpp b/src/ds/ds-color-common.cpp index 6933ac4fda..034d3f4f53 100644 --- a/src/ds/ds-color-common.cpp +++ b/src/ds/ds-color-common.cpp @@ -44,14 +44,6 @@ namespace librealsense std::make_shared( white_balance_option, auto_white_balance_option)); - - - _color_ep.register_option(RS2_OPTION_POWER_LINE_FREQUENCY, - std::make_shared(_raw_color_ep, RS2_OPTION_POWER_LINE_FREQUENCY, - std::map{ { 0.f, "Disabled"}, - { 1.f, "50Hz" }, - { 2.f, "60Hz" }, - { 3.f, "Auto" }, })); } void ds_color_common::register_standard_options() From b14d8bd452442b59293f0a0058467cc5423b0368 Mon Sep 17 00:00:00 2001 From: Remi Bettan Date: Mon, 4 Mar 2024 15:24:37 +0200 Subject: [PATCH 2/3] power line freq option not registered for d457 --- src/ds/d400/d400-color.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ds/d400/d400-color.cpp b/src/ds/d400/d400-color.cpp index 24d618f97d..e04ec323bf 100644 --- a/src/ds/d400/d400-color.cpp +++ b/src/ds/d400/d400-color.cpp @@ -153,19 +153,19 @@ namespace librealsense void d400_color::register_options() { auto& color_ep = get_color_sensor(); - auto raw_color_ep = get_raw_color_sensor(); - - color_ep.register_option(RS2_OPTION_POWER_LINE_FREQUENCY, - std::make_shared(raw_color_ep, RS2_OPTION_POWER_LINE_FREQUENCY, - std::map{ { 0.f, "Disabled"}, - { 1.f, "50Hz" }, - { 2.f, "60Hz" }, - { 3.f, "Auto" }, })); if (!val_in_range(_pid, { ds::RS457_PID })) { _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(raw_color_ep, RS2_OPTION_POWER_LINE_FREQUENCY, + std::map{ { 0.f, "Disabled"}, + { 1.f, "50Hz" }, + { 2.f, "60Hz" }, + { 3.f, "Auto" }, })); } if (_separate_color) From 582a6aab3953fbd874df35202384adc38ba40b11 Mon Sep 17 00:00:00 2001 From: Remi Bettan Date: Tue, 5 Mar 2024 09:56:28 +0200 Subject: [PATCH 3/3] enable AUTO for D555e --- src/ds/d500/d500-color.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/ds/d500/d500-color.cpp b/src/ds/d500/d500-color.cpp index 25319934a0..ec92b6d9aa 100644 --- a/src/ds/d500/d500-color.cpp +++ b/src/ds/d500/d500-color.cpp @@ -138,11 +138,19 @@ namespace librealsense _ds_color_common->register_color_options(); + std::map< float, std::string > description_per_value = std::map{ + { 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(raw_color_ep, RS2_OPTION_POWER_LINE_FREQUENCY, - std::map{ { 0.f, "Disabled"}, - { 1.f, "50Hz" }, - { 2.f, "60Hz" } })); + description_per_value)); color_ep.register_pu(RS2_OPTION_AUTO_EXPOSURE_PRIORITY);