Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nohayassin committed Mar 24, 2021
1 parent f7833ec commit 25f07ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions unit-tests/internal/internal-tests-extrinsic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,15 +452,15 @@ TEST_CASE("Controls limits validation", "[live]")
if (std::string(device.get_info(RS2_CAMERA_INFO_PRODUCT_LINE)) != "D400")
continue;
auto sensors = device.query_sensors();
float ae_limit;
float limit;
rs2_option controls[2] = { RS2_OPTION_AUTO_GAIN_LIMIT, RS2_OPTION_AUTO_EXPOSURE_LIMIT };
for (auto& control : controls)
{
for (auto& s : sensors)
{
std::string val = s.get_info(RS2_CAMERA_INFO_NAME);
if (!s.supports(control))
return;
break;
auto range = s.get_option_range(control);
float set_value[3] = { range.min - 10, range.max + 10, std::floor((range.max + range.min) / 2) };
for (auto& val : set_value)
Expand All @@ -472,8 +472,8 @@ TEST_CASE("Controls limits validation", "[live]")
else
{
s.set_option(control, val);
ae_limit = s.get_option(control);
REQUIRE(ae_limit == val);
limit = s.get_option(control);
REQUIRE(limit == val);
}
}
}
Expand Down

0 comments on commit 25f07ac

Please sign in to comment.