mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-18 12:27:35 +08:00
Fixed wing controller: Call state reset on flight mode change.
This commit is contained in:
@@ -1118,6 +1118,8 @@ FixedwingPositionControl::control_position(const math::Vector<2> ¤t_positi
|
||||
if (_mTecs.getEnabled()) {
|
||||
_mTecs.resetIntegrators();
|
||||
_mTecs.resetDerivatives(_airspeed.true_airspeed_m_s);
|
||||
} else {
|
||||
_tecs.reset_state();
|
||||
}
|
||||
}
|
||||
_control_mode_current = FW_POSCTRL_MODE_AUTO;
|
||||
@@ -1477,6 +1479,8 @@ FixedwingPositionControl::control_position(const math::Vector<2> ¤t_positi
|
||||
if (_mTecs.getEnabled()) {
|
||||
_mTecs.resetIntegrators();
|
||||
_mTecs.resetDerivatives(_airspeed.true_airspeed_m_s);
|
||||
} else {
|
||||
_tecs.reset_state();
|
||||
}
|
||||
}
|
||||
_control_mode_current = FW_POSCTRL_MODE_POSITION;
|
||||
@@ -1588,6 +1592,8 @@ FixedwingPositionControl::control_position(const math::Vector<2> ¤t_positi
|
||||
if (_mTecs.getEnabled()) {
|
||||
_mTecs.resetIntegrators();
|
||||
_mTecs.resetDerivatives(_airspeed.true_airspeed_m_s);
|
||||
} else {
|
||||
_tecs.reset_state();
|
||||
}
|
||||
}
|
||||
_control_mode_current = FW_POSCTRL_MODE_ALTITUDE;
|
||||
|
||||
Reference in New Issue
Block a user