Skip to content

Commit

Permalink
PR #7885 from Eran: Fix error during AC when alt-IR isn't available
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel authored Dec 2, 2020
2 parents 3baa830 + 69834bf commit 66580bc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/l500/ac-trigger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1264,10 +1264,9 @@ namespace ivcam2 {
auto alt_ir_is_on = false;
try
{
auto& alt_ir_opt = _dev.get_depth_sensor().get_option( RS2_OPTION_ALTERNATE_IR );
auto val = alt_ir_opt.query();
if( val == 1.f )
alt_ir_is_on = true;
auto & depth_sensor = _dev.get_depth_sensor();
alt_ir_is_on = depth_sensor.supports_option( RS2_OPTION_ALTERNATE_IR )
&& depth_sensor.get_option( RS2_OPTION_ALTERNATE_IR ).query() == 1.f;
}
catch( std::exception const & e )
{
Expand Down

0 comments on commit 66580bc

Please sign in to comment.