Skip to content

Commit

Permalink
PR #11703 from Nir: AE type option hot fix
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel authored Apr 19, 2023
2 parents 4e65028 + 8115d60 commit 503f497
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 1 addition & 6 deletions src/ds/d400/d400-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -810,13 +810,8 @@ namespace librealsense
{ (float)RS2_DEPTH_AUTO_EXPOSURE_REGULAR, "Regular" },
{ (float)RS2_DEPTH_AUTO_EXPOSURE_ACCELERATED, "Accelerated" } } , false);

std::vector< std::pair< std::shared_ptr< option >, std::string > > options_and_reasons
= { std::make_pair( enable_auto_exposure,
"Depth auto exposure mode cannot be set when auto exposure is enabled" ) };

depth_sensor.register_option(
RS2_OPTION_DEPTH_AUTO_EXPOSURE_MODE,
std::make_shared< gated_option >( depth_auto_exposure_mode, options_and_reasons ) );
RS2_OPTION_DEPTH_AUTO_EXPOSURE_MODE, depth_auto_exposure_mode );
}

//EXPOSURE
Expand Down
6 changes: 4 additions & 2 deletions unit-tests/live/d400/test-depth_ae_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
depth_sensor = device.first_depth_sensor()
fw_version = rsutils.version( device.get_info( rs.camera_info.firmware_version ))

if fw_version <= rsutils.version(5,15,0,0):
if fw_version < rsutils.version(5,15,0,0):
log.i(f"FW version {fw_version} does not support DEPTH_AUTO_EXPOSURE_MODE option, skipping test...")
test.print_results_and_exit()

Expand All @@ -26,10 +26,12 @@

################################################################################################

test.start("Verify cannot set when auto exposure on")
test.start("Verify can set when auto exposure on")
depth_sensor.set_option(rs.option.enable_auto_exposure, True)
test.check_equal(depth_sensor.get_option(rs.option.enable_auto_exposure), True)
depth_sensor.set_option(rs.option.auto_exposure_mode, ACCELERATED)
test.check_equal(depth_sensor.get_option(rs.option.auto_exposure_mode), ACCELERATED)
depth_sensor.set_option(rs.option.auto_exposure_mode, REGULAR)
test.check_equal(depth_sensor.get_option(rs.option.auto_exposure_mode), REGULAR)
test.finish()

Expand Down

0 comments on commit 503f497

Please sign in to comment.