diff --git a/ArduCopter/motors.pde b/ArduCopter/motors.pde index 937c14b5c5..728542228c 100644 --- a/ArduCopter/motors.pde +++ b/ArduCopter/motors.pde @@ -158,6 +158,9 @@ static void init_arm_motors() // temp hack motor_light = true; digitalWrite(A_LED_PIN, LED_ON); + + // go back to normal AHRS gains + ahrs.set_fast_gains(false); } @@ -181,6 +184,9 @@ static void init_disarm_motors() piezo_beep(); } #endif + + // setup fast AHRS gains to get right attitude + ahrs.set_fast_gains(true); } /***************************************** diff --git a/ArduCopter/system.pde b/ArduCopter/system.pde index 68657e44c8..7ac9b8b69d 100644 --- a/ArduCopter/system.pde +++ b/ArduCopter/system.pde @@ -385,10 +385,14 @@ static void startup_ground(void) #if CLI_ENABLED == ENABLED report_imu(); #endif - // initialise ahrs (may push imu calibration into the mpu6000 if using that device). - ahrs.init(); #endif + // initialise ahrs (may push imu calibration into the mpu6000 if using that device). + ahrs.init(); + + // setup fast AHRS gains to get right attitude + ahrs.set_fast_gains(true); + // reset the leds // --------------------------- clear_leds();