AP_HAL: do not gate AP_CRASHDUMP_ENABLED on bootloader

Also rename from HAL_CRASHDUMP_ENABLE

Removes code based on define rather than creating empty functions.  Makes it clearer what's going on in the callers.
This commit is contained in:
Peter Barker 2022-08-15 17:22:48 +10:00 committed by Andrew Tridgell
parent 4ca0f35943
commit b76e2316bb
2 changed files with 7 additions and 0 deletions

View File

@ -277,6 +277,10 @@
#define HAL_WITH_MCU_MONITORING 0
#endif
#ifndef AP_CRASHDUMP_ENABLED
#define AP_CRASHDUMP_ENABLED 0
#endif
#ifndef HAL_HNF_MAX_FILTERS
// On an F7 The difference in CPU load between 1 notch and 24 notches is about 2%
// The difference in CPU load between 1Khz backend and 2Khz backend is about 10%

View File

@ -196,8 +196,11 @@ public:
// log info on stack usage
virtual void log_stack_info(void) {}
#if AP_CRASHDUMP_ENABLED
virtual size_t last_crash_dump_size() const { return 0; }
virtual void* last_crash_dump_ptr() const { return nullptr; }
#endif
protected:
// we start soft_armed false, so that actuators don't send any
// values until the vehicle code has fully started