Copter: integrate slew_yaw into control_auto
This commit is contained in:
parent
37cfbc9ad5
commit
d3a126d078
@ -157,7 +157,7 @@ static void auto_wp_run()
|
||||
attitude_control.angleef_rp_rateef_y(wp_nav.get_roll(), wp_nav.get_pitch(), target_yaw_rate);
|
||||
}else{
|
||||
// roll, pitch from waypoint controller, yaw heading from auto_heading()
|
||||
attitude_control.angleef_rpy(wp_nav.get_roll(), wp_nav.get_pitch(), get_auto_heading());
|
||||
attitude_control.angleef_rpy(wp_nav.get_roll(), wp_nav.get_pitch(), get_auto_heading(),true);
|
||||
}
|
||||
|
||||
// refetch angle targets for reporting
|
||||
@ -267,7 +267,7 @@ void auto_circle_run()
|
||||
pos_control.update_z_controller();
|
||||
|
||||
// roll & pitch from waypoint controller, yaw rate from pilot
|
||||
attitude_control.angleef_rpy(circle_nav.get_roll(), circle_nav.get_pitch(), circle_nav.get_yaw());
|
||||
attitude_control.angleef_rpy(circle_nav.get_roll(), circle_nav.get_pitch(), circle_nav.get_yaw(),true);
|
||||
|
||||
// refetch angle targets for reporting
|
||||
const Vector3f angle_target = attitude_control.angle_ef_targets();
|
||||
|
@ -58,7 +58,7 @@ static void circle_run()
|
||||
if (circle_pilot_yaw_override) {
|
||||
attitude_control.angleef_rp_rateef_y(circle_nav.get_roll(), circle_nav.get_pitch(), target_yaw_rate);
|
||||
}else{
|
||||
attitude_control.angleef_rpy(circle_nav.get_roll(), circle_nav.get_pitch(), circle_nav.get_yaw());
|
||||
attitude_control.angleef_rpy(circle_nav.get_roll(), circle_nav.get_pitch(), circle_nav.get_yaw(),true);
|
||||
}
|
||||
|
||||
// run altitude controller
|
||||
|
@ -143,7 +143,7 @@ static void flip_run()
|
||||
|
||||
case Flip_Recover:
|
||||
// use originally captured earth-frame angle targets to recover
|
||||
attitude_control.angleef_rpy(curr_ef_targets.x, curr_ef_targets.y, curr_ef_targets.z);
|
||||
attitude_control.angleef_rpy(curr_ef_targets.x, curr_ef_targets.y, curr_ef_targets.z,false);
|
||||
|
||||
// increase throttle to gain any lost alitude
|
||||
throttle_out += FLIP_THR_INC;
|
||||
|
@ -86,7 +86,7 @@ static void guided_run()
|
||||
attitude_control.angleef_rp_rateef_y(wp_nav.get_roll(), wp_nav.get_pitch(), target_yaw_rate);
|
||||
}else{
|
||||
// roll, pitch from waypoint controller, yaw heading from auto_heading()
|
||||
attitude_control.angleef_rpy(wp_nav.get_roll(), wp_nav.get_pitch(), get_auto_heading());
|
||||
attitude_control.angleef_rpy(wp_nav.get_roll(), wp_nav.get_pitch(), get_auto_heading(),true);
|
||||
}
|
||||
|
||||
// re-fetch angle targets for reporting
|
||||
|
@ -156,7 +156,7 @@ static void rtl_climb_return_descent_run()
|
||||
attitude_control.angleef_rp_rateef_y(wp_nav.get_roll(), wp_nav.get_pitch(), target_yaw_rate);
|
||||
}else{
|
||||
// roll, pitch from waypoint controller, yaw heading from auto_heading()
|
||||
attitude_control.angleef_rpy(wp_nav.get_roll(), wp_nav.get_pitch(), get_auto_heading());
|
||||
attitude_control.angleef_rpy(wp_nav.get_roll(), wp_nav.get_pitch(), get_auto_heading(),true);
|
||||
}
|
||||
|
||||
// check if we've completed this stage of RTL
|
||||
@ -219,7 +219,7 @@ static void rtl_loiterathome_run()
|
||||
attitude_control.angleef_rp_rateef_y(wp_nav.get_roll(), wp_nav.get_pitch(), target_yaw_rate);
|
||||
}else{
|
||||
// roll, pitch from waypoint controller, yaw heading from auto_heading()
|
||||
attitude_control.angleef_rpy(wp_nav.get_roll(), wp_nav.get_pitch(), get_auto_heading());
|
||||
attitude_control.angleef_rpy(wp_nav.get_roll(), wp_nav.get_pitch(), get_auto_heading(),true);
|
||||
}
|
||||
|
||||
// check if we've completed this stage of RTL
|
||||
|
Loading…
Reference in New Issue
Block a user