From: nickthetait Date: Tue, 10 Nov 2015 15:23:40 +0000 (-0700) Subject: Combine retract and head lift into same step when pausing X-Git-Tag: lulzbot-17.14~4 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=e20d8ece5f0a88815b537eab3df67126b0f8b580;p=cura.git Combine retract and head lift into same step when pausing --- diff --git a/Cura/util/printerConnection/serialConnection.py b/Cura/util/printerConnection/serialConnection.py index 92344f70..bf37ea64 100644 --- a/Cura/util/printerConnection/serialConnection.py +++ b/Cura/util/printerConnection/serialConnection.py @@ -171,15 +171,21 @@ class serialConnection(printerConnectionBase.printerConnectionBase): if x is not None and y is not None: # Set E relative positioning self.sendCommand("M83") + # Retract 1mm - self.sendCommand("G1 E-%f F120" % retract_amount) + retract = ("E-%f" % retract_amount) #Move the toolhead up newZ = self._ZPosition + moveZ if maxZ < newZ: newZ = maxZ + if newZ > self._ZPosition: - self.sendCommand("G1 Z%f F200\n" % (newZ)) + move = ("Z%f " % (newZ)) + else: #No z movement, too close to max height + move = "" + retract_and_move = "G1 {} {}F120\n".format(retract, move) + self.sendCommand(retract_and_move) #Move the head away self.sendCommand("G1 X%f Y%f F9000\n" % (parkX, parkY))