diff --git a/libraries/AP_Scheduler/AP_Scheduler.cpp b/libraries/AP_Scheduler/AP_Scheduler.cpp index cb2ec29e22..b486b9e9df 100644 --- a/libraries/AP_Scheduler/AP_Scheduler.cpp +++ b/libraries/AP_Scheduler/AP_Scheduler.cpp @@ -290,6 +290,7 @@ void AP_Scheduler::update_logging() // Write a performance monitoring packet void AP_Scheduler::Log_Write_Performance() { + const AP_HAL::Util::PersistentData &pd = hal.util->persistent_data; struct log_Performance pkt = { LOG_PACKET_HEADER_INIT(LOG_PERFORMANCE_MSG), time_us : AP_HAL::micros64(), @@ -298,7 +299,9 @@ void AP_Scheduler::Log_Write_Performance() max_time : perf_info.get_max_time(), mem_avail : hal.util->available_memory(), load : (uint16_t)(load_average() * 1000), - internal_errors : AP::internalerror().errors() + internal_errors : AP::internalerror().errors(), + spi_count : pd.spi_count, + i2c_count : pd.i2c_count, }; AP::logger().WriteCriticalBlock(&pkt, sizeof(pkt)); }