test-streaming.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 // This test checks that if we are on custom preset and start streaming,
13 // with profile that has different resolution than the value of the
14 // sensor mode control LRS don't throw an exception and update the
15 // sensor mode according the profile
16 TEST_CASE( "sensor mode change while streaming on custom", "[l500][live]" )
17 {
19  auto dev = devices[0];
20 
22 
23  auto depth_sens = dev.first< rs2::depth_sensor >();
24 
26 
29 
31 
32  auto curr_sensor_mode = RS2_SENSOR_MODE_VGA;
33  REQUIRE_NOTHROW(curr_sensor_mode = (rs2_sensor_mode)(int)depth_sens.get_option(RS2_OPTION_SENSOR_MODE));
34  REQUIRE(curr_sensor_mode == RS2_SENSOR_MODE_XGA);
35 
36  stop_depth(depth_sens);
37 }
const std::string MIN_GET_DEFAULT_FW_VERSION("1.5.4.0")
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
rs2_sensor_mode
For setting the camera_mode option.
Definition: rs_option.h:165
void stop_depth(const rs2::sensor &sens)
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 reset_camera_preset_mode_to_defaults(const rs2::sensor &sens)
TEST_CASE("sensor mode change while streaming on custom","[l500][live]")
void start_depth_ir_confidence(const rs2::sensor &sens, rs2_sensor_mode mode=RS2_SENSOR_MODE_VGA)


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