HAL_ChibiOS: set internal error on panic

This commit is contained in:
Andrew Tridgell 2021-02-24 10:31:32 +11:00 committed by Peter Barker
parent f250c4d684
commit c23f61b79a

View File

@ -19,6 +19,7 @@
#include <AP_HAL/AP_HAL.h>
#include <AP_HAL/system.h>
#include <AP_BoardConfig/AP_BoardConfig.h>
#include <AP_InternalError/AP_InternalError.h>
#include "hwdef/common/watchdog.h"
#include "hwdef/common/stm32_util.h"
@ -232,7 +233,8 @@ void init()
void panic(const char *errormsg, ...)
{
#ifndef HAL_BOOTLOADER_BUILD
#if !defined(HAL_BOOTLOADER_BUILD) && !defined(HAL_NO_LOGGING)
INTERNAL_ERROR(AP_InternalError::error_t::panic);
va_list ap;
va_start(ap, errormsg);