Add message while pausing

This way you can display instructions during the print.

Implements issue CURA-6759.
This commit is contained in:
Ghostkeeper 2019-09-06 12:41:09 +02:00
parent db604cdd16
commit c1b4bcebec
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
2 changed files with 12 additions and 2 deletions

View file

@ -106,10 +106,17 @@ class PauseAtHeight(Script):
"standby_temperature":
{
"label": "Standby Temperature",
"description": "Change the temperature during the pause",
"description": "Change the temperature during the pause.",
"unit": "°C",
"type": "int",
"default_value": 0
},
"display_text":
{
"label": "Display Text",
"description": "Text that should appear on the display while paused.",
"type": "str",
"default_value": "Print paused."
}
}
}"""
@ -144,6 +151,7 @@ class PauseAtHeight(Script):
firmware_retract = Application.getInstance().getGlobalContainerStack().getProperty("machine_firmware_retract", "value")
control_temperatures = Application.getInstance().getGlobalContainerStack().getProperty("machine_nozzle_temp_enabled", "value")
initial_layer_height = Application.getInstance().getGlobalContainerStack().getProperty("layer_height_0", "value")
display_text = self.getSettingValueByKey("display_text")
is_griffin = False
@ -287,6 +295,8 @@ class PauseAtHeight(Script):
# Set extruder standby temperature
prepend_gcode += self.putValue(M = 104, S = standby_temperature) + " ; standby temperature\n"
prepend_gcode += "M117 " + display_text + "\n"
# Wait till the user continues printing
prepend_gcode += self.putValue(M = 0) + " ; Do the actual pause\n"