mirror of https://github.com/Desuuuu/klipper.git
delta: Multiple steppers on delta tower (#5217)
Updated tower rail setup to support multiple steppers per tower. Signed-off-by: Andrei Ignat <andrei@ignat.se>
This commit is contained in:
parent
bbd1ddadd1
commit
682d38f590
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue