"""
calculates the checksum of the packet.
:param data: the datapacket
Returns the list containing two bytes which are the checksum of the given
packet.
"""
frame = data[6:]
csum = sum(getIntList(frame))
_csum1 = int(csum / 256)
csum2 = csum % 256_
#print(hex(csum1), hex(csum2))
return [csum1, csum2]