diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2021-07-31 20:23:48 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2021-08-22 11:10:19 -0400 |
commit | 809f1ccea691bd9c2242808b6bbb41d2404d699f (patch) | |
tree | 4d4d53e2fc4c2f2d749c5bdb34cc6ac3e338c689 /klippy/stepper.py | |
parent | f2d10b5729754884c1d108670798cd4c4e551d4f (diff) | |
download | kutter-809f1ccea691bd9c2242808b6bbb41d2404d699f.tar.gz kutter-809f1ccea691bd9c2242808b6bbb41d2404d699f.tar.xz kutter-809f1ccea691bd9c2242808b6bbb41d2404d699f.zip |
stepper: Add mcu_to_commanded_position() method
Convert stepper.get_past_commanded_position() to the more general
stepper.mcu_to_commanded_position().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/stepper.py')
-rw-r--r-- | klippy/stepper.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/klippy/stepper.py b/klippy/stepper.py index 0e415bad..1d1b6adb 100644 --- a/klippy/stepper.py +++ b/klippy/stepper.py @@ -119,8 +119,7 @@ class MCU_stepper: ffi_main, ffi_lib = chelper.get_ffi() pos = ffi_lib.stepcompress_find_past_position(self._stepqueue, clock) return int(pos) - def get_past_commanded_position(self, print_time): - mcu_pos = self.get_past_mcu_position(print_time) + def mcu_to_commanded_position(self, mcu_pos): return mcu_pos * self._step_dist - self._mcu_position_offset def dump_steps(self, count, start_clock, end_clock): ffi_main, ffi_lib = chelper.get_ffi() |