PreflightCheck: do not check for primary mag & inconsistencies if system has no mag

This commit is contained in:
Beat Küng 2018-09-24 12:04:24 +02:00
parent 5a57e82072
commit 92bf761bf1
1 changed files with 13 additions and 11 deletions

View File

@ -717,6 +717,7 @@ bool preflightCheck(orb_advert_t *mavlink_log_pub, vehicle_status_s &status,
}
}
if (sys_has_mag == 1) {
/* check if the primary device is present */
if (!prime_found) {
if (reportFailures && !failed) {
@ -732,6 +733,7 @@ bool preflightCheck(orb_advert_t *mavlink_log_pub, vehicle_status_s &status,
failed = true;
}
}
}
/* ---- ACCEL ---- */
if (checkSensors) {