diff --git a/plugins/PostProcessingPlugin/scripts/MaxVolumetricSpeed.py b/plugins/PostProcessingPlugin/scripts/MaxVolumetricSpeed.py index 150a16caf1c..7e27ef6d03e 100644 --- a/plugins/PostProcessingPlugin/scripts/MaxVolumetricSpeed.py +++ b/plugins/PostProcessingPlugin/scripts/MaxVolumetricSpeed.py @@ -77,7 +77,7 @@ def execute(self, data): max_e_flow_rate = self.getSettingValueByKey("max_E_flow_rate") # Adjust the search parameter depending on Firmware Retraction if not firmware_retraction: - search_string = "G1 F(\d*\d.?) E(-?\d.*)" + search_string = "G1 F(\d+\.\d+|\d+) E(-?\d+\.\d+|-?\d+)" else: search_string = "G1[0-1]" # Calculate the E Speed Maximum for the print @@ -95,4 +95,6 @@ def execute(self, data): if re.search(search_regex, line) is not None: lines[index] = f"M203 E{speed_e_reset}\n" + line + f"\nM203 E{speed_e_max}" data[num] = "\n".join(lines) + # Reset the E speed at the end of the print + data[len(data)-1] = "M203 E" + str(speed_e_reset) + " ; Reset max E speed\n" + data[len(data)-1] return data