diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index 204c259655..1ba8b8213b 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -49,14 +49,14 @@ class PauseAtHeight(Script): "minimum_value_warning": "1", "enabled": "pause_at == 'layer_no'" }, - "pause_duration": + "disarm_timeout": { - "label": "Pause Duration", - "description": "After this time steppers are going to disarm (meaning that they can easyly lose their positions)", + "label": "Disarm timeout", + "description": "After this time steppers are going to disarm (meaning that they can easily lose their positions). Set this to 0 if you don't want to set any duration.", "type": "int", - "value": "120", + "value": "0", "minimum_value": "0", - "minimum_value_warning": "30", + "minimum_value_warning": "0", "maximum_value_warning": "1800", "unit": "s" }, @@ -152,7 +152,7 @@ class PauseAtHeight(Script): pause_at = self.getSettingValueByKey("pause_at") pause_height = self.getSettingValueByKey("pause_height") pause_layer = self.getSettingValueByKey("pause_layer") - pause_duration = self.getSettingValueByKey("pause_duration") + disarm_timeout = self.getSettingValueByKey("disarm_timeout") retraction_amount = self.getSettingValueByKey("retraction_amount") retraction_speed = self.getSettingValueByKey("retraction_speed") extrude_amount = self.getSettingValueByKey("extrude_amount") @@ -320,7 +320,8 @@ class PauseAtHeight(Script): prepend_gcode += "M117 " + display_text + "\n" # Set the disarm timeout - prepend_gcode += self.putValue(M = 18, S = pause_duration) + " ; Set the disarm timeout\n" + if disarm_timeout > 0: + prepend_gcode += self.putValue(M = 18, S = disarm_timeout) + " ; Set the disarm timeout\n" # Wait till the user continues printing prepend_gcode += self.putValue(M = 0) + " ; Do the actual pause\n"