Skip to content

Commit

Permalink
Copter: deploy gear during mission RTL descent
Browse files Browse the repository at this point in the history
  • Loading branch information
rmackay9 committed May 27, 2015
1 parent 8454246 commit 1706379
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ArduCopter/landing_gear.pde
Expand Up @@ -11,9 +11,12 @@ static void landinggear_update(){

// if we are doing an automatic landing procedure, force the landing gear to deploy.
// To-Do: should we pause the auto-land procedure to give time for gear to come down?
if (control_mode == LAND || (control_mode==RTL && rtl_state == RTL_Land) || (control_mode == AUTO && auto_mode == Auto_Land)){
if (control_mode == LAND ||
(control_mode==RTL && (rtl_state == RTL_LoiterAtHome || rtl_state == RTL_Land || rtl_state == RTL_FinalDescent)) ||
(control_mode == AUTO && auto_mode == Auto_Land) ||
(control_mode == AUTO && auto_mode == Auto_RTL && (rtl_state == RTL_LoiterAtHome || rtl_state == RTL_Land || rtl_state == RTL_FinalDescent))) {
landinggear.force_deploy(true);
}
}

landinggear.update();

Expand Down

0 comments on commit 1706379

Please sign in to comment.