Add UI feedback on invalid firmware update

CURA-6537
This commit is contained in:
Lipu Fei 2019-08-27 08:51:48 +02:00
parent b20a349b44
commit 3853fb6d19
4 changed files with 11 additions and 3 deletions

View file

@ -5,13 +5,16 @@ 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 typing import List
from UM.Logger import Logger
def readHex(filename):
def readHex(filename: str) -> List[int]:
"""
Read an verify an intel hex file. Return the data as an list of bytes.
"""
data = []
data = [] # type: List[int]
extra_addr = 0
f = io.open(filename, "r", encoding = "utf-8")
for line in f: