Browse Source

reset Rate_I for takeoff

mission-4.1.18
Jason Short 13 years ago
parent
commit
b1d52da431
  1. 17
      ArduCopter/ArduCopter.pde

17
ArduCopter/ArduCopter.pde

@ -903,12 +903,6 @@ static void fast_loop() @@ -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) @@ -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;
}

Loading…
Cancel
Save