mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Spelling
This commit is contained in:
parent
27e3f8b33f
commit
4c233e75f4
2 changed files with 13 additions and 11 deletions
|
@ -25,6 +25,7 @@ import Arcus
|
|||
from UM.i18n import i18nCatalog
|
||||
catalog = i18nCatalog("cura")
|
||||
|
||||
|
||||
class CuraEngineBackend(Backend):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
@ -84,7 +85,7 @@ class CuraEngineBackend(Backend):
|
|||
Application.getInstance().getMachineManager().activeMachineInstanceChanged.connect(self._onInstanceChanged)
|
||||
|
||||
## Get the command that is used to call the engine.
|
||||
# This is usefull for debugging and used to actually start the engine
|
||||
# This is useful for debugging and used to actually start the engine
|
||||
# \return list of commands and args / parameters.
|
||||
def getEngineCommand(self):
|
||||
active_machine = Application.getInstance().getMachineManager().getActiveMachineInstance()
|
||||
|
@ -158,7 +159,7 @@ class CuraEngineBackend(Backend):
|
|||
Logger.log("d", "Killing engine process")
|
||||
try:
|
||||
self._process.terminate()
|
||||
Logger.log("d", "Engine process is killed. Recieved return code %s", self._process.wait())
|
||||
Logger.log("d", "Engine process is killed. Received return code %s", self._process.wait())
|
||||
self._process = None
|
||||
#self._createSocket() # Re create the socket
|
||||
except Exception as e: # terminating a process that is already terminating causes an exception, silently ignore this.
|
||||
|
@ -261,7 +262,7 @@ class CuraEngineBackend(Backend):
|
|||
|
||||
def _onToolOperationStarted(self, tool):
|
||||
self._terminate() # Do not continue slicing once a tool has started
|
||||
self._enabled = False # Do not reslice when a tool is doing it's 'thing'
|
||||
self._enabled = False # Do not reslice when a tool is doing its 'thing'
|
||||
|
||||
def _onToolOperationStopped(self, tool):
|
||||
self._enabled = True # Tool stop, start listening for changes again.
|
||||
|
|
|
@ -23,6 +23,7 @@ from PyQt5.QtCore import QUrl, QObject, pyqtSlot, pyqtProperty, pyqtSignal, Qt
|
|||
from UM.i18n import i18nCatalog
|
||||
catalog = i18nCatalog("cura")
|
||||
|
||||
|
||||
class PrinterConnection(OutputDevice, QObject, SignalEmitter):
|
||||
def __init__(self, serial_port, parent = None):
|
||||
QObject.__init__(self, parent)
|
||||
|
@ -262,14 +263,14 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter):
|
|||
self._is_connecting = True
|
||||
programmer = stk500v2.Stk500v2()
|
||||
try:
|
||||
programmer.connect(self._serial_port) # Connect with the serial, if this succeeds, it"s an arduino based usb device.
|
||||
programmer.connect(self._serial_port) # Connect with the serial, if this succeeds, it's an arduino based usb device.
|
||||
self._serial = programmer.leaveISP()
|
||||
except ispBase.IspError as e:
|
||||
Logger.log("i", "Could not establish connection on %s: %s. Device is not arduino based." %(self._serial_port,str(e)))
|
||||
except Exception as e:
|
||||
Logger.log("i", "Could not establish connection on %s, unknown reasons. Device is not arduino based." % self._serial_port)
|
||||
|
||||
# If the programmer connected, we know its an atmega based version. Not all that usefull, but it does give some debugging information.
|
||||
# If the programmer connected, we know its an atmega based version. Not all that useful, but it does give some debugging information.
|
||||
for baud_rate in self._getBaudrateList(): # Cycle all baud rates (auto detect)
|
||||
Logger.log("d","Attempting to connect to printer with serial %s on baud rate %s", self._serial_port, baud_rate)
|
||||
if self._serial is None:
|
||||
|
@ -468,7 +469,7 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter):
|
|||
|
||||
## Private function to set the temperature of an extruder
|
||||
# \param index index of the extruder
|
||||
# \param temperature recieved temperature
|
||||
# \param temperature received temperature
|
||||
def _setExtruderTemperature(self, index, temperature):
|
||||
try:
|
||||
self._extruder_temperatures[index] = temperature
|
||||
|
@ -522,7 +523,7 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter):
|
|||
|
||||
if line.startswith(b"Error:"):
|
||||
# Oh YEAH, consistency.
|
||||
# Marlin reports an MIN/MAX temp error as "Error:x\n: Extruder switched off. MAXTEMP triggered !\n"
|
||||
# Marlin reports a MIN/MAX temp error as "Error:x\n: Extruder switched off. MAXTEMP triggered !\n"
|
||||
# But a bed temp error is reported as "Error: Temperature heated bed switched off. MAXTEMP triggered !!"
|
||||
# So we can have an extra newline in the most common case. Awesome work people.
|
||||
if re.match(b"Error:[0-9]\n", line):
|
||||
|
@ -538,7 +539,7 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter):
|
|||
self._setExtruderTemperature(self._temperature_requested_extruder_index,float(re.search(b"T: *([0-9\.]*)", line).group(1)))
|
||||
except:
|
||||
pass
|
||||
if b"B:" in line: # Check if it"s a bed temperature
|
||||
if b"B:" in line: # Check if it's a bed temperature
|
||||
try:
|
||||
self._setBedTemperature(float(re.search(b"B: *([0-9\.]*)", line).group(1)))
|
||||
except Exception as e:
|
||||
|
@ -587,7 +588,7 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter):
|
|||
line = line.strip()
|
||||
try:
|
||||
if line == "M0" or line == "M1":
|
||||
line = "M105" #Don"t send the M0 or M1 to the machine, as M0 and M1 are handled as an LCD menu pause.
|
||||
line = "M105" #Don't send the M0 or M1 to the machine, as M0 and M1 are handled as an LCD menu pause.
|
||||
if ("G0" in line or "G1" in line) and "Z" in line:
|
||||
z = float(re.search("Z([0-9\.]*)", line).group(1))
|
||||
if self._current_z != z:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue