From 1482614a7d39ab4ae8cc655128b066d0d677843c Mon Sep 17 00:00:00 2001 From: Jonathan Challinger Date: Mon, 28 Dec 2015 20:33:40 -0800 Subject: [PATCH] AP_Arming: add accel cal requires reboot --- libraries/AP_Arming/AP_Arming.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libraries/AP_Arming/AP_Arming.cpp b/libraries/AP_Arming/AP_Arming.cpp index 4e8a97bd9d..cca897cdec 100644 --- a/libraries/AP_Arming/AP_Arming.cpp +++ b/libraries/AP_Arming/AP_Arming.cpp @@ -155,6 +155,14 @@ bool AP_Arming::ins_checks(bool report) } return false; } + + //check if accelerometers have calibrated and require reboot + if (ins.accel_cal_requires_reboot()) { + if (report) { + GCS_MAVLINK::send_statustext_all(MAV_SEVERITY_CRITICAL, "PreArm: Accelerometers calibrated requires reboot"); + } + return false; + } // check all accelerometers point in roughly same direction if (ins.get_accel_count() > 1) {