Copter: enable precision landing in auto mode

This commit is contained in:
Derek Ma 2016-06-13 17:28:06 -07:00 committed by Randy Mackay
parent 543d5701e7
commit 7fddf20f0b
1 changed files with 6 additions and 0 deletions

View File

@ -420,6 +420,12 @@ void Copter::auto_land_run()
// process roll, pitch inputs
wp_nav.set_pilot_desired_acceleration(roll_control, pitch_control);
#if PRECISION_LANDING == ENABLED
// run precision landing
if (!ap.land_repo_active) {
wp_nav.shift_loiter_target(precland.get_target_shift(wp_nav.get_loiter_target()));
}
#endif
// run loiter controller
wp_nav.update_loiter(ekfGndSpdLimit, ekfNavVelGainScaler);