mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-25 09:13:57 -04:00
AP_Arming: fixed arming checks for no baro
This commit is contained in:
parent
cd3ac639fe
commit
587ce2fd62
@ -201,6 +201,15 @@ void AP_Arming::check_failed(bool report, const char *fmt, ...) const
|
||||
|
||||
bool AP_Arming::barometer_checks(bool report)
|
||||
{
|
||||
#ifdef HAL_BARO_ALLOW_INIT_NO_BARO
|
||||
return true;
|
||||
#endif
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
||||
if (AP::sitl()->baro_count == 0) {
|
||||
// simulate no baro boards
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
if ((checks_to_perform & ARMING_CHECK_ALL) ||
|
||||
(checks_to_perform & ARMING_CHECK_BARO)) {
|
||||
if (!AP::baro().all_healthy()) {
|
||||
|
Loading…
Reference in New Issue
Block a user