mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 01:31:36 +08:00
fw pos ctrl: move setting of attitude integral reset flag
This commit is contained in:
@@ -1032,12 +1032,15 @@ FixedwingPositionControl::control_position(const math::Vector<2> ¤t_positi
|
|||||||
// warnx("Launch detection running");
|
// warnx("Launch detection running");
|
||||||
mavlink_log_info(_mavlink_fd, "#audio: Launchdetection running");
|
mavlink_log_info(_mavlink_fd, "#audio: Launchdetection running");
|
||||||
last_sent = hrt_absolute_time();
|
last_sent = hrt_absolute_time();
|
||||||
/* Tell the attitude controller to stop integrating while we are
|
|
||||||
* waiting for the launch */
|
|
||||||
_att_sp.roll_reset_integral = true;
|
|
||||||
_att_sp.pitch_reset_integral = true;
|
|
||||||
_att_sp.yaw_reset_integral = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Tell the attitude controller to stop integrating while we are waiting
|
||||||
|
* for the launch */
|
||||||
|
_att_sp.roll_reset_integral = true;
|
||||||
|
_att_sp.pitch_reset_integral = true;
|
||||||
|
_att_sp.yaw_reset_integral = true;
|
||||||
|
|
||||||
|
/* Detect launch */
|
||||||
launchDetector.update(_sensor_combined.accelerometer_m_s2[0]);
|
launchDetector.update(_sensor_combined.accelerometer_m_s2[0]);
|
||||||
if (launchDetector.getLaunchDetected()) {
|
if (launchDetector.getLaunchDetected()) {
|
||||||
launch_detected = true;
|
launch_detected = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user