mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-07 23:17:37 -06:00
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>
This commit is contained in:
parent
1dc2ab048f
commit
3814a13251
3 changed files with 62 additions and 20 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue