Firmware flasher now uses logger instead of print

CURA-1809
This commit is contained in:
Jaime van Kessel 2016-11-03 14:26:41 +01:00
parent 450eb5443f
commit 7eec074b0f
3 changed files with 10 additions and 7 deletions

View file

@ -5,6 +5,8 @@ See: http://en.wikipedia.org/wiki/Intel_HEX
This is a python 3 conversion of the code created by David Braam for the Cura project.
"""
import io
from UM.Logger import Logger
def readHex(filename):
"""
@ -41,6 +43,6 @@ def readHex(filename):
elif rec_type == 2: #Extended Segment Address Record
extra_addr = int(line[9:13], 16) * 16
else:
print(rec_type, rec_len, addr, check_sum, line)
Logger.log("d", "%s, %s, %s, %s, %s", rec_type, rec_len, addr, check_sum, line)
f.close()
return data