mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-28 03:34:06 +08:00
CAN mock method - popTxFrame()
This commit is contained in:
parent
54f920898d
commit
3426d55cac
@ -79,6 +79,18 @@ public:
|
||||
return matchAndPopTx(frame, uavcan::MonotonicTime::fromUSec(tx_deadline_usec));
|
||||
}
|
||||
|
||||
uavcan::CanFrame popTxFrame()
|
||||
{
|
||||
if (tx.empty())
|
||||
{
|
||||
std::cout << "Tx buffer is empty" << std::endl;
|
||||
std::abort();
|
||||
}
|
||||
const FrameWithTime frame_time = tx.front();
|
||||
tx.pop();
|
||||
return frame_time.frame;
|
||||
}
|
||||
|
||||
int send(const uavcan::CanFrame& frame, uavcan::MonotonicTime tx_deadline)
|
||||
{
|
||||
assert(this);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user