From e20d8ece5f0a88815b537eab3df67126b0f8b580 Mon Sep 17 00:00:00 2001 From: nickthetait Date: Tue, 10 Nov 2015 08:23:40 -0700 Subject: [PATCH] Combine retract and head lift into same step when pausing --- Cura/util/printerConnection/serialConnection.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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)) -- 2.30.2