alt-ir/test-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 //#test:device L500*
5 
6 #include "../func-common.h"
7 #include "alt-ir-common.h"
8 
9 using namespace rs2;
10 
11 TEST_CASE( "AltIR", "[l500][live]" )
12 {
14  auto dev = devices[0];
15 
16  auto depth_sens = dev.first< rs2::depth_sensor >();
17  if( alt_ir_supported_or_message( depth_sens ) )
18  {
20  REQUIRE_NOTHROW( r = depth_sens.get_option_range( RS2_OPTION_ALTERNATE_IR ) );
21 
22  for( auto i = r.min; i <= r.max; i += r.step )
23  {
24  // Outside of streaming, no delay is expected between set and get
25  CHECK_NOTHROW( depth_sens.set_option( RS2_OPTION_ALTERNATE_IR, i ) );
26  CHECK( depth_sens.get_option( RS2_OPTION_ALTERNATE_IR ) == i );
27  }
28  }
29 }
Definition: cah-model.h:10
bool alt_ir_supported_or_message(const rs2::depth_sensor &depth_sens)
Definition: alt-ir-common.h:10
GLdouble GLdouble r
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
TEST_CASE("AltIR","[l500][live]")
#define CHECK_NOTHROW(...)
Definition: catch.hpp:17421
REQUIRE_NOTHROW(rs2_log(RS2_LOG_SEVERITY_INFO,"Log message using rs2_log()", nullptr))
int i
#define CHECK(condition)


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