Plane: reset roll/pitch integrators for APM_Control in takeoff
when airspeed is below airspeed minimum. This is consistent with the previous controllers Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
This commit is contained in:
parent
46c6aa8a9a
commit
0e6a64fc14
@ -1048,15 +1048,15 @@ static void update_current_flight_mode(void)
|
||||
nav_pitch_cd = constrain_int32(nav_pitch_cd, 500, takeoff_pitch_cd);
|
||||
}
|
||||
|
||||
if (g.att_controller == ATT_CONTROL_PID) {
|
||||
float aspeed;
|
||||
if (ahrs.airspeed_estimate(&aspeed)) {
|
||||
// don't use a pitch/roll integrators during takeoff if we are
|
||||
// below minimum speed
|
||||
if (aspeed < g.flybywire_airspeed_min) {
|
||||
g.pidServoPitch.reset_I();
|
||||
g.pidServoRoll.reset_I();
|
||||
}
|
||||
float aspeed;
|
||||
if (ahrs.airspeed_estimate(&aspeed)) {
|
||||
// don't use a pitch/roll integrators during takeoff if we are
|
||||
// below minimum speed
|
||||
if (aspeed < g.flybywire_airspeed_min) {
|
||||
g.pidServoPitch.reset_I();
|
||||
g.pidServoRoll.reset_I();
|
||||
g.pitchController.reset_I();
|
||||
g.rollController.reset_I();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user