mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-30 07:23:33 +08:00
STM32: doc comment, fixed error counting
This commit is contained in:
@@ -168,6 +168,7 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Number of times the driver exercised library's requirement to abort transmission on first error.
|
* Number of times the driver exercised library's requirement to abort transmission on first error.
|
||||||
|
* This is an atomic read, it doesn't require a critical section.
|
||||||
* See @ref uavcan::CanIOFlagAbortOnError.
|
* See @ref uavcan::CanIOFlagAbortOnError.
|
||||||
*/
|
*/
|
||||||
uavcan::uint32_t getVoluntaryTxAbortCount() const { return served_aborts_cnt_; }
|
uavcan::uint32_t getVoluntaryTxAbortCount() const { return served_aborts_cnt_; }
|
||||||
|
|||||||
@@ -467,14 +467,12 @@ void CanIface::handleTxMailboxInterrupt(uavcan::uint8_t mailbox_index, bool txok
|
|||||||
had_activity_ = had_activity_ || txok;
|
had_activity_ = had_activity_ || txok;
|
||||||
|
|
||||||
TxItem& txi = pending_tx_[mailbox_index];
|
TxItem& txi = pending_tx_[mailbox_index];
|
||||||
|
|
||||||
if (txi.loopback && txok && txi.pending)
|
if (txi.loopback && txok && txi.pending)
|
||||||
{
|
{
|
||||||
rx_queue_.push(txi.frame, utc_usec, uavcan::CanIOFlagLoopback);
|
rx_queue_.push(txi.frame, utc_usec, uavcan::CanIOFlagLoopback);
|
||||||
}
|
}
|
||||||
if (!txok)
|
|
||||||
{
|
|
||||||
error_cnt_++;
|
|
||||||
}
|
|
||||||
txi.pending = false;
|
txi.pending = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user