Copter: use disparity threshold define for pre-arm checks

There are two duplicate checks, one in the pre-arm checks (i.e. checks
run every 15 seconds or so before the vehicle is armed) and one in the
arming checks (run immediately before arming).  The definition in the
pre-arm checks was still using the old hardcoded value.
This commit is contained in:
Randy Mackay 2014-09-23 19:33:04 +09:00
parent 2b4f5fa79d
commit d4cfb432ca
1 changed files with 1 additions and 1 deletions

View File

@ -243,7 +243,7 @@ static void pre_arm_checks(bool display_failure)
return;
}
// check Baro & inav alt are within 1m
if(fabs(inertial_nav.get_altitude() - baro_alt) > 100) {
if(fabs(inertial_nav.get_altitude() - baro_alt) > PREARM_MAX_ALT_DISPARITY_CM) {
if (display_failure) {
gcs_send_text_P(SEVERITY_HIGH,PSTR("PreArm: Alt disparity"));
}