diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2021-08-06 09:56:06 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2021-08-06 11:19:36 -0400 |
commit | b17ec3d2e9d0afb96351a6ed26fba958584899ac (patch) | |
tree | 8b4ff3409373ecb5ebeb3b7fead0a3b4949efc4a /klippy/stepper.py | |
parent | 3176150050b666a582ac0993dc14e6663133ecb9 (diff) | |
download | kutter-b17ec3d2e9d0afb96351a6ed26fba958584899ac.tar.gz kutter-b17ec3d2e9d0afb96351a6ed26fba958584899ac.tar.xz kutter-b17ec3d2e9d0afb96351a6ed26fba958584899ac.zip |
stepcompress: Pass clock to stepcompress_set_last_position()
Using sc->last_step_clock for the last position marker does not work
properly, because the stepper.py code calls stepcompress_reset() prior
to calling stepcompress_set_last_position(). Fix by passing an
explicit clock to stepcompress_set_last_position().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/stepper.py')
-rw-r--r-- | klippy/stepper.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/klippy/stepper.py b/klippy/stepper.py index b92c78ce..ca7df28f 100644 --- a/klippy/stepper.py +++ b/klippy/stepper.py @@ -151,7 +151,10 @@ class MCU_stepper: last_pos = params['pos'] if self._invert_dir: last_pos = -last_pos - ret = ffi_lib.stepcompress_set_last_position(self._stepqueue, last_pos) + print_time = self._mcu.estimated_print_time(params['#receive_time']) + clock = self._mcu.print_time_to_clock(print_time) + ret = ffi_lib.stepcompress_set_last_position(self._stepqueue, clock, + last_pos) if ret: raise error("Internal error in stepcompress") self._set_mcu_position(last_pos) |