Go to the documentation of this file.00001
00002
00003
00005
00007
00008 #if !defined(MAKEFILE) || ( defined(LIVE_TEST) && defined(R200_TEST) )
00009
00010 #include "catch/catch.hpp"
00011 #include "unit-tests-live-ds-common.h"
00012
00013 #include <climits>
00014 #include <sstream>
00015
00017
00019
00020 TEST_CASE("R200 device-unique options support", "[live] [DS-device]")
00021 {
00022
00023 safe_context ctx;
00024 const int device_count = rs_get_device_count(ctx, require_no_error());
00025 REQUIRE(device_count > 0);
00026
00027
00028 for (int i = 0; i<device_count; ++i)
00029 {
00030 rs_device * dev = rs_get_device(ctx, 0, require_no_error());
00031 REQUIRE(dev != nullptr);
00032 REQUIRE(ds_names[Intel_R200] == rs_get_device_name(dev, require_no_error()));
00033
00034
00035 rs_set_device_option(dev, RS_OPTION_R200_LR_AUTO_EXPOSURE_ENABLED, 1.0, require_no_error());
00036
00037 const int supported_options[] = {
00038 RS_OPTION_R200_AUTO_EXPOSURE_BRIGHT_RATIO_SET_POINT,
00039 RS_OPTION_R200_AUTO_EXPOSURE_KP_GAIN,
00040 RS_OPTION_R200_AUTO_EXPOSURE_KP_EXPOSURE,
00041 RS_OPTION_R200_AUTO_EXPOSURE_KP_DARK_THRESHOLD,
00042 };
00043
00044 std::stringstream ss;
00045 for (auto opt : supported_options)
00046 {
00047 ss.str(""); ss << "Verifying support for R200-specific: " << rs_option_to_string((rs_option)i);
00048 REQUIRE(rs_device_supports_option(dev, (rs_option)i, require_no_error()) == 1);
00049 }
00050 }
00051 }
00052
00053 TEST_CASE( "R200 streams HD Raw10", "[live] [r200] [one-camera]" )
00054 {
00055 test_ds_device_streaming({{RS_STREAM_COLOR, 1920, 1080, RS_FORMAT_RAW10, 30}});
00056 }
00057
00058
00059
00060
00061
00062
00063
00064 #endif