Plane: reset attitude integrators on mode change

This commit is contained in:
Andrew Tridgell 2013-06-01 22:29:28 +10:00
parent 05889391e5
commit d9bcfd913a
1 changed files with 5 additions and 0 deletions

View File

@ -375,6 +375,11 @@ static void set_mode(enum FlightMode mode)
if (g.log_bitmask & MASK_LOG_MODE)
Log_Write_Mode(control_mode);
// reset attitude integrators on mode change
g.rollController.reset_I();
g.pitchController.reset_I();
g.yawController.reset_I();
}
static void check_long_failsafe()