mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Code style
This commit is contained in:
parent
4d7474b412
commit
efbb2ed081
1 changed files with 5 additions and 6 deletions
|
@ -90,7 +90,6 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
||||||
self._firmware_update_finished = False
|
self._firmware_update_finished = False
|
||||||
|
|
||||||
self._error_message = None
|
self._error_message = None
|
||||||
|
|
||||||
self._error_code = 0
|
self._error_code = 0
|
||||||
|
|
||||||
onError = pyqtSignal()
|
onError = pyqtSignal()
|
||||||
|
@ -202,7 +201,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
||||||
if not programmer.isConnected():
|
if not programmer.isConnected():
|
||||||
Logger.log("e", "Unable to connect with serial. Could not update firmware")
|
Logger.log("e", "Unable to connect with serial. Could not update firmware")
|
||||||
self._updateFirmwareFailedCommunicationError()
|
self._updateFirmwareFailedCommunicationError()
|
||||||
return
|
return
|
||||||
|
|
||||||
self._updating_firmware = True
|
self._updating_firmware = True
|
||||||
|
|
||||||
|
@ -225,19 +224,19 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
||||||
## Private function which makes sure that firmware update process has failed by missing firmware
|
## Private function which makes sure that firmware update process has failed by missing firmware
|
||||||
def _updateFirmwareFailedMissingFirmware(self):
|
def _updateFirmwareFailedMissingFirmware(self):
|
||||||
return self._updateFirmwareFailedCommon(4)
|
return self._updateFirmwareFailedCommon(4)
|
||||||
|
|
||||||
## Private function which makes sure that firmware update process has failed by an IO error
|
## Private function which makes sure that firmware update process has failed by an IO error
|
||||||
def _updateFirmwareFailedIOError(self):
|
def _updateFirmwareFailedIOError(self):
|
||||||
return self._updateFirmwareFailedCommon(3)
|
return self._updateFirmwareFailedCommon(3)
|
||||||
|
|
||||||
## Private function which makes sure that firmware update process has failed by a communication problem
|
## Private function which makes sure that firmware update process has failed by a communication problem
|
||||||
def _updateFirmwareFailedCommunicationError(self):
|
def _updateFirmwareFailedCommunicationError(self):
|
||||||
return self._updateFirmwareFailedCommon(2)
|
return self._updateFirmwareFailedCommon(2)
|
||||||
|
|
||||||
## Private function which makes sure that firmware update process has failed by an unknown error
|
## Private function which makes sure that firmware update process has failed by an unknown error
|
||||||
def _updateFirmwareFailedUnknown(self):
|
def _updateFirmwareFailedUnknown(self):
|
||||||
return self._updateFirmwareFailedCommon(1)
|
return self._updateFirmwareFailedCommon(1)
|
||||||
|
|
||||||
## Private common function which makes sure that firmware update process has completed/ended with a set progress state
|
## Private common function which makes sure that firmware update process has completed/ended with a set progress state
|
||||||
def _updateFirmwareFailedCommon(self, code):
|
def _updateFirmwareFailedCommon(self, code):
|
||||||
if not code:
|
if not code:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue