From 997b6f830d6a711341d0211f3034a9cf343a692e Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 4 Nov 2022 09:12:47 +0100 Subject: [PATCH] Manually revert part of PR. It shouldn't really be nescesary, but you _can_ put any gcode flavour in relative or absolute, so we should also deal with that in the pause-at-height script. --- plugins/PostProcessingPlugin/scripts/PauseAtHeight.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index 3c579d1ed5..6afac57359 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -514,7 +514,15 @@ class PauseAtHeight(Script): else: Logger.log("w", "No previous feedrate found in gcode, feedrate for next layer(s) might be incorrect") - prepend_gcode += self.putValue(M = 82) + "\n" + extrusion_mode_string = "absolute" + extrusion_mode_numeric = 82 + + relative_extrusion = Application.getInstance().getGlobalContainerStack().getProperty("relative_extrusion", "value") + if relative_extrusion: + extrusion_mode_string = "relative" + extrusion_mode_numeric = 83 + + prepend_gcode += self.putValue(M = extrusion_mode_numeric) + " ; switch back to " + extrusion_mode_string + " E values\n" # reset extrude value to pre pause value prepend_gcode += self.putValue(G = 92, E = current_e) + "\n"