AP_HAL_ChibiOS: allow crashdump even if !HAL_GCS_ENABLED

We can dump these to SD card, for example.
This commit is contained in:
Peter Barker 2022-06-15 17:03:03 +10:00 committed by Andrew Tridgell
parent 6ab6aa1ef4
commit 4de69823e8
1 changed files with 2 additions and 2 deletions

View File

@ -725,7 +725,7 @@ void Util::log_stack_info(void)
#if !defined(HAL_BOOTLOADER_BUILD)
size_t Util::last_crash_dump_size() const
{
#if HAL_GCS_ENABLED && HAL_CRASHDUMP_ENABLE
#if HAL_CRASHDUMP_ENABLE
// get dump size
uint32_t size = stm32_crash_dump_size();
char* dump_start = (char*)stm32_crash_dump_addr();
@ -744,7 +744,7 @@ size_t Util::last_crash_dump_size() const
void* Util::last_crash_dump_ptr() const
{
#if HAL_GCS_ENABLED && HAL_CRASHDUMP_ENABLE
#if HAL_CRASHDUMP_ENABLE
if (last_crash_dump_size() == 0) {
return nullptr;
}