Add absolute jog mode to printer API
This commit is contained in:
1 parent
d9e3553c7c
commit
294203ffd5
5 files changed
+62
-25
No files matched your search
@@ -244,9 +244,11 @@ def printerPrintheadCommand():
|
||||
return make_response("Not a number for axis %s: %r" % (axis, value), 400)
|
||||
validated_values[axis] = value
|
||||
|
||||
absolute = "absolute" in data and data["absolute"] in valid_boolean_trues
|
||||
speed = data.get("speed", None)
|
||||
|
||||
# execute the jog commands
|
||||
for axis, value in validated_values.iteritems():
|
||||
printer.jog(axis, value)
|
||||
printer.jog(validated_values, relative=not absolute, speed=speed)
|
||||
|
||||
##~~ home command
|
||||
elif command == "home":
|
||||
|
||||
Reference in new issue
Block a user