@ -122,7 +122,6 @@ static bool poshold_init(bool ignore_checks)
@@ -122,7 +122,6 @@ static bool poshold_init(bool ignore_checks)
// set target to current position
// only init here as we can switch to PosHold in flight with a velocity <> 0 that will be used as _last_vel in PosControl and never updated again as we inhibit Reset_I
wp_nav.init_loiter_target();
}else{
// if not landed start in pilot override to avoid hard twitch
poshold.roll_mode = POSHOLD_PILOT_OVERRIDE;
@ -160,6 +159,7 @@ static void poshold_run()
@@ -160,6 +159,7 @@ static void poshold_run()
attitude_control.relax_bf_rate_controller();
attitude_control.set_yaw_target_to_current_heading();
attitude_control.set_throttle_out(0, false);
pos_control.set_alt_target_to_current_alt();
return;
}
@ -190,6 +190,7 @@ static void poshold_run()
@@ -190,6 +190,7 @@ static void poshold_run()
attitude_control.set_yaw_target_to_current_heading();
// move throttle to between minimum and non-takeoff-throttle to keep us on the ground
attitude_control.set_throttle_out(get_throttle_pre_takeoff(g.rc_3.control_in), false);
pos_control.set_alt_target_to_current_alt();
return;
}else{
// convert pilot input to lean angles