From 1a4819b2b92adb93ce508db8854b3104fd52870d Mon Sep 17 00:00:00 2001 From: Daid Date: Wed, 27 Jun 2012 20:24:51 +0200 Subject: [PATCH] Do not send the M0 or M1 to the machine, but send an M105 instead. We still need to send something to keep the line numbering working. Sending an M105 is harmless. --- Cura/gui/printWindow.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Cura/gui/printWindow.py b/Cura/gui/printWindow.py index e6f804cd..d238e90e 100644 --- a/Cura/gui/printWindow.py +++ b/Cura/gui/printWindow.py @@ -363,6 +363,9 @@ class printWindow(wx.Frame): if lineNr >= len(self.gcodeList): return False line = self.gcodeList[lineNr] + if line == 'M0' or line == 'M1': + self.OnPause(None) + line = 'M105' if self.typeList[lineNr] == 'WALL-OUTER': line = re.sub('F([0-9]*)', lambda m: 'F' + str(int(int(m.group(1)) * self.feedrateRatioOuterWall)), line) if self.typeList[lineNr] == 'WALL-INNER': @@ -373,8 +376,6 @@ class printWindow(wx.Frame): line = re.sub('F([0-9]*)', lambda m: 'F' + str(int(int(m.group(1)) * self.feedrateRatioSupport)), line) checksum = reduce(lambda x,y:x^y, map(ord, "N%d%s" % (lineNr, line))) self.machineCom.sendCommand("N%d%s*%d" % (lineNr, line, checksum)) - if line == 'M0' or line == 'M1': - self.OnPause(None) return True def PrinterMonitor(self): -- 2.30.2