Skip to content
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

Add RS2_OPTION_FREEFALL_DETECTION_ENABLED #5780

Merged
merged 2 commits into from
Feb 6, 2020

Conversation

maloel
Copy link
Collaborator

@maloel maloel commented Feb 4, 2020

When an L500 camera experiences free-fall (is dropped) a safety mechanism is triggered and turns off the depth sensor to protect moving parts inside the camera.

This is on by default, and can now be disabled with this option.

Tracked on: RS5-6461

src/types.cpp Outdated Show resolved Hide resolved
@@ -61,7 +61,8 @@
ENABLE_POSE_JUMPING(57),
ENABLE_DYNAMIC_CALIBRATION(58),
DEPTH_OFFSET(59),
LED_POWER(60);
LED_POWER(60),
FREEFALL_ENABLED(63);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls fill in the missing 61-62 indexes

{
bool_option::set( value );

command cmd{ FALL_DETECT_ENABLE, value != 0.f };
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Float comparison to zero can be tricky - in other places we put
(fabs(a-b)< std::numeric_limits<float>::epsilon()) template

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed to is_true(), but that compares to the range min. You think we should change the comparison there?

include/librealsense2/h/rs_option.h Outdated Show resolved Hide resolved
Copy link
Collaborator

@ev-mp ev-mp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add Jira reference to the PR info

@maloel maloel changed the title Add RS2_OPTION_FREEFALL_ENABLED Add RS2_OPTION_FREEFALL_DETECTION_ENABLED Feb 5, 2020
virtual void set( float value ) override;
virtual const char * get_description() const override
{
return "When enabled (default), the sensor will turn off if a free-fall is detected";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a specific threshold established - e.g. 0.8G ?

@ev-mp ev-mp merged commit a2f4808 into IntelRealSense:development Feb 6, 2020
@maloel maloel deleted the freefall branch February 13, 2020 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants