Merge pull request #491 from timecop97/master

changed intel Hex gen to use unix line endings to fix #460
This commit is contained in:
Ben V. Brown
2019-08-16 08:12:34 +10:00
committed by GitHub

View File

@@ -42,8 +42,8 @@ def intel_hex_line(record_type, offset, data):
for byte in data:
yield "{:02X}".format(byte)
# compute and write checksum (with DOS line ending for compatibility/safety)
yield "{:02X}\r\n".format((((sum(data, # sum data ...
# compute and write checksum (now using unix style line endings for DFU3.45 compatibility
yield "{:02X}\n".format((((sum(data, # sum data ...
record_length # ... and other ...
+ sum(split16(offset)) # ... fields ...
+ record_type) # ... on line