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 
27  REQUIRE_NOTHROW( range
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 }
const std::string MIN_GET_DEFAULT_FW_VERSION("1.5.4.0")
void exit_if_fw_version_is_under(rs2::device &dev, librealsense::firmware_version version)
Definition: live-common.h:79
TEST_CASE("move to custom after gain changed", "[l500][live]")
Definition: current.cpp:11
Definition: animated.h:9
#define REQUIRE(...)
Definition: catch.hpp:17398
#define CAPTURE(...)
Definition: catch.hpp:17432
rs2::device_list find_devices_by_product_line_or_exit(int product)
Definition: live-common.h:65
devices
Definition: test-fg.py:9
REQUIRE_NOTHROW(rs2_log(RS2_LOG_SEVERITY_INFO, "Log message using rs2_log()", nullptr))
#define RS2_PRODUCT_LINE_L500
Definition: rs_context.h:96
GLsizei range
rs2_l500_visual_preset
For L500 devices: provides optimized settings (presets) for specific types of usage.
Definition: rs_option.h:158


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