reset Rate_I for takeoff

This commit is contained in:
Jason Short 2012-02-10 22:50:56 -08:00
parent efce991bfb
commit b1d52da431
1 changed files with 11 additions and 6 deletions

View File

@ -903,12 +903,6 @@ static void fast_loop()
// IMU DCM Algorithm
read_AHRS();
if(takeoff_complete == false){
// reset these I terms to prevent awkward tipping on takeoff
//reset_rate_I();
//reset_stability_I();
}
// custom code/exceptions for flight modes
// ---------------------------------------
update_yaw_mode();
@ -1452,6 +1446,17 @@ void update_roll_pitch_mode(void)
break;
}
if(g.rc_3.control_in == 0 && roll_pitch_mode <= ROLL_PITCH_ACRO){
reset_rate_I();
reset_stability_I();
}
if(takeoff_complete == false){
// reset these I terms to prevent awkward tipping on takeoff
//reset_rate_I();
//reset_stability_I();
}
// clear new radio frame info
new_radio_frame = false;
}