Removed function for calculation CRC
This commit is contained in:
parent
358a871493
commit
c2bd9b792f
1 changed files with 181 additions and 181 deletions
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue