diff --git a/src/drivers/uavcan/libdronecan/libuavcan/include/uavcan/transport/can_io.hpp b/src/drivers/uavcan/libdronecan/libuavcan/include/uavcan/transport/can_io.hpp index 144c246bc4e..e33f703c299 100644 --- a/src/drivers/uavcan/libdronecan/libuavcan/include/uavcan/transport/can_io.hpp +++ b/src/drivers/uavcan/libdronecan/libuavcan/include/uavcan/transport/can_io.hpp @@ -117,6 +117,8 @@ public: /// The 'or equal' condition is necessary to avoid frame reordering. bool topPriorityHigherOrEqual(const CanFrame& rhs_frame) const; + /// Total. Every drop is also counted in exactly one of the two below, so a total that exceeds + /// their sum means a drop path was added without classifying it. uint32_t getRejectedFrameCount() const { return rejected_frames_cnt_; } /// Frames dropped because their transmit deadline had already passed. Not a memory shortage. diff --git a/src/drivers/uavcan/libdronecan/libuavcan/src/transport/uc_can_io.cpp b/src/drivers/uavcan/libdronecan/libuavcan/src/transport/uc_can_io.cpp index cb310bb6c84..1ca5b8700e8 100644 --- a/src/drivers/uavcan/libdronecan/libuavcan/src/transport/uc_can_io.cpp +++ b/src/drivers/uavcan/libdronecan/libuavcan/src/transport/uc_can_io.cpp @@ -207,7 +207,7 @@ CanTxQueue::Entry* CanTxQueue::peek() { UAVCAN_TRACE("CanTxQueue", "Peek: Expired %s", p->toString().c_str()); Entry* const next = p->getNextListNode(); - registerRejectedFrame(); + registerExpiredFrame(); remove(p); p = next; }