mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2025-12-10 12:49:58 -06:00
AP_HAL: add system load accessor
This commit is contained in:
parent
6e86351aeb
commit
8200c082c5
@ -409,3 +409,7 @@
|
||||
#ifndef HAL_REBOOT_ON_MEMORY_ERRORS
|
||||
#define HAL_REBOOT_ON_MEMORY_ERRORS defined(IOMCU_FW)
|
||||
#endif
|
||||
|
||||
#ifndef AP_CPU_IDLE_STATS_ENABLED
|
||||
#define AP_CPU_IDLE_STATS_ENABLED 0
|
||||
#endif
|
||||
|
||||
@ -195,6 +195,9 @@ public:
|
||||
virtual void* last_crash_dump_ptr() const { return nullptr; }
|
||||
#endif
|
||||
|
||||
// get the system load
|
||||
virtual bool get_system_load(float& avg_load, float& peak_load) const { return false; }
|
||||
|
||||
#if HAL_ENABLE_DFU_BOOT
|
||||
virtual void boot_to_dfu(void) {}
|
||||
#endif
|
||||
|
||||
@ -175,3 +175,7 @@
|
||||
#ifndef AP_BOARDCONFIG_MCU_MEMPROTECT_ENABLED
|
||||
#define AP_BOARDCONFIG_MCU_MEMPROTECT_ENABLED 0
|
||||
#endif // AP_BOARDCONFIG_MCU_MEMPROTECT_ENABLED
|
||||
|
||||
#ifndef AP_CPU_IDLE_STATS_ENABLED
|
||||
#define AP_CPU_IDLE_STATS_ENABLED BOARD_FLASH_SIZE > 1024
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user