mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 12:53:34 +08:00
Crc16 --> TransferCRC
This commit is contained in:
@@ -14,7 +14,7 @@ namespace uavcan
|
||||
* Initial value: 0x0000
|
||||
* Coefficient: 0x1021
|
||||
*/
|
||||
class Crc16
|
||||
class TransportCRC
|
||||
{
|
||||
static const uint16_t Table[256];
|
||||
uint16_t value_;
|
||||
@@ -22,11 +22,11 @@ class Crc16
|
||||
public:
|
||||
enum { NumBytes = 2 };
|
||||
|
||||
Crc16()
|
||||
TransportCRC()
|
||||
: value_(0x0000)
|
||||
{ }
|
||||
|
||||
Crc16(const uint8_t* bytes, unsigned int len)
|
||||
TransportCRC(const uint8_t* bytes, unsigned int len)
|
||||
: value_(0x0000)
|
||||
{
|
||||
add(bytes, len);
|
||||
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
class TransferListenerBase : public LinkedListNode<TransferListenerBase>
|
||||
{
|
||||
const DataTypeDescriptor& data_type_;
|
||||
const Crc16 crc_base_; ///< Pre-initialized with data type hash, thus constant
|
||||
const TransportCRC crc_base_; ///< Pre-initialized with data type hash, thus constant
|
||||
|
||||
bool checkPayloadCrc(const uint16_t compare_with, const ITransferBuffer& tbb) const;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class TransferSender
|
||||
const uint64_t max_transfer_interval_;
|
||||
const DataTypeDescriptor& data_type_;
|
||||
const CanTxQueue::Qos qos_;
|
||||
const Crc16 crc_base_;
|
||||
const TransportCRC crc_base_;
|
||||
|
||||
Dispatcher& dispatcher_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user