mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 07:33:35 +08:00
Smarter use of UAVCAN_PACKED_*
This commit is contained in:
@@ -16,7 +16,6 @@ namespace uavcan
|
||||
/**
|
||||
* Raw CAN frame, as passed to/from the CAN driver.
|
||||
*/
|
||||
UAVCAN_PACKED_BEGIN
|
||||
struct UAVCAN_EXPORT CanFrame
|
||||
{
|
||||
static const uint32_t MaskStdID = 0x000007FFU;
|
||||
@@ -74,7 +73,6 @@ struct UAVCAN_EXPORT CanFrame
|
||||
bool priorityHigherThan(const CanFrame& rhs) const;
|
||||
bool priorityLowerThan(const CanFrame& rhs) const { return rhs.priorityHigherThan(*this); }
|
||||
};
|
||||
UAVCAN_PACKED_END
|
||||
|
||||
/**
|
||||
* CAN hardware filter config struct.
|
||||
|
||||
@@ -76,13 +76,11 @@ public:
|
||||
template <int NumStaticEntries>
|
||||
class UAVCAN_EXPORT OutgoingTransferRegistry : public IOutgoingTransferRegistry, Noncopyable
|
||||
{
|
||||
UAVCAN_PACKED_BEGIN
|
||||
struct Value
|
||||
{
|
||||
MonotonicTime deadline;
|
||||
TransferID tid;
|
||||
};
|
||||
UAVCAN_PACKED_END
|
||||
|
||||
class DeadlineExpiredPredicate
|
||||
{
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
namespace uavcan
|
||||
{
|
||||
UAVCAN_PACKED_BEGIN
|
||||
/**
|
||||
* Internal for TransferBufferManager
|
||||
*/
|
||||
@@ -136,7 +135,6 @@ public:
|
||||
virtual int read(unsigned offset, uint8_t* data, unsigned len) const;
|
||||
virtual int write(unsigned offset, const uint8_t* data, unsigned len);
|
||||
};
|
||||
UAVCAN_PACKED_END
|
||||
|
||||
/**
|
||||
* Standalone static buffer
|
||||
|
||||
@@ -36,7 +36,6 @@ class UAVCAN_EXPORT MapBase : Noncopyable
|
||||
{
|
||||
template <typename, typename, unsigned> friend class Map;
|
||||
|
||||
UAVCAN_PACKED_BEGIN
|
||||
public:
|
||||
struct KVPair
|
||||
{
|
||||
@@ -100,7 +99,6 @@ private:
|
||||
return NULL;
|
||||
}
|
||||
};
|
||||
UAVCAN_PACKED_END
|
||||
|
||||
LinkedListRoot<KVGroup> list_;
|
||||
IPoolAllocator& allocator_;
|
||||
|
||||
Reference in New Issue
Block a user