Copter: remove home_is_set checks from Loiter, PosHold, RTL

This allows these flight modes to potentially operate even when the
vehicle has never had a GPS lock.
Potentially we should replace this with a check that the EKF's origin
has been set
This commit is contained in:
Randy Mackay 2015-01-09 06:03:51 +09:00
parent 01c669ee15
commit 1819bd48f4
3 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@ static void loiter_run()
float target_climb_rate = 0;
// if not auto armed set throttle to zero and exit immediately
if(!ap.auto_armed || !ap.home_is_set) {
if(!ap.auto_armed) {
wp_nav.init_loiter_target();
attitude_control.relax_bf_rate_controller();
attitude_control.set_yaw_target_to_current_heading();

View File

@ -154,7 +154,7 @@ static void poshold_run()
const Vector3f& vel = inertial_nav.get_velocity();
// if not auto armed set throttle to zero and exit immediately
if(!ap.auto_armed || !ap.home_is_set) {
if(!ap.auto_armed) {
wp_nav.init_loiter_target();
attitude_control.relax_bf_rate_controller();
attitude_control.set_yaw_target_to_current_heading();

View File

@ -261,7 +261,7 @@ static void rtl_descent_run()
float target_yaw_rate = 0;
// if not auto armed set throttle to zero and exit immediately
if(!ap.auto_armed || !ap.home_is_set) {
if(!ap.auto_armed) {
attitude_control.relax_bf_rate_controller();
attitude_control.set_yaw_target_to_current_heading();
attitude_control.set_throttle_out(0, false);