Added support to specify extrude/retract speed. Only at REST API. No UI changes were made

This commit is contained in:
Gaston Dombiak committed 2018-10-30 19:01:20 -07:00
1 parent 2f89082df2
commit 00aa4876e9
5 files changed
+17 -4

No files matched your search

+2 -1
View File
@@ -129,9 +129,10 @@ def printerToolCommand():
return make_response("Printer is currently printing", 409)
amount = data["amount"]
speed = data.get("speed", None)
if not isinstance(amount, (int, long, float)):
return make_response("Not a number for extrusion amount: %r" % amount, 400)
printer.extrude(amount, tags=tags)
printer.extrude(amount, speed=speed, tags=tags)
elif command == "flowrate":
factor = data["factor"]