Fixed whitespace
parent
8be1329a71
commit
ac4a0f772d
|
@ -947,20 +947,20 @@ class MachineCom(object):
|
||||||
line = line[0]
|
line = line[0]
|
||||||
|
|
||||||
if not self.isStreaming():
|
if not self.isStreaming():
|
||||||
try:
|
try:
|
||||||
if matchesGcode(line, "M0") or matchesGcode(line, "M1"):
|
if matchesGcode(line, "M0") or matchesGcode(line, "M1"):
|
||||||
self.setPause(True)
|
self.setPause(True)
|
||||||
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 self._printSection in self._feedRateModifier:
|
if self._printSection in self._feedRateModifier:
|
||||||
line = re.sub('F([0-9]*)', lambda m: 'F' + str(int(int(m.group(1)) * self._feedRateModifier[self._printSection])), line)
|
line = re.sub('F([0-9]*)', lambda m: 'F' + str(int(int(m.group(1)) * self._feedRateModifier[self._printSection])), line)
|
||||||
if (matchesGcode(line, "G0") or matchesGcode(line, "G1")) and 'Z' in line:
|
if (matchesGcode(line, "G0") or matchesGcode(line, "G1")) and 'Z' in line:
|
||||||
z = float(re.search('Z([0-9\.]*)', line).group(1))
|
z = float(re.search('Z([0-9\.]*)', line).group(1))
|
||||||
if self._currentZ != z:
|
if self._currentZ != z:
|
||||||
self._currentZ = z
|
self._currentZ = z
|
||||||
self._callback.mcZChange(z)
|
self._callback.mcZChange(z)
|
||||||
except:
|
except:
|
||||||
self._log("Unexpected error: %s" % (getExceptionString()))
|
self._log("Unexpected error: %s" % (getExceptionString()))
|
||||||
self._sendCommand(line, True)
|
self._sendCommand(line, True)
|
||||||
self._callback.mcProgress()
|
self._callback.mcProgress()
|
||||||
|
|
||||||
def sendCommand(self, cmd):
|
def sendCommand(self, cmd):
|
||||||
|
|
Loading…
Reference in New Issue