Fixed whitespace

master
Gina Häußge 2013-06-09 18:29:28 +02:00
parent 8be1329a71
commit ac4a0f772d
1 changed files with 14 additions and 14 deletions

View File

@ -947,20 +947,20 @@ class MachineCom(object):
line = line[0]
if not self.isStreaming():
try:
if matchesGcode(line, "M0") or matchesGcode(line, "M1"):
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.
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)
if (matchesGcode(line, "G0") or matchesGcode(line, "G1")) and 'Z' in line:
z = float(re.search('Z([0-9\.]*)', line).group(1))
if self._currentZ != z:
self._currentZ = z
self._callback.mcZChange(z)
except:
self._log("Unexpected error: %s" % (getExceptionString()))
self._sendCommand(line, True)
try:
if matchesGcode(line, "M0") or matchesGcode(line, "M1"):
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.
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)
if (matchesGcode(line, "G0") or matchesGcode(line, "G1")) and 'Z' in line:
z = float(re.search('Z([0-9\.]*)', line).group(1))
if self._currentZ != z:
self._currentZ = z
self._callback.mcZChange(z)
except:
self._log("Unexpected error: %s" % (getExceptionString()))
self._sendCommand(line, True)
self._callback.mcProgress()
def sendCommand(self, cmd):