From eb594775b7c3a345ff46cbd9f7479206e49f0135 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Wed, 8 Oct 2014 20:17:55 +0900 Subject: [PATCH] Copter: pre-arm check that gyro cal succeeded --- ArduCopter/motors.pde | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ArduCopter/motors.pde b/ArduCopter/motors.pde index 342ae0362a..b984ba54e6 100644 --- a/ArduCopter/motors.pde +++ b/ArduCopter/motors.pde @@ -378,6 +378,14 @@ static void pre_arm_checks(bool display_failure) return; } + // check gyros calibrated successfully + if(!ins.gyro_calibrated_ok_all()) { + if (display_failure) { + gcs_send_text_P(SEVERITY_HIGH,PSTR("PreArm: Gyro cal failed")); + } + return; + } + #if INS_MAX_INSTANCES > 1 // check all gyros are consistent if (ins.get_gyro_count() > 1) {