gcode: Use reset_last_position() from cmd_G28()
Use the existing reset_last_position() code in cmd_G28() instead of manually implementing the logic. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
f8bb383e9a
commit
1d11c4e74d
|
@ -377,10 +377,9 @@ class GCodeParser:
|
|||
homing_state.home_axes(axes)
|
||||
except homing.EndstopError as e:
|
||||
raise error(str(e))
|
||||
newpos = self.toolhead.get_position()
|
||||
for axis in homing_state.get_axes():
|
||||
self.last_position[axis] = newpos[axis]
|
||||
self.base_position[axis] = -self.homing_add[axis]
|
||||
self.reset_last_position()
|
||||
cmd_M18_aliases = ["M84"]
|
||||
def cmd_M18(self, params):
|
||||
# Turn off motors
|
||||
|
|
Loading…
Reference in New Issue