From 682d38f5902fa696e6b40f6068a2ed06284e9527 Mon Sep 17 00:00:00 2001 From: Andrei Ignat Date: Tue, 1 Mar 2022 05:14:25 +0100 Subject: [PATCH] delta: Multiple steppers on delta tower (#5217) Updated tower rail setup to support multiple steppers per tower. Signed-off-by: Andrei Ignat --- klippy/kinematics/delta.py | 6 +++--- klippy/stepper.py | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/klippy/kinematics/delta.py b/klippy/kinematics/delta.py index 4c5076f7..06c72456 100644 --- a/klippy/kinematics/delta.py +++ b/klippy/kinematics/delta.py @@ -13,13 +13,13 @@ class DeltaKinematics: def __init__(self, toolhead, config): # Setup tower rails stepper_configs = [config.getsection('stepper_' + a) for a in 'abc'] - rail_a = stepper.PrinterRail( + rail_a = stepper.LookupMultiRail( stepper_configs[0], need_position_minmax = False) a_endstop = rail_a.get_homing_info().position_endstop - rail_b = stepper.PrinterRail( + rail_b = stepper.LookupMultiRail( stepper_configs[1], need_position_minmax = False, default_position_endstop=a_endstop) - rail_c = stepper.PrinterRail( + rail_c = stepper.LookupMultiRail( stepper_configs[2], need_position_minmax = False, default_position_endstop=a_endstop) self.rails = [rail_a, rail_b, rail_c] diff --git a/klippy/stepper.py b/klippy/stepper.py index e009d7b6..304d7d82 100644 --- a/klippy/stepper.py +++ b/klippy/stepper.py @@ -414,8 +414,10 @@ class PrinterRail: stepper.set_position(coord) # Wrapper for dual stepper motor support -def LookupMultiRail(config): - rail = PrinterRail(config) +def LookupMultiRail(config, need_position_minmax=True, + default_position_endstop=None, units_in_radians=False): + rail = PrinterRail(config, need_position_minmax, + default_position_endstop, units_in_radians) for i in range(1, 99): if not config.has_section(config.get_name() + str(i)): break