1 '''MAVLink X25 CRC code''' 2 from builtins
import object
6 '''x25 CRC - based on checksum.h from mavlink library''' 10 if isinstance(buf, str):
16 '''add in some more bytes''' 19 tmp = b ^ (accum & 0xff)
20 tmp = (tmp ^ (tmp<<4)) & 0xFF
21 accum = (accum>>8) ^ (tmp<<8) ^ (tmp<<3) ^ (tmp>>4)
25 '''add in some more bytes''' 28 bytes = array.array(
'B')
def accumulate_str(self, buf)
def accumulate(self, buf)
def __init__(self, buf=None)