From 85b835118dc91d829f7f5c31eb2b6b254f023d92 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 12 Oct 2018 13:24:09 +0200 Subject: [PATCH] Log which firmware file you're about to upload Kind of critical information, really. Contributes to issue CURA-5749. --- plugins/USBPrinting/USBPrinterOutputDevice.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 36c5321180..769820d6d0 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -59,9 +59,9 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self._all_baud_rates = [115200, 250000, 230400, 57600, 38400, 19200, 9600] # Instead of using a timer, we really need the update to be as a thread, as reading from serial can block. - self._update_thread = Thread(target=self._update, daemon = True) + self._update_thread = Thread(target = self._update, daemon = True) - self._update_firmware_thread = Thread(target=self._updateFirmware, daemon = True) + self._update_firmware_thread = Thread(target = self._updateFirmware, daemon = True) self._last_temperature_request = None # type: Optional[int] @@ -160,6 +160,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): if self._connection_state != ConnectionState.closed: self.close() + Logger.log("i", "Uploading hex file from: {firmware_location}".format(firmware_location = self._firmware_location)) try: hex_file = intelHex.readHex(self._firmware_location) assert len(hex_file) > 0