diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-05-29 14:09:04 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-05-29 14:09:04 -0400 |
commit | 1b1d2adb31122648d8ba28fdbef9f4d2044cc5f5 (patch) | |
tree | 758cf6f7bcec2eafc0f1f9411506809c6b512157 | |
parent | b93fd5b1b569533d610fc684bc2a64166bad624c (diff) | |
download | kutter-1b1d2adb31122648d8ba28fdbef9f4d2044cc5f5.tar.gz kutter-1b1d2adb31122648d8ba28fdbef9f4d2044cc5f5.tar.xz kutter-1b1d2adb31122648d8ba28fdbef9f4d2044cc5f5.zip |
gcode: Apply SET_GCODE_OFFSET to next move command
Apply the changes made by a SET_GCODE_OFFSET command to the next move,
even if the move is relative to the last movement. This allows the
command to implement "babystepping" requests.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | klippy/gcode.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/klippy/gcode.py b/klippy/gcode.py index 3db0e377..5461ffc8 100644 --- a/klippy/gcode.py +++ b/klippy/gcode.py @@ -533,7 +533,9 @@ class GCodeParser: offset += self.get_float(axis + '_ADJUST', params) else: continue - self.base_position[pos] += offset - self.homing_position[pos] + delta = offset - self.homing_position[pos] + self.last_position[pos] += delta + self.base_position[pos] += delta self.homing_position[pos] = offset def cmd_M206(self, params): # Offset axes |