mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 22:03:35 +08:00
Integrated DataTypeSignature; hash removed
This commit is contained in:
@@ -35,12 +35,6 @@ public:
|
||||
: value_(0xFFFF)
|
||||
{ }
|
||||
|
||||
TransferCRC(const uint8_t* bytes, unsigned int len)
|
||||
: value_(0xFFFF)
|
||||
{
|
||||
add(bytes, len);
|
||||
}
|
||||
|
||||
void add(uint8_t byte)
|
||||
{
|
||||
value_ = ((value_ << 8) ^ Table[((value_ >> 8) ^ byte) & 0xFF]) & 0xFFFF;
|
||||
|
||||
@@ -95,7 +95,7 @@ class TransferListenerBase : public LinkedListNode<TransferListenerBase>
|
||||
protected:
|
||||
TransferListenerBase(const DataTypeDescriptor& data_type)
|
||||
: data_type_(data_type)
|
||||
, crc_base_(data_type.hash.value, DataTypeHash::NumBytes)
|
||||
, crc_base_(data_type.signature.toTransferCRC())
|
||||
{ }
|
||||
|
||||
virtual ~TransferListenerBase() { }
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
: max_transfer_interval_(max_transfer_interval)
|
||||
, data_type_(data_type)
|
||||
, qos_(qos)
|
||||
, crc_base_(data_type.hash.value, DataTypeHash::NumBytes)
|
||||
, crc_base_(data_type.signature.toTransferCRC())
|
||||
, dispatcher_(dispatcher)
|
||||
{ }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user