diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-08-01 15:40:35 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-08-02 08:58:18 -0400 |
commit | f2d232ef7711803801b948ce8875b79130b5b7cc (patch) | |
tree | 288cf11bfd2ab0d4cf7a53bb06387f7ad2254aba /klippy/extras/force_move.py | |
parent | c5ecb37b4e71d1d5bbf6e30c84207de4c43a81e1 (diff) | |
download | kutter-f2d232ef7711803801b948ce8875b79130b5b7cc.tar.gz kutter-f2d232ef7711803801b948ce8875b79130b5b7cc.tar.xz kutter-f2d232ef7711803801b948ce8875b79130b5b7cc.zip |
force_move: Provide defaults for SET_KINEMATIC_POSITION parameters
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/force_move.py')
-rw-r--r-- | klippy/extras/force_move.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/klippy/extras/force_move.py b/klippy/extras/force_move.py index d7d357b7..a6d7adc2 100644 --- a/klippy/extras/force_move.py +++ b/klippy/extras/force_move.py @@ -89,13 +89,13 @@ class ForceMove: self.restore_enable(stepper, True, was_ignore) cmd_SET_KINEMATIC_POSITION_help = "Force a low-level kinematic position" def cmd_SET_KINEMATIC_POSITION(self, params): - x = self.gcode.get_float('X', params) - y = self.gcode.get_float('Y', params) - z = self.gcode.get_float('Z', params) - logging.info("SET_KINEMATIC_POSITION pos=%.3f,%.3f,%.3f", x, y, z) toolhead = self.printer.lookup_object('toolhead') toolhead.get_last_move_time() curpos = toolhead.get_position() + x = self.gcode.get_float('X', params, curpos[0]) + y = self.gcode.get_float('Y', params, curpos[1]) + z = self.gcode.get_float('Z', params, curpos[2]) + logging.info("SET_KINEMATIC_POSITION pos=%.3f,%.3f,%.3f", x, y, z) toolhead.set_position([x, y, z, curpos[3]], homing_axes=(0, 1, 2)) self.gcode.reset_last_position() |