trapq: Store toolhead.set_position() updates in trapq history

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-07-23 12:46:14 -04:00
parent 45c232b2c7
commit 07f0ecb4d0
4 changed files with 24 additions and 1 deletions

View file

@ -401,7 +401,9 @@ class ToolHead:
return list(self.commanded_pos)
def set_position(self, newpos, homing_axes=()):
self.flush_step_generation()
self.trapq_finalize_moves(self.trapq, self.reactor.NEVER)
ffi_main, ffi_lib = chelper.get_ffi()
ffi_lib.trapq_set_position(self.trapq, self.print_time,
newpos[0], newpos[1], newpos[2])
self.commanded_pos[:] = newpos
self.kin.set_position(newpos, homing_axes)
self.printer.send_event("toolhead:set_position")