From 074636a8ae5390b5d214fd5e4146bb3c3990e598 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 31 Dec 2017 15:59:27 +0100 Subject: [PATCH] Commander: Check for preflight errors in order --- src/modules/commander/PreflightCheck.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/commander/PreflightCheck.cpp b/src/modules/commander/PreflightCheck.cpp index 720fce166b..9b2f9af329 100644 --- a/src/modules/commander/PreflightCheck.cpp +++ b/src/modules/commander/PreflightCheck.cpp @@ -757,7 +757,7 @@ bool preflightCheck(orb_advert_t *mavlink_log_pub, bool checkSensors, bool check /* ---- IMU CONSISTENCY ---- */ if (checkSensors) { - if (!imuConsistencyCheck(mavlink_log_pub, reportFailures)) { + if (!imuConsistencyCheck(mavlink_log_pub, (reportFailures && !failed))) { failed = true; } } @@ -795,7 +795,7 @@ bool preflightCheck(orb_advert_t *mavlink_log_pub, bool checkSensors, bool check // don't report ekf failures for the first 10 seconds to allow time for the filter to start bool report_ekf_fail = (time_since_boot > 10 * 1000000); - if (!ekf2Check(mavlink_log_pub, true, report_ekf_fail, checkGNSS)) { + if (!ekf2Check(mavlink_log_pub, true, (report_ekf_fail && !failed), checkGNSS)) { failed = true; } }