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
Replies
Thank You Michael
The code and explanation was a big help.
I have included the Lab View vi for others to use.
CRC16_MAVLink_Checksum_Calculator.vi
have a look here
http://code.google.com/p/ardupilot-mega/source/browse/Tools/trunk/A...