From 1e485c20fcb23d37caeb7e29de272b809c148bd2 Mon Sep 17 00:00:00 2001 From: murata Date: Mon, 21 Mar 2022 18:25:55 +0900 Subject: [PATCH] AP_CANManager: Console output can be disabled --- libraries/AP_CANManager/AP_CANTester.cpp | 6 +++--- libraries/AP_CANManager/AP_CANTester_KDECAN.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/AP_CANManager/AP_CANTester.cpp b/libraries/AP_CANManager/AP_CANTester.cpp index 688d6d919c..63ad3cb918 100644 --- a/libraries/AP_CANManager/AP_CANTester.cpp +++ b/libraries/AP_CANManager/AP_CANTester.cpp @@ -328,10 +328,10 @@ bool CANTester::test_loopback(uint32_t loop_rate) } for (uint8_t i = 0; i < _num_ifaces; i++) { - hal.console->printf("Loopback Test Results %d->%d:\n", i, (i+1)%2); - hal.console->printf("num_tx: %lu, failed_tx: %lu\n", + DEV_PRINTF("Loopback Test Results %d->%d:\n", i, (i+1)%2); + DEV_PRINTF("num_tx: %lu, failed_tx: %lu\n", (long unsigned int)_loopback_stats[i].num_tx, (long unsigned int)_loopback_stats[i].failed_tx); - hal.console->printf("num_rx: %lu, flushed_rx: %lu, bad_rx_data: %lu, bad_rx_seq: %lu\n", + DEV_PRINTF("num_rx: %lu, flushed_rx: %lu, bad_rx_data: %lu, bad_rx_seq: %lu\n", (long unsigned int)_loopback_stats[i].num_rx, (long unsigned int)_loopback_stats[i].num_flushed_rx, (long unsigned int)_loopback_stats[i].bad_rx_data, (long unsigned int)_loopback_stats[i].bad_rx_seq); if (_loopback_stats[i].num_rx < 0.9f * _loopback_stats[i].num_tx || diff --git a/libraries/AP_CANManager/AP_CANTester_KDECAN.cpp b/libraries/AP_CANManager/AP_CANTester_KDECAN.cpp index 8527992b87..31737eb68e 100644 --- a/libraries/AP_CANManager/AP_CANTester_KDECAN.cpp +++ b/libraries/AP_CANManager/AP_CANTester_KDECAN.cpp @@ -201,12 +201,12 @@ void AP_CANTester_KDECAN::loop(void) void AP_CANTester_KDECAN::print_stats(void) { - hal.console->printf("KDECANTester: TimeStamp: %u\n", (unsigned)AP_HAL::micros()); + DEV_PRINTF("KDECANTester: TimeStamp: %u\n", (unsigned)AP_HAL::micros()); for (uint16_t i=0; i<100; i++) { if (counters[i].frame_id == 0) { break; } - hal.console->printf("0x%08x: %u\n", (unsigned)counters[i].frame_id, (unsigned)counters[i].count); + DEV_PRINTF("0x%08x: %u\n", (unsigned)counters[i].frame_id, (unsigned)counters[i].count); counters[i].count = 0; } }