current.cpp
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2020 Intel Corporation. All Rights Reserved.
3 
4 //#cmake: static!
5 
6 #include "../presets-common.h"
7 #include <l500/l500-options.h>
8 
9 using namespace rs2;
10 
11 TEST_CASE( "move to custom after gain changed", "[l500][live]" )
12 {
14  auto dev = devices[0];
15 
17 
18  auto depth_sens = dev.first< rs2::depth_sensor >();
19 
20  for( auto preset = (float)RS2_L500_VISUAL_PRESET_NO_AMBIENT;
21  preset < (float)RS2_L500_VISUAL_PRESET_AUTOMATIC;
22  preset++ )
23  {
24  REQUIRE_NOTHROW( depth_sens.set_option( RS2_OPTION_VISUAL_PRESET, preset ) );
25 
28  = depth_sens.get_option_range( RS2_OPTION_POST_PROCESSING_SHARPENING ) );
29 
31  depth_sens.set_option( RS2_OPTION_POST_PROCESSING_SHARPENING, range.max ) );
32 
33  CAPTURE( preset );
34 
35 
36  rs2_l500_visual_preset curr_preset;
37  REQUIRE_NOTHROW( curr_preset = ( rs2_l500_visual_preset )(int)depth_sens.get_option(
39 
40  REQUIRE( curr_preset == RS2_L500_VISUAL_PRESET_CUSTOM );
41 
42  REQUIRE_NOTHROW( depth_sens.set_option( RS2_OPTION_VISUAL_PRESET, preset ) );
43  }
44 }
test-d405-calibration-stream.dev
dev
Definition: test-d405-calibration-stream.py:11
RS2_PRODUCT_LINE_L500
#define RS2_PRODUCT_LINE_L500
Definition: rs_context.h:96
RS2_L500_VISUAL_PRESET_AUTOMATIC
@ RS2_L500_VISUAL_PRESET_AUTOMATIC
Definition: rs_option.h:166
TEST_CASE
TEST_CASE("move to custom after gain changed", "[l500][live]")
Definition: current.cpp:11
RS2_L500_VISUAL_PRESET_CUSTOM
@ RS2_L500_VISUAL_PRESET_CUSTOM
Definition: rs_option.h:160
rs2::option_range
Definition: rs_types.hpp:176
REQUIRE_NOTHROW
REQUIRE_NOTHROW(rs2_log(RS2_LOG_SEVERITY_INFO, "Log message using rs2_log()", nullptr))
rs2_l500_visual_preset
rs2_l500_visual_preset
For L500 devices: provides optimized settings (presets) for specific types of usage.
Definition: rs_option.h:158
l500-options.h
rs2::depth_sensor
Definition: rs_sensor.hpp:454
REQUIRE
#define REQUIRE(...)
Definition: catch.hpp:17398
CAPTURE
#define CAPTURE(...)
Definition: catch.hpp:17432
rs2
Definition: animated.h:9
test-fg.devices
devices
Definition: test-fg.py:9
find_devices_by_product_line_or_exit
rs2::device_list find_devices_by_product_line_or_exit(int product)
Definition: live-common.h:65
RS2_OPTION_VISUAL_PRESET
@ RS2_OPTION_VISUAL_PRESET
Definition: rs_option.h:36
range
GLsizei range
Definition: glad/glad/glad.h:1535
RS2_OPTION_POST_PROCESSING_SHARPENING
@ RS2_OPTION_POST_PROCESSING_SHARPENING
Definition: rs_option.h:89
exit_if_fw_version_is_under
void exit_if_fw_version_is_under(rs2::device &dev, librealsense::firmware_version version)
Definition: live-common.h:79
RS2_L500_VISUAL_PRESET_NO_AMBIENT
@ RS2_L500_VISUAL_PRESET_NO_AMBIENT
Definition: rs_option.h:162
MIN_GET_DEFAULT_FW_VERSION
const std::string MIN_GET_DEFAULT_FW_VERSION("1.5.4.0")


librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Thu Dec 22 2022 03:13:15