Copter: disable centrifugal force correction when disarmed

This commit is contained in:
Randy Mackay 2013-05-05 16:55:06 +09:00
parent 30faf87715
commit 372ebb602c
2 changed files with 8 additions and 0 deletions

View File

@ -966,6 +966,8 @@ static void load_parameters(void)
if (!ahrs.gps_gain.load()) {
ahrs.gps_gain.set_and_save(1.0);
}
// set gps_gain to zero, it will be set back to 1 as part of the arming process
ahrs.gps_gain.set(0);
// setup different AHRS gains for ArduCopter than the default
// but allow users to override in their config

View File

@ -144,6 +144,9 @@ static void init_arm_motors()
ahrs2.set_fast_gains(false);
#endif
// enable gps velocity based centrefugal force compensation
ahrs.gps_gain.load();
// finally actually arm the motors
motors.armed(true);
@ -209,6 +212,9 @@ static void init_disarm_motors()
#if SECONDARY_DMP_ENABLED == ENABLED
ahrs2.set_fast_gains(true);
#endif
// disable gps velocity based centrefugal force compensation
ahrs.gps_gain.set(0);
}
/*****************************************