Removed function for calculation CRC

This commit is contained in:
Christian Sueltrop 2013-11-20 11:28:18 +01:00
parent 358a871493
commit c2bd9b792f

View file

@ -9,7 +9,7 @@ Created on 06.07.2012
import array
import sys
from pycrc import Crc
#from pycrc import Crc
class CanMessage(object):
@ -165,17 +165,17 @@ class CanMessage(object):
If this is true for all checksums is not certain! Has been tested for mMotor_5 and mMotor_6 only!
'''
def calculateCRC(self):
#crc = Crc(width=8, poly=0x01, reflect_in = False, reflect_out = False, xor_in = 0xff, xor_out = 0xff) # configure the crc calculator according to the VW parameters
#self.composeData()
#data = self.Data.tostring()
#my_crc = crc.bit_by_bit_fast(data)
#return my_crc
my_crc = 0;
for i in range(len(self.Data)):
my_crc ^= self.Data[i]
return my_crc
#def calculateCRC(self):
# #crc = Crc(width=8, poly=0x01, reflect_in = False, reflect_out = False, xor_in = 0xff, xor_out = 0xff) # configure the crc calculator according to the VW parameters
# #self.composeData()
# #data = self.Data.tostring()
# #my_crc = crc.bit_by_bit_fast(data)
# #return my_crc
#
# my_crc = 0;
# for i in range(len(self.Data)):
# my_crc ^= self.Data[i]
#
# return my_crc