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

AP_LandingGear: add OPTIONS parameter and integrate with Copter #13638

Merged
merged 2 commits into from
Feb 25, 2020

Conversation

rmackay9
Copy link
Contributor

@rmackay9 rmackay9 commented Feb 21, 2020

This PR adds an OPTIONS bitmask parameter that allows enabling automatic retracting and deploying of the gear in Auto, Guided and RTL modes.

This PR also adds support for:

  • automatically retracting the landing gear after taking off in Guided
  • deploying the landing gear during the final states of SmartRTL

This has been somewhat extensively tested in SITL:

  • Ensured no change in behaviour before and after this PR in terms of the gear automatically retracting and deploying in Auto mode
  • Checked LGR_OPTIONS = 1 caused the gear to be retracted but not deployed
  • Checked LGR_OPTIONS = 2 caused the gear to be deployed but not retracted
  • Checked the gear retracted and deployed appropriate in Guided and SmartRTL

Note: I have not integrated this new OPTIONS parameter into Plane. I had a look but it wasn't completely straightforward.

Note2: this comes from this discussion in the Copter-4.0 category and also comments from this PR.

also guided mode now retracts landing gear after takeoff
previously landing gear deployment was "level based" meaning the pilot could not override the gear's position
@rmackay9
Copy link
Contributor Author

I've made two changes as discussed on the dev call:

  • changed the two new methods so they cause the gear to retract or deploy based on the OPTIONS parameter. This reduces the two step process we had previously in the PR (i.e. step1 was to check the accessor, step2 was to change the position of the landing gear)
  • changed the auto deployment to be edge based rather than level based.

I've re-tested this in SITL and it works.

I did some extra testing and confirmed that in master, the pilot is unable to retract the landing gear during landing while after this PR they can.

Any further comments are greatly appreciated but if there aren't any then I'll probably go ahead and merge. I've created an issue here to integrate with Plane as well: #13665

@rmackay9 rmackay9 merged commit 8d99f20 into ArduPilot:master Feb 25, 2020
@rmackay9 rmackay9 deleted the landinggear-retract-option branch February 25, 2020 23:01
@rmackay9
Copy link
Contributor Author

rmackay9 commented May 6, 2020

This is included in Copter-4.0.4-rc1

@rmackay9 rmackay9 moved this from PRs to 4.0.4-rc1 in Copter 4.0 backports May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants