Beispiel #1
0
 def calculate_crc8(self):
     temp = array('B')
     temp.fromlist([self.address, self.command, len(self.data)] + self.data)
     return generate_crc8(temp)
Beispiel #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)