mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 03:23:33 +08:00
All unit tests compile, but crash. This is the most horrifying commit I've ever made.
This commit is contained in:
@@ -46,14 +46,14 @@ class UAVCAN_EXPORT GlobalTimeSyncMaster : protected LoopbackFrameListenerBase
|
||||
UAVCAN_ASSERT(iface_index < MaxCanIfaces);
|
||||
}
|
||||
|
||||
int init()
|
||||
int init(TransferPriority priority = TransferPriority::OneLowerThanHighest)
|
||||
{
|
||||
const int res = pub_.init();
|
||||
if (res >= 0)
|
||||
{
|
||||
pub_.getTransferSender().setIfaceMask(uint8_t(1 << iface_index_));
|
||||
pub_.getTransferSender().setCanIOFlags(CanIOFlagLoopback);
|
||||
pub_.setPriority(TransferPriorityHigh); // Fixed priority
|
||||
pub_.setPriority(priority);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@@ -109,7 +109,7 @@ class UAVCAN_EXPORT GlobalTimeSyncMaster : protected LoopbackFrameListenerBase
|
||||
{
|
||||
if (frame.getDataTypeID() == dtid_ &&
|
||||
frame.getTransferType() == TransferTypeMessageBroadcast &&
|
||||
frame.isLast() && frame.isFirst() &&
|
||||
frame.isStartOfTransfer() && frame.isEndOfTransfer() &&
|
||||
frame.getSrcNodeID() == node_.getNodeID())
|
||||
{
|
||||
iface_masters_[iface]->setTxTimestamp(frame.getUtcTimestamp());
|
||||
|
||||
Reference in New Issue
Block a user