Skip to content

Commit

Permalink
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 committed Nov 30, 2020
1 parent 959c9d5 commit 69834bf
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 69834bf

Please sign in to comment.