mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-07 14:04:17 -06:00
gcode: Automatically call reset_last_position() on a toolhead set_position()
Generate a "toolhead:set_position" event on a call to toolhead.set_position() and use that event to automatically call gcode.reset_last_position(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
560d48dbc9
commit
4115a77342
8 changed files with 3 additions and 9 deletions
|
@ -400,6 +400,7 @@ class ToolHead:
|
|||
self.trapq_free_moves(self.trapq, self.reactor.NEVER)
|
||||
self.commanded_pos[:] = newpos
|
||||
self.kin.set_position(newpos, homing_axes)
|
||||
self.printer.send_event("toolhead:set_position")
|
||||
def move(self, newpos, speed):
|
||||
move = Move(self, self.commanded_pos, newpos, speed)
|
||||
if not move.move_d:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue