Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
unit-tests
func
presets
regular-preset
move-custom
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 "../../func-common.h"
7
#include "../presets-common.h"
8
#include <
l500/l500-options.h
>
9
10
using namespace
rs2
;
11
12
TEST_CASE
(
"move to custom after gain changed"
,
"[l500][live]"
)
13
{
14
auto
devices
=
find_devices_by_product_line_or_exit
(
RS2_PRODUCT_LINE_L500
);
15
auto
dev
=
devices
[0];
16
17
exit_if_fw_version_is_under
(
dev
,
MIN_GET_DEFAULT_FW_VERSION
);
18
19
auto
depth_sens =
dev
.first<
rs2::depth_sensor
>();
20
21
for
(
auto
preset = (
float
)
RS2_L500_VISUAL_PRESET_NO_AMBIENT
;
22
preset < (float)
RS2_L500_VISUAL_PRESET_AUTOMATIC
;
23
preset++ )
24
{
25
REQUIRE_NOTHROW
( depth_sens.set_option(
RS2_OPTION_VISUAL_PRESET
, preset ) );
26
27
option_range
range
;
28
REQUIRE_NOTHROW
( range
29
= depth_sens.get_option_range(
RS2_OPTION_POST_PROCESSING_SHARPENING
) );
30
31
REQUIRE_NOTHROW
(
32
depth_sens.set_option(
RS2_OPTION_POST_PROCESSING_SHARPENING
, range.max ) );
33
34
CAPTURE
( preset );
35
36
37
rs2_l500_visual_preset
curr_preset;
38
REQUIRE_NOTHROW
( curr_preset = (
rs2_l500_visual_preset
)(
int
)depth_sens.get_option(
39
RS2_OPTION_VISUAL_PRESET
) );
40
41
REQUIRE
( curr_preset ==
RS2_L500_VISUAL_PRESET_CUSTOM
);
42
43
REQUIRE_NOTHROW
( depth_sens.set_option(
RS2_OPTION_VISUAL_PRESET
, preset ) );
44
}
45
}
MIN_GET_DEFAULT_FW_VERSION
const std::string MIN_GET_DEFAULT_FW_VERSION("1.5.4.0")
test-bad-conditions.dev
dev
Definition:
test-bad-conditions.py:16
RS2_L500_VISUAL_PRESET_AUTOMATIC
Definition:
rs_option.h:159
rs2::depth_sensor
Definition:
rs_sensor.hpp:454
RS2_L500_VISUAL_PRESET_CUSTOM
Definition:
rs_option.h:153
rs2
Definition:
cah-model.h:10
l500-options.h
CAPTURE
#define CAPTURE(...)
Definition:
catch.hpp:17432
REQUIRE
REQUIRE(n_callbacks==1)
rs2::option_range
Definition:
rs_types.hpp:176
find_devices_by_product_line_or_exit
rs2::device_list find_devices_by_product_line_or_exit(int product)
Definition:
func-common.h:24
test-fg.devices
devices
Definition:
test-fg.py:9
RS2_PRODUCT_LINE_L500
#define RS2_PRODUCT_LINE_L500
Definition:
rs_context.h:96
RS2_OPTION_POST_PROCESSING_SHARPENING
Definition:
rs_option.h:89
TEST_CASE
TEST_CASE("move to custom after gain changed","[l500][live]")
Definition:
current.cpp:12
RS2_L500_VISUAL_PRESET_NO_AMBIENT
Definition:
rs_option.h:155
range
GLsizei range
Definition:
glad/glad/glad.h:1536
REQUIRE_NOTHROW
REQUIRE_NOTHROW(rs2_log(RS2_LOG_SEVERITY_INFO,"Log message using rs2_log()", nullptr))
exit_if_fw_version_is_under
void exit_if_fw_version_is_under(rs2::device &dev, librealsense::firmware_version version)
Definition:
func-common.h:38
RS2_OPTION_VISUAL_PRESET
Definition:
rs_option.h:36
rs2_l500_visual_preset
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:47:12