-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix DSO-18454 laser turned off after calibration #10948
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, @ev-mp can you take a look too?
Thanks
common/on-chip-calib.cpp
Outdated
if (_sub->s->supports( RS2_OPTION_EMITTER_ENABLED )) | ||
{ | ||
laser_status_prev = _sub->s->get_option( RS2_OPTION_EMITTER_ENABLED ); | ||
_sub->s->set_option( RS2_OPTION_EMITTER_ENABLED, 0.0f ); | ||
} | ||
if (_sub->s->supports( RS2_OPTION_THERMAL_COMPENSATION )) | ||
{ | ||
thermal_loop_prev = _sub->s->get_option( RS2_OPTION_THERMAL_COMPENSATION ); | ||
_sub->s->set_option( RS2_OPTION_THERMAL_COMPENSATION, 0.f ); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By moving the code here those set/get options will be executed every iteration cycle (this is part of the main loop)- this may affect performance.
Imho, the best option is to create kind of LUT that for each state will define the state of laser/AE/Thermal loop controls, and that we'll use some 'enter_state(calib_1) /exist_state(calib_1)'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is called only once
Later on calibrate
calls run_on_chip_calibration
and inside that function implementation there is a loop
Tracked on DSO-18454