Skip to content

Add RS2_OPTION_FREEFALL_DETECTION_ENABLED - #5780

Merged
ev-mp merged 2 commits into
realsenseai:developmentfrom
maloel:freefall
Feb 6, 2020
Merged

Add RS2_OPTION_FREEFALL_DETECTION_ENABLED#5780
ev-mp merged 2 commits into
realsenseai:developmentfrom
maloel:freefall

Conversation

@maloel

@maloel maloel commented Feb 4, 2020

Copy link
Copy Markdown
Contributor

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

Comment thread include/librealsense2/h/rs_option.h Outdated
Comment thread src/types.cpp Outdated
DEPTH_OFFSET(59),
LED_POWER(60);
LED_POWER(60),
FREEFALL_ENABLED(63);

Copy link
Copy Markdown
Contributor

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

Comment thread src/l500/l500-private.cpp Outdated
{
bool_option::set( value );

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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?

Comment thread include/librealsense2/h/rs_option.h Outdated

@ev-mp ev-mp left a comment

Copy link
Copy Markdown
Contributor

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
Comment thread src/l500/l500-private.h
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
Copy Markdown
Contributor

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 realsenseai: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