From d7343d5dc7156a98e998d85228a00103202a4ad5 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Mon, 1 Sep 2014 20:21:19 +0900 Subject: [PATCH] Copter: check all gyros and accels in pre-arm check --- ArduCopter/motors.pde | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ArduCopter/motors.pde b/ArduCopter/motors.pde index 103b548c9b..591b8ceb13 100644 --- a/ArduCopter/motors.pde +++ b/ArduCopter/motors.pde @@ -338,10 +338,18 @@ static void pre_arm_checks(bool display_failure) return; } - // check accels and gyros are healthy - if(!ins.healthy()) { + // check accels are healthy + if(!ins.get_accel_health_all()) { if (display_failure) { - gcs_send_text_P(SEVERITY_HIGH,PSTR("PreArm: INS not healthy")); + gcs_send_text_P(SEVERITY_HIGH,PSTR("PreArm: Accels not healthy")); + } + return; + } + + // check gyros are healthy + if(!ins.get_gyro_health_all()) { + if (display_failure) { + gcs_send_text_P(SEVERITY_HIGH,PSTR("PreArm: Gyros not healthy")); } return; }