test-presets-sanity.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 
10 using namespace rs2;
11 
12 TEST_CASE( "presets sanity", "[l500][live]" )
13 {
15  auto dev = devices[0];
16 
18 
19  auto depth_sens = dev.first< rs2::depth_sensor >();
20 
21  preset_values_map expected_values, expected_defs;
22  build_presets_to_expected_values_defs_map(dev, depth_sens, expected_values, expected_defs);
23 
24  //print_presets_to_csv( depth_sens, preset_to_expected_defaults_map);
25 
31  depth_sens,
32  expected_values,
33  expected_defs,
34  [&]( preset_mode_pair preset_mode ) { set_mode_preset( depth_sens, preset_mode ); } );
35 }
void check_presets_values(std::vector< rs2_l500_visual_preset > presets_to_check, const rs2::sensor &sens, preset_values_map &preset_to_expected_values, preset_values_map &preset_to_expected_defaults, std::function< void(preset_mode_pair) > do_before_check=nullptr, std::function< void(preset_mode_pair) > do_after_check=nullptr)
const std::string MIN_GET_DEFAULT_FW_VERSION("1.5.4.0")
std::pair< rs2_l500_visual_preset, rs2_sensor_mode > preset_mode_pair
std::map< preset_mode_pair, std::map< rs2_option, float > > preset_values_map
Definition: cah-model.h:10
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
void exit_if_fw_version_is_under(rs2::device &dev, librealsense::firmware_version version)
Definition: func-common.h:38
void build_presets_to_expected_values_defs_map(rs2::device &dev, rs2::depth_sensor &depth_sens, preset_values_map &expected_values, preset_values_map &expected_defs)
void set_mode_preset(const rs2::sensor &sens, preset_mode_pair preset_mode)
TEST_CASE("presets sanity","[l500][live]")


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