Skip to content
Snippets Groups Projects
Commit 074636a8 authored by Lorenz Meier's avatar Lorenz Meier
Browse files

Commander: Check for preflight errors in order

parent c06251f3
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment