Index: leahi_dialin/dd/modules/records.py =================================================================== diff -u -r6d9a45c779b9ee3c362f85820db9f89d8dbb8b3c -ree914de19a46c34d2103b56072640895779728ec --- leahi_dialin/dd/modules/records.py (.../records.py) (revision 6d9a45c779b9ee3c362f85820db9f89d8dbb8b3c) +++ leahi_dialin/dd/modules/records.py (.../records.py) (revision ee914de19a46c34d2103b56072640895779728ec) @@ -27,7 +27,7 @@ from leahi_dialin.utils.abstract_classes import AbstractSubSystem from leahi_dialin.utils.base import publish from leahi_dialin.utils.enums import DialinEnum -from leahi_dialin.utils.conversions import integer_to_bytearray, float_to_bytearray, byte_to_bytearray, unsigned_short_to_bytearray +from leahi_dialin.utils.conversions import integer_to_bytearray, float_to_bytearray, byte_to_bytearray, unsigned_short_to_bytearray, string_to_bytearray class DDRecords(AbstractSubSystem): @@ -576,11 +576,9 @@ raise ValueError(f'serial must be 20 characters, provided is: {len(serial_number)}') payload = integer_to_bytearray(is_ro_featured) - payload = integer_to_bytearray(is_ro_featured_boost_pump) - for c in part_number: - payload += byte_to_bytearray(c) - for c in serial_number: - payload += byte_to_bytearray(c) + payload += integer_to_bytearray(is_ro_featured_boost_pump) + payload += string_to_bytearray(part_number) + payload += string_to_bytearray(serial_number) payload += integer_to_bytearray(manufacturing_location) payload += integer_to_bytearray(manufacturing_date) payload += unsigned_short_to_bytearray(self.crc16(payload))