diff --git a/src/ds5/ds5-active.cpp b/src/ds5/ds5-active.cpp index 29e80b2dc2..583c151d33 100644 --- a/src/ds5/ds5-active.cpp +++ b/src/ds5/ds5-active.cpp @@ -48,17 +48,19 @@ namespace librealsense if (auto hdr_enabled_option = depth_ep.get_option_handler(RS2_OPTION_HDR_ENABLED)) { + std::vector, std::string>> emitter_options_and_reasons = { std::make_pair(hdr_enabled_option, + "Emitter status cannot be set while HDR is enabled")}; depth_ep.register_option(RS2_OPTION_EMITTER_ENABLED, std::make_shared( emitter_enabled, - hdr_enabled_option, - "Emitter status cannot be set while HDR is enabled")); + emitter_options_and_reasons)); + std::vector, std::string>> laser_options_and_reasons = { std::make_pair(hdr_enabled_option, + "Laser Power status cannot be set while HDR is enabled") }; depth_ep.register_option(RS2_OPTION_LASER_POWER, std::make_shared( laser_power_auto_disabling, - hdr_enabled_option, - "Laser Power status cannot be set while HDR is enabled")); + laser_options_and_reasons)); } else { diff --git a/src/ds5/ds5-device.cpp b/src/ds5/ds5-device.cpp index a00ac64edb..ce5f27bc68 100644 --- a/src/ds5/ds5-device.cpp +++ b/src/ds5/ds5-device.cpp @@ -819,11 +819,12 @@ namespace librealsense exposure_option = hdr_conditional_exposure_option; gain_option = hdr_conditional_gain_option; + std::vector, std::string>> options_and_reasons = { std::make_pair(hdr_enabled_option, + "Auto Exposure cannot be set while HDR is enabled") }; depth_sensor.register_option(RS2_OPTION_ENABLE_AUTO_EXPOSURE, std::make_shared( enable_auto_exposure, - hdr_enabled_option, - "Auto Exposure cannot be set while HDR is enabled")); + options_and_reasons)); } else { @@ -850,13 +851,36 @@ namespace librealsense if ((_fw_version >= firmware_version("5.11.3.0")) && ((_device_capabilities & mask) == mask)) { auto alternating_emitter_opt = std::make_shared(*_hw_monitor, &raw_depth_sensor, is_fw_version_using_id); + auto emitter_always_on_opt = std::make_shared(*_hw_monitor, &depth_sensor); + + if ((_fw_version >= firmware_version("5.12.1.0")) && ((_device_capabilities & d400_caps::CAP_GLOBAL_SHUTTER) == d400_caps::CAP_GLOBAL_SHUTTER)) + { + std::vector, std::string>> options_and_reasons = { std::make_pair(alternating_emitter_opt, + "Emitter always ON cannot be set while Emitter ON/OFF is enabled")}; + depth_sensor.register_option(RS2_OPTION_EMITTER_ALWAYS_ON, + std::make_shared( + emitter_always_on_opt, + options_and_reasons)); + } + if (_fw_version >= hdr_firmware_version) { + std::vector, std::string>> options_and_reasons = { std::make_pair(hdr_enabled_option, "Emitter ON/OFF cannot be set while HDR is enabled"), + std::make_pair(emitter_always_on_opt, "Emitter ON/OFF cannot be set while Emitter always ON is enabled") }; depth_sensor.register_option(RS2_OPTION_EMITTER_ON_OFF, std::make_shared( alternating_emitter_opt, - hdr_enabled_option, - "Emitter ON/OFF cannot be set while HDR is enabled")); + options_and_reasons + )); + } + else if ((_fw_version >= firmware_version("5.12.1.0")) && ((_device_capabilities & d400_caps::CAP_GLOBAL_SHUTTER) == d400_caps::CAP_GLOBAL_SHUTTER)) + { + std::vector, std::string>> options_and_reasons = { std::make_pair(emitter_always_on_opt, + "Emitter ON/OFF cannot be set while Emitter always ON is enabled") }; + depth_sensor.register_option(RS2_OPTION_EMITTER_ON_OFF, + std::make_shared( + alternating_emitter_opt, + options_and_reasons)); } else { @@ -869,10 +893,7 @@ namespace librealsense depth_sensor.register_option(RS2_OPTION_EMITTER_ON_OFF, std::make_shared(*_hw_monitor, &raw_depth_sensor)); } - if ((_fw_version >= firmware_version("5.12.1.0")) && ((_device_capabilities & d400_caps::CAP_GLOBAL_SHUTTER) == d400_caps::CAP_GLOBAL_SHUTTER)) - { - depth_sensor.register_option(RS2_OPTION_EMITTER_ALWAYS_ON, std::make_shared(*_hw_monitor, &depth_sensor)); - } + if (_fw_version >= firmware_version("5.12.4.0") && (_device_capabilities & d400_caps::CAP_GLOBAL_SHUTTER) == d400_caps::CAP_GLOBAL_SHUTTER) { diff --git a/src/option.h b/src/option.h index ebe27b5636..d0f6eab631 100644 --- a/src/option.h +++ b/src/option.h @@ -592,28 +592,40 @@ namespace librealsense { public: explicit gated_option(std::shared_ptr