mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_IOMCU: added memory to debug code
This commit is contained in:
parent
243cf2199d
commit
9126579b77
@ -50,6 +50,7 @@ AP_IOMCU::AP_IOMCU(AP_HAL::UARTDriver &_uart) :
|
||||
#define IOMCU_DEBUG_ENABLE 0
|
||||
|
||||
#if IOMCU_DEBUG_ENABLE
|
||||
#include <stdio.h>
|
||||
#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,
|
||||
|
Loading…
Reference in New Issue
Block a user