AP_Arming: emit stringification of internal errors

This commit is contained in:
Peter Barker 2020-04-30 15:09:40 +10:00 committed by Peter Barker
parent 8f864f02fb
commit 75514dfdfe
1 changed files with 3 additions and 1 deletions

View File

@ -781,7 +781,9 @@ bool AP_Arming::system_checks(bool report)
#endif
}
if (AP::internalerror().errors() != 0) {
check_failed(report, "Internal errors (0x%x) (last line:%u)", (unsigned int)AP::internalerror().errors(), AP::internalerror().last_error_line());
uint8_t buffer[32];
AP::internalerror().errors_as_string(buffer, ARRAY_SIZE(buffer));
check_failed(report, "Internal errors 0x%x l:%u (%s)", (unsigned int)AP::internalerror().errors(), AP::internalerror().last_error_line(), buffer);
return false;
}