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

@ -27,6 +27,9 @@ class AvrFirmwareUpdater(FirmwareUpdater):
except (FileNotFoundError, AssertionError):
Logger.log("e", "Unable to read provided hex file. Could not update firmware.")
self._setFirmwareUpdateState(FirmwareUpdateState.firmware_not_found_error)
except Exception:
Logger.logException("e", "Failed to read hex file '%s'", self._firmware_file)
self._setFirmwareUpdateState(FirmwareUpdateState.invalid_firmware_error)
return
programmer = stk500v2.Stk500v2()