AP_Arming: added IOMCU health check

This commit is contained in:
Andrew Tridgell 2018-10-31 11:05:45 +11:00
parent 38eed4ba84
commit 8d5b9521ad
1 changed files with 12 additions and 0 deletions

View File

@ -79,6 +79,11 @@ const AP_Param::GroupInfo AP_Arming::var_info[] = {
AP_GROUPEND
};
#if HAL_WITH_IO_MCU
#include <AP_IOMCU/AP_IOMCU.h>
extern AP_IOMCU iomcu;
#endif
AP_Arming::AP_Arming()
{
AP_Param::setup_object_defaults(this, var_info);
@ -508,6 +513,13 @@ bool AP_Arming::servo_checks(bool report) const
}
}
#if HAL_WITH_IO_MCU
if (!iomcu.healthy()) {
check_failed(ARMING_CHECK_NONE, report, "IOMCU is unhealthy");
check_passed = false;
}
#endif
return check_passed;
}