diff --git a/Bootup Logo/python_logo_converter/img2ts100.py b/Bootup Logo/python_logo_converter/img2ts100.py index 075938a0..26bc8fed 100644 --- a/Bootup Logo/python_logo_converter/img2ts100.py +++ b/Bootup Logo/python_logo_converter/img2ts100.py @@ -43,13 +43,14 @@ def intel_hex_line(file, record_type, offset, data): # compute and write checksum (with DOS line ending for compatibility/safety) file.write("{:02X}\r\n" - .format(((sum(data, # sum data ... - record_length # ... and other ... - + sum(split16(offset)) # ... fields ... - + record_type) # ... on line - & 0xff) # low 8 bits - ^ 0xff) # two's ... - + 1)) # ... complement + .format((((sum(data, # sum data ... + record_length # ... and other ... + + sum(split16(offset)) # ... fields ... + + record_type) # ... on line + & 0xff) # low 8 bits + ^ 0xff) # two's ... + + 1) # ... complement + & 0xff)) # low 8 bits def intel_hex(file, bytes_, start_address=0x0):