#include "protocolPTZ.h" static inline uint16_t x25_crc_calculate( uint8_t *pBuffer, size_t length ){ uint16_t crcTmp = 0xffff; for ( size_t i = 0; i < length; i++){ uint8_t tmp; tmp = pBuffer[i] ^ (uint8_t)(crcTmp & 0xff); tmp ^= (tmp<<4); crcTmp = (crcTmp>>8) ^ (crcTmp<<8) ^ (tmp <<3) ^ (tmp>>4); }; return crcTmp; }; protocolMAVLINK::protocolMAVLINK(){ m_oDataTransport = NULL; }; protocolMAVLINK::protocolMAVLINK( basicTransport *Serial ):protocolParser(){ m_oDataTransport = Serial; if( m_oDataTransport != NULL ) { m_oDataTransport->addRecipient( ( protocolParser *) this ); }; }; protocolMAVLINK::~protocolMAVLINK(){ };