mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-01 21:48:28 -04:00
Copter: disable centrifugal correction when disarmed
This commit is contained in:
parent
ceda7d26b0
commit
324200b52c
@ -966,8 +966,8 @@ static void load_parameters(void)
|
|||||||
if (!ahrs.gps_gain.load()) {
|
if (!ahrs.gps_gain.load()) {
|
||||||
ahrs.gps_gain.set_and_save(1.0);
|
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
|
// disable centrifugal force correction, it will be enabled as part of the arming process
|
||||||
ahrs.gps_gain.set(0);
|
ahrs.set_correct_centrifugal(false);
|
||||||
|
|
||||||
// setup different AHRS gains for ArduCopter than the default
|
// setup different AHRS gains for ArduCopter than the default
|
||||||
// but allow users to override in their config
|
// but allow users to override in their config
|
||||||
|
@ -145,7 +145,7 @@ static void init_arm_motors()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// enable gps velocity based centrefugal force compensation
|
// enable gps velocity based centrefugal force compensation
|
||||||
ahrs.gps_gain.load();
|
ahrs.set_correct_centrifugal(true);
|
||||||
|
|
||||||
// finally actually arm the motors
|
// finally actually arm the motors
|
||||||
motors.armed(true);
|
motors.armed(true);
|
||||||
@ -214,7 +214,7 @@ static void init_disarm_motors()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// disable gps velocity based centrefugal force compensation
|
// disable gps velocity based centrefugal force compensation
|
||||||
ahrs.gps_gain.set(0);
|
ahrs.set_correct_centrifugal(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************
|
/*****************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user