From 9126579b77c6c88dbfdb2fa01bb966ad149a1810 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 23 Feb 2021 15:08:38 +1100 Subject: [PATCH] AP_IOMCU: added memory to debug code --- libraries/AP_IOMCU/AP_IOMCU.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/AP_IOMCU/AP_IOMCU.cpp b/libraries/AP_IOMCU/AP_IOMCU.cpp index b51efd699e..ffbf2d147e 100644 --- a/libraries/AP_IOMCU/AP_IOMCU.cpp +++ b/libraries/AP_IOMCU/AP_IOMCU.cpp @@ -50,6 +50,7 @@ AP_IOMCU::AP_IOMCU(AP_HAL::UARTDriver &_uart) : #define IOMCU_DEBUG_ENABLE 0 #if IOMCU_DEBUG_ENABLE +#include #define debug(fmt, args ...) do {printf("%s:%d: " fmt "\n", __FUNCTION__, __LINE__, ## args); } while(0) #else #define debug(fmt, args ...) @@ -361,9 +362,10 @@ void AP_IOMCU::read_status() static uint32_t last_io_print; if (now - last_io_print >= 5000) { last_io_print = now; - debug("t=%u num=%u terr=%u nerr=%u crc=%u opcode=%u rd=%u wr=%u ur=%u ndel=%u\n", + debug("t=%u num=%u mem=%u terr=%u nerr=%u crc=%u opcode=%u rd=%u wr=%u ur=%u ndel=%u\n", now, reg_status.total_pkts, + reg_status.freemem, total_errors, reg_status.num_errors, reg_status.err_crc,