aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-08-01 15:40:35 -0400
committerKevin O'Connor <kevin@koconnor.net>2018-08-02 08:58:18 -0400
commitf2d232ef7711803801b948ce8875b79130b5b7cc (patch)
tree288cf11bfd2ab0d4cf7a53bb06387f7ad2254aba
parentc5ecb37b4e71d1d5bbf6e30c84207de4c43a81e1 (diff)
downloadkutter-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>
-rw-r--r--docs/FAQ.md8
-rw-r--r--docs/G-Codes.md16
-rw-r--r--klippy/extras/force_move.py8
3 files changed, 18 insertions, 14 deletions
diff --git a/docs/FAQ.md b/docs/FAQ.md
index 8a67dcf2..b9c1cd23 100644
--- a/docs/FAQ.md
+++ b/docs/FAQ.md
@@ -157,9 +157,11 @@ the desired movement to the "custom g-code" section of your slicer.
If the printer requires some additional movement as part of the homing
process itself (or fundamentally does not have a homing process) then
-consider using a homing_override section in the config file - see
-[example-extras.cfg](../config/example-extras.cfg) for further
-details.
+consider using a homing_override section in the config file. If you
+need to move a stepper for diagnostic or debugging purposes then
+consider adding a force_move section to the config file. See
+[example-extras.cfg](../config/example-extras.cfg) for further details
+on these options.
### Why is the Z position_endstop set to 0.5 in the default configs?
diff --git a/docs/G-Codes.md b/docs/G-Codes.md
index c97e77df..8ca4440c 100644
--- a/docs/G-Codes.md
+++ b/docs/G-Codes.md
@@ -195,10 +195,12 @@ section is enabled:
low-level kinematics in an incorrect state; issue a G28 afterwards
to reset the kinematics. This command is intended for low-level
diagnostics and debugging.
-- `SET_KINEMATIC_POSITION X=<value> Y=<value> Z=<value>`: Force the
- low-level kinematic code to believe the toolhead is at the given
- position. This is a diagnostic and debugging command; use
- SET_GCODE_OFFSET and/or G92 for regular axis transformations.
- Setting an incorrect or invalid position may lead to internal
- software errors. This command may invalidate future boundary checks;
- issue a G28 afterwards to reset the kinematics.
+- `SET_KINEMATIC_POSITION [X=<value>] [Y=<value>] [Z=<value>]`: Force
+ the low-level kinematic code to believe the toolhead is at the given
+ cartesian position. This is a diagnostic and debugging command; use
+ SET_GCODE_OFFSET and/or G92 for regular axis transformations. If an
+ axis is not specified then it will default to the position that the
+ head was last commanded to. Setting an incorrect or invalid position
+ may lead to internal software errors. This command may invalidate
+ future boundary checks; issue a G28 afterwards to reset the
+ kinematics.
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()