Skip to content

Conversation

digitalentity
Copy link
Member

As pointed out in #5996, WP mode activation with no mission loaded will keep the current flight mode which may be counter-intuitive to the pilot. OSD will show that the mode is kept, however WP missions are generally not FPV. This PR creates a fallback in such case and will execute RTH instead which is safer than let the drone drift away.

Also fixes a bug when RTH procedure may get interrupted in case of a brief sensor loss and switch out to ANGLE, ACRO or MANUAL instead of EMERGENCY. On airplanes with a certain RTH settings a brief GPS loss is tolerated in the navigation state machine, while the RTH activation bug would still bail out. This PR fixes this by making RTH procedure sticky, similar to other navigation flight modes.

Force-RTH (failsafe) does not suffer from the bug.

@stronnag could you PTAL?

…; Fix the bug when RTH will terminate if GPS is briefly lost even if FSM logic accounts for that
@digitalentity digitalentity added this to the 2.6 milestone Jul 30, 2020
@digitalentity digitalentity requested a review from stronnag July 30, 2020 08:15
Copy link
Collaborator

@stronnag stronnag left a comment

Choose a reason for hiding this comment

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

LGTM, I will test this tomorrow

@digitalentity
Copy link
Member Author

Thanks @stronnag. I'd appreciate it if you could also test #5974 (to make sure that AH/PH work as they should)

@stronnag
Copy link
Collaborator

@digitalentity I'll do the #5974 tests later (weekend or monday); for now I'm set up for #5995 and #5997

@digitalentity
Copy link
Member Author

Awesome, thanks heaps!

@stronnag
Copy link
Collaborator

Tested on FW:

  • Activate RTH => RTH
  • Activate WP with 0 WP => RTH
  • Activate WP with > 0 WP => WP
  • Switch simulate FS = RTH

Great improvement for the 0 WP case, no obvious regressions

@digitalentity
Copy link
Member Author

Thanks a lot for testing. Merging this.

@digitalentity digitalentity merged commit e4fe51c into master Jul 31, 2020
@digitalentity digitalentity deleted the de_wp_rth_fallback branch July 31, 2020 13:31
@digitalentity digitalentity added the Release Notes Add this when a PR needs to be mentioned in the release notes label Jul 31, 2020
@stronnag stronnag mentioned this pull request Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release Notes Add this when a PR needs to be mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants