mirror of
https://github.com/Klipper3d/klipper.git
synced 2026-05-06 15:56:49 +02:00
gcode_move: Fix M114 when extra axes are defined
Commit d40fd219 added support for defining extra axes, however that
change could break the M114 command. Update the code to fix M114.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -92,7 +92,7 @@ class GCodeMove:
|
||||
def _get_gcode_position(self):
|
||||
p = [lp - bp for lp, bp in zip(self.last_position, self.base_position)]
|
||||
p[3] /= self.extrude_factor
|
||||
return p
|
||||
return p[:4]
|
||||
def _get_gcode_speed(self):
|
||||
return self.speed / self.speed_factor
|
||||
def _get_gcode_speed_override(self):
|
||||
@@ -107,7 +107,7 @@ class GCodeMove:
|
||||
'absolute_extrude': self.absolute_extrude,
|
||||
'homing_origin': self.Coord(*self.homing_position[:4]),
|
||||
'position': self.Coord(*self.last_position[:4]),
|
||||
'gcode_position': self.Coord(*move_position[:4]),
|
||||
'gcode_position': self.Coord(*move_position),
|
||||
}
|
||||
def reset_last_position(self):
|
||||
if self.is_printer_ready:
|
||||
|
||||
@@ -33,6 +33,10 @@ G28
|
||||
G1 X20 Y20 Z10
|
||||
G1 A10 X22
|
||||
|
||||
# Verify position query commands work with extra axis
|
||||
GET_POSITION
|
||||
M114
|
||||
|
||||
# Test unregistering
|
||||
MANUAL_STEPPER STEPPER=basic_stepper GCODE_AXIS=
|
||||
G1 X15
|
||||
|
||||
Reference in New Issue
Block a user