From aaa2746bff5fc90b6e014d3fb598f187ac966596 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 1 Sep 2023 14:42:23 +1000 Subject: [PATCH] AP_HAL_Linux: added last_transmit_us to CAN stats --- libraries/AP_HAL_Linux/CANSocketIface.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/AP_HAL_Linux/CANSocketIface.cpp b/libraries/AP_HAL_Linux/CANSocketIface.cpp index f3e850936f..fc51eb95db 100644 --- a/libraries/AP_HAL_Linux/CANSocketIface.cpp +++ b/libraries/AP_HAL_Linux/CANSocketIface.cpp @@ -279,6 +279,7 @@ void CANIface::_pollWrite() _pending_loopback_ids.insert(tx.frame.id); } stats.tx_success++; + stats.last_transmit_us = curr_time; } else if (res == 0) { // Not transmitted, nor is it an error stats.tx_full++; break; // Leaving the loop, the frame remains enqueued for the next retry