auto-exposure-limit-feature.cpp
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2023 Intel Corporation. All Rights Reserved.
3 
4 
7 #include <src/ds/ds-private.h>
8 #include <src/sensor.h>
10 
11 
12 namespace librealsense {
13 
14 
15 const feature_id auto_exposure_limit_feature::ID = "Auto Exposure Limit feature";
16 
18  const std::shared_ptr< hw_monitor > & hw_monitor )
19 {
20  auto exposure_range = sensor.get_option( RS2_OPTION_EXPOSURE ).get_range();
21 
22  auto fw_ver = firmware_version(sensor.get_info( RS2_CAMERA_INFO_FIRMWARE_VERSION ));
23  bool new_opcode = fw_ver >= firmware_version( 5, 13, 0, 200 );
24 
25  option_range enable_range = { 0.f /*min*/, 1.f /*max*/, 1.f /*step*/, 0.f /*default*/ };
26 
27  // EXPOSURE Limit
28  auto ae_limit_toggle_control = std::make_shared< limits_option >( RS2_OPTION_AUTO_EXPOSURE_LIMIT_TOGGLE,
29  enable_range,
30  "Toggle Auto-Exposure Limit",
31  *hw_monitor,
32  new_opcode );
33  auto raw_depth_sensor = sensor.get_raw_sensor();
34  auto ae_limit_value_control = std::make_shared< auto_exposure_limit_option >( *hw_monitor,
35  raw_depth_sensor,
37  ae_limit_toggle_control,
38  new_opcode );
39  sensor.register_option( RS2_OPTION_AUTO_EXPOSURE_LIMIT_TOGGLE, ae_limit_toggle_control );
40 
41  sensor.register_option(
43  std::make_shared< auto_disabling_control >( ae_limit_value_control, ae_limit_toggle_control )) ;
44 
45 
46 }
47 
49 {
50  return ID;
51 }
52 
53 } // namespace librealsense
librealsense
Definition: algo.h:18
RS2_OPTION_AUTO_EXPOSURE_LIMIT
@ RS2_OPTION_AUTO_EXPOSURE_LIMIT
Definition: rs_option.h:114
test-librs-device-properties.sensor
sensor
Definition: test-librs-device-properties.py:40
ds-private.h
librealsense::auto_exposure_limit_feature::get_id
feature_id get_id() const override
Definition: auto-exposure-limit-feature.cpp:48
librealsense::hw_monitor
Definition: hw-monitor.h:271
RS2_OPTION_AUTO_EXPOSURE_LIMIT_TOGGLE
@ RS2_OPTION_AUTO_EXPOSURE_LIMIT_TOGGLE
Definition: rs_option.h:120
librealsense::option_range
Definition: option-interface.h:14
rs_options.hpp
sensor.h
RS2_CAMERA_INFO_FIRMWARE_VERSION
@ RS2_CAMERA_INFO_FIRMWARE_VERSION
Definition: rs_sensor.h:25
d400-options.h
librealsense::firmware_version
rsutils::version firmware_version
Definition: src/firmware-version.h:11
RS2_OPTION_EXPOSURE
@ RS2_OPTION_EXPOSURE
Definition: rs_option.h:31
librealsense::synthetic_sensor
Definition: sensor.h:208
librealsense::auto_exposure_limit_feature::ID
static const feature_id ID
Definition: auto-exposure-limit-feature.h:19
auto-exposure-limit-feature.h
librealsense::feature_id
std::string feature_id
Definition: feature-interface.h:11
test-hdr-long.exposure_range
exposure_range
Definition: test-hdr-long.py:22
librealsense::auto_exposure_limit_feature::auto_exposure_limit_feature
auto_exposure_limit_feature(synthetic_sensor &depth_sensor, const std::shared_ptr< hw_monitor > &hw_monitor)
Definition: auto-exposure-limit-feature.cpp:17


librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Mon Apr 22 2024 02:12:55