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

Plane: auto-deploy landing gear on fixed wing landing #29321

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tridge
Copy link
Contributor

@tridge tridge commented Feb 18, 2025

if LGR_OPTIONS is set to auto-deploy then deploy
this affects all fixed wing auto-landings

if LGR_OPTIONS is set to auto-deploy then deploy
@tridge tridge added the Plane label Feb 18, 2025
@tridge tridge requested a review from Hwurzburg February 18, 2025 03:37
@Hwurzburg Hwurzburg added the WikiNeeded needs wiki update label Feb 18, 2025
Copy link
Collaborator

@Hwurzburg Hwurzburg left a comment

Choose a reason for hiding this comment

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

metadata in LGR_OPTIONS needs a tweak

@IamPete1
Copy link
Member

We have this case in servos.cpp, seems a bit odd to be checking in another place too.

void Plane::set_landing_gear(void)
{
if (control_mode == &mode_auto && arming.is_armed_and_safety_off() && is_flying() && gear.last_flight_stage != flight_stage) {
switch (flight_stage) {
case AP_FixedWing::FlightStage::LAND:
g2.landing_gear.deploy_for_landing();
break;
case AP_FixedWing::FlightStage::NORMAL:
g2.landing_gear.retract_after_takeoff();
break;
default:
break;
}
}
gear.last_flight_stage = flight_stage;
}

Maybe just move the control_mode == &mode_auto check down into the retract case so they deploy in any mode but only retract in auto.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Plane WikiNeeded needs wiki update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants