mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Commander: baro check: only report failure of mandatory instances
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
parent
8acdb8ca3f
commit
381c97d3c6
@ -150,7 +150,7 @@ bool PreFlightCheck::preflightCheck(orb_advert_t *mavlink_log_pub, vehicle_statu
|
||||
/* check all sensors, but fail only for mandatory ones */
|
||||
for (unsigned i = 0; i < max_optional_baro_count; i++) {
|
||||
const bool required = (i < max_mandatory_baro_count) && (sys_has_baro == 1);
|
||||
bool report_fail = (report_failures && !baro_fail_reported);
|
||||
bool report_fail = (required && report_failures && !baro_fail_reported);
|
||||
|
||||
int32_t device_id = -1;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user