diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2021-04-05 10:59:47 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2021-08-17 22:35:59 -0400 |
commit | 3814a13251aeca044f6dbbccda706263040e1bec (patch) | |
tree | 61c7ac2282ac06b19fc7c53925db4bbe7f572624 /klippy/stepper.py | |
parent | 1dc2ab048f7ec681ab1dfdd394660c45f6ff4cd9 (diff) | |
download | kutter-3814a13251aeca044f6dbbccda706263040e1bec.tar.gz kutter-3814a13251aeca044f6dbbccda706263040e1bec.tar.xz kutter-3814a13251aeca044f6dbbccda706263040e1bec.zip |
homing: Calculate homing position based on trigger time
Calculate the "homing position" using the endstop trigger time instead
of the position of the steppers.
This is in preparation for multi-mcu homing.
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, 2 insertions, 1 deletions
diff --git a/klippy/stepper.py b/klippy/stepper.py index bb95d4ed..f386f5b8 100644 --- a/klippy/stepper.py +++ b/klippy/stepper.py @@ -117,7 +117,8 @@ class MCU_stepper: def get_past_mcu_position(self, print_time): clock = self._mcu.print_time_to_clock(print_time) ffi_main, ffi_lib = chelper.get_ffi() - return ffi_lib.stepcompress_find_past_position(self._stepqueue, clock) + 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) return mcu_pos * self._step_dist - self._mcu_position_offset |