mode-change/test-preset.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 //#test:device L500*
6 
7 #include "../../../func-common.h"
8 #include "../../presets-common.h"
9 #include <l500/l500-options.h>
10 
11 using namespace rs2;
12 TEST_CASE( "stay at the same preset after resolution changed", "[l500][live]" )
13 {
15  auto dev = devices[0];
16 
18 
19  auto depth_sens = dev.first< rs2::depth_sensor >();
20 
21  // print_presets_to_csv( depth_sens, preset_to_expected_map );
23  {
24  for( int gain = RS2_DIGITAL_GAIN_HIGH; gain < RS2_DIGITAL_GAIN_LOW; gain++ )
25  {
26  depth_sens.set_option( RS2_OPTION_VISUAL_PRESET, preset_mode.first);
27  depth_sens.set_option( RS2_OPTION_SENSOR_MODE, preset_mode.second);
28 
29  rs2_l500_visual_preset curr_preset;
30  REQUIRE_NOTHROW( curr_preset = ( rs2_l500_visual_preset )(int)depth_sens.get_option(
32 
33  REQUIRE( curr_preset == preset_mode.first);
34  }
35  } );
36 }
const std::string MIN_GET_DEFAULT_FW_VERSION("1.5.4.0")
std::pair< rs2_l500_visual_preset, rs2_sensor_mode > preset_mode_pair
Definition: cah-model.h:10
REQUIRE(n_callbacks==1)
rs2::device_list find_devices_by_product_line_or_exit(int product)
Definition: func-common.h:24
devices
Definition: test-fg.py:9
#define RS2_PRODUCT_LINE_L500
Definition: rs_context.h:96
REQUIRE_NOTHROW(rs2_log(RS2_LOG_SEVERITY_INFO,"Log message using rs2_log()", nullptr))
void exit_if_fw_version_is_under(rs2::device &dev, librealsense::firmware_version version)
Definition: func-common.h:38
void for_each_preset_mode_combination(std::function< void(preset_mode_pair) > action)
TEST_CASE("stay at the same preset after resolution changed","[l500][live]")
rs2_l500_visual_preset
For L500 devices: provides optimized settings (presets) for specific types of usage.
Definition: rs_option.h:151


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:11