Retract further if we can't set the temperature to stand-by temp

Because we can't set the temperature and we don't know the correct temperature to set it back to, we will just retract further in order to prevent damage to the material.

Contributes to issue CURA-5491.
This commit is contained in:
Ghostkeeper 2018-07-09 11:21:16 +02:00
parent 1fdac63168
commit 54b990c0bd
No known key found for this signature in database
GPG Key ID: 5252B696FB5E7C7A

View File

@ -266,8 +266,10 @@ class PauseAtHeight(Script):
# Retraction
prepend_gcode += self.putValue(M = 83) + "\n"
if retraction_amount != 0:
if firmware_retract:
prepend_gcode += self.putValue(G = 10)
if firmware_retract: #Can't set the distance directly to what the user wants. We have to choose ourselves.
retraction_count = 1 if control_temperatures else 3 #Retract more if we don't control the temperature.
for i in range(retraction_count):
prepend_gcode += self.putValue(G = 10) + "\n"
else:
prepend_gcode += self.putValue(G = 1, E = -retraction_amount, F = retraction_speed * 60) + "\n"
@ -309,8 +311,10 @@ class PauseAtHeight(Script):
prepend_gcode += self.putValue(G = 1, Z = current_z + 1, F = 300) + "\n"
prepend_gcode += self.putValue(G = 1, X = x, Y = y, F = 9000) + "\n"
if retraction_amount != 0:
if firmware_retract:
prepend_gcode += self.putValue(G = 11)
if firmware_retract: #Can't set the distance directly to what the user wants. We have to choose ourselves.
retraction_count = 1 if control_temperatures else 3 #Retract more if we don't control the temperature.
for i in range(retraction_count):
prepend_gcode += self.putValue(G = 11) + "\n"
else:
prepend_gcode += self.putValue(G = 1, E = retraction_amount, F = retraction_speed * 60) + "\n"
prepend_gcode += self.putValue(G = 1, F = 9000) + "\n"