mirror of
https://github.com/andreili/klipper.git
synced 2025-09-14 17:31:12 +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:
parent
3aadda6fb3
commit
179a56ce92
@ -92,7 +92,7 @@ class GCodeMove:
|
|||||||
def _get_gcode_position(self):
|
def _get_gcode_position(self):
|
||||||
p = [lp - bp for lp, bp in zip(self.last_position, self.base_position)]
|
p = [lp - bp for lp, bp in zip(self.last_position, self.base_position)]
|
||||||
p[3] /= self.extrude_factor
|
p[3] /= self.extrude_factor
|
||||||
return p
|
return p[:4]
|
||||||
def _get_gcode_speed(self):
|
def _get_gcode_speed(self):
|
||||||
return self.speed / self.speed_factor
|
return self.speed / self.speed_factor
|
||||||
def _get_gcode_speed_override(self):
|
def _get_gcode_speed_override(self):
|
||||||
@ -107,7 +107,7 @@ class GCodeMove:
|
|||||||
'absolute_extrude': self.absolute_extrude,
|
'absolute_extrude': self.absolute_extrude,
|
||||||
'homing_origin': self.Coord(*self.homing_position[:4]),
|
'homing_origin': self.Coord(*self.homing_position[:4]),
|
||||||
'position': self.Coord(*self.last_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):
|
def reset_last_position(self):
|
||||||
if self.is_printer_ready:
|
if self.is_printer_ready:
|
||||||
|
@ -33,6 +33,10 @@ G28
|
|||||||
G1 X20 Y20 Z10
|
G1 X20 Y20 Z10
|
||||||
G1 A10 X22
|
G1 A10 X22
|
||||||
|
|
||||||
|
# Verify position query commands work with extra axis
|
||||||
|
GET_POSITION
|
||||||
|
M114
|
||||||
|
|
||||||
# Test unregistering
|
# Test unregistering
|
||||||
MANUAL_STEPPER STEPPER=basic_stepper GCODE_AXIS=
|
MANUAL_STEPPER STEPPER=basic_stepper GCODE_AXIS=
|
||||||
G1 X15
|
G1 X15
|
||||||
|
Loading…
x
Reference in New Issue
Block a user