I need help with the MAVLink checksum calculation.

I am converting the MAVLink C code to Lab View but I have run into a snag converting the CRC16 or custom CRC16 in MAVLink.

 

This is snippet from the code:

 

        /*Accumulate one byte of data into the CRC*/

        uint8_t tmp;

 

        tmp=data ^ (uint8_t)(*crcAccum &0xff);

        tmp^= (tmp<<4);

        *crcAccum = (*crcAccum>>8) ^ (tmp<<8) ^ (tmp <<3) ^ (tmp>>4);

 

Would someone please explain what this is doing line by line?

 

Or if someone has this converted in lab view, please share.

 

Thank You

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

This reply was deleted.

Activity