Index: DialityCoreCanProtocol.py =================================================================== diff -u -r3e2ad9b140f2a89ef930e1c71a1161a7e82c9394 -r02ddf7fade8c321acf6947d997ab89b30907671a --- DialityCoreCanProtocol.py (.../DialityCoreCanProtocol.py) (revision 3e2ad9b140f2a89ef930e1c71a1161a7e82c9394) +++ DialityCoreCanProtocol.py (.../DialityCoreCanProtocol.py) (revision 02ddf7fade8c321acf6947d997ab89b30907671a) @@ -240,7 +240,7 @@ # A packet can be longer than 8 bytes, so we need to split it # into 8 bytes messages. - number_of_messages = math.ceil((padded_can_packet_length + 4) / 8) + number_of_messages = math.ceil((padded_can_packet_length + 5) / 8) # We are sending one message at a time on CAN @@ -324,7 +324,7 @@ # message must be multiple of 8 if packet_length % 8 != 0: - # We might need to patch the message with zeros + # We need to pad the message with trailing zeros add_these_many_zeros = math.ceil(packet_length / 8) * 8 - packet_length packet += [0] * add_these_many_zeros