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

mc_pos_control: Protect against NaN and Inf setpoints #1703

Closed
wants to merge 1 commit into from

Conversation

Zefz
Copy link
Contributor

@Zefz Zefz commented Jan 26, 2015

This small fix prevents NaN and Inf floats in position setpoints from infecting the rest of the position controller in AUTO mode. If a non-finite float is detected, the setpoint is marked as invalid and should make the vehicle hold position because of reset_pos_sp() and reset_alt_sp().

Without this fix the vehicle fell down from the sky and crashed.

@LorenzMeier
Copy link
Member

Merged to master via cherry-pick, thanks!

thomasgubler added a commit that referenced this pull request Feb 22, 2015
thomasgubler added a commit that referenced this pull request Feb 24, 2015
thomasgubler added a commit that referenced this pull request Feb 24, 2015
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.

2 participants