From 06b8169f56f264a9175b7790ba39cadc187ec2de Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 5 Aug 2021 23:21:31 -0400 Subject: tmc: Track offset between tmc driver and mcu position Track the offset between driver phase and mcu position. This offset should be constant as long as neither the driver nor the mcu is reset. If the offset ever changes, log a warning. Signed-off-by: Kevin O'Connor --- klippy/stepper.py | 1 + 1 file changed, 1 insertion(+) (limited to 'klippy/stepper.py') diff --git a/klippy/stepper.py b/klippy/stepper.py index 8feb72b5..bb95d4ed 100644 --- a/klippy/stepper.py +++ b/klippy/stepper.py @@ -163,6 +163,7 @@ class MCU_stepper: if ret: raise error("Internal error in stepcompress") self._set_mcu_position(last_pos) + self._mcu.get_printer().send_event("stepper:sync_mcu_position", self) def set_trapq(self, tq): ffi_main, ffi_lib = chelper.get_ffi() if tq is None: -- cgit v1.2.3-70-g09d2