From 1b1d2adb31122648d8ba28fdbef9f4d2044cc5f5 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 29 May 2018 14:09:04 -0400 Subject: [PATCH] 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 --- klippy/gcode.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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