示例#1
0
 def calculate_crc8(self):
     temp = array('B')
     temp.fromlist([self.address, self.command, len(self.data)] + self.data)
     return generate_crc8(temp)
示例#2
0
 def calculate_crc8(self):
     temp = array('B')
     temp.fromlist([(self.address << 1) + self.respond, self.command,
                    len(self.params)] + self.params)
     return generate_crc8(temp)