Merge pull request #2868 from gdombiak/extrude_speed2
Documentation fixed and extrusion speed value check
This commit is contained in:
2 files changed
+6
-3
No files matched your search
@@ -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:
|
||||
|
||||
@@ -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"})
|
||||
|
||||
Reference in new issue
Block a user