1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 16:25:16 +03:00
opentx/radio/util/bin2lbm.py
2014-03-15 15:36:02 +01:00

20 lines
272 B
Python

#!/usr/bin/env python
import sys
filename = sys.argv[1]
fileout = sys.argv[2]
fr = open(filename, "rb")
fw = open(fileout, "w")
st = fr.read(16)
while st:
for b in st:
fw.write("0x%02x," % ord(b))
fw.write("\n")
st = fr.read(16)
fw.write("\n")
fw.close()