diff --git a/docs/api/printer.rst b/docs/api/printer.rst index c110a6de1..1c8483a55 100644 --- a/docs/api/printer.rst +++ b/docs/api/printer.rst @@ -219,7 +219,7 @@ Issue a print head command axes values are relative amounts) or to absolute position (provided axes values are coordinates) * ``speed``: Optional. Speed at which to move. If not provided, minimum speed for all selected axes from printer profile will be used. If provided but ``false``, no speed parameter will be appended to the command. Otherwise - interpreted as an integer signifying the speed in mm/s, to append to the command. + interpreted as an integer signifying the speed in mm/min, to append to the command. home Homes the print head in all of the given axes. Additional parameters are: diff --git a/src/octoprint/printer/standard.py b/src/octoprint/printer/standard.py index 044e32cbc..80cae7aa5 100644 --- a/src/octoprint/printer/standard.py +++ b/src/octoprint/printer/standard.py @@ -368,11 +368,14 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): printer_profile = self._printerProfileManager.get_current_or_default() # Use specified speed (if any) - extrusion_speed = speed + max_e_speed = printer_profile["axes"]["e"]["speed"] if speed is None: # No speed was specified so default to value configured in printer profile - extrusion_speed = printer_profile["axes"]["e"]["speed"] + extrusion_speed = max_e_speed + else: + # Make sure that specified value is not greater than maximum as defined in printer profile + extrusion_speed = min([speed, max_e_speed]) self.commands(["G91", "G1 E%s F%d" % (amount, extrusion_speed), "G90"], tags=kwargs.get("tags", set()) | {"trigger:printer.extrude"})