diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-11-01 21:21:37 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-12-08 18:20:04 -0500 |
commit | f8acf0f54f4e2196b65c29cce8062380609b9b2b (patch) | |
tree | 781f0f5c36bc850e9abddc88a5048d0578a1a4e6 /klippy/delta.py | |
parent | bc5d900e612cf1de25f0b80e9bd5544f9e84576a (diff) | |
download | kutter-f8acf0f54f4e2196b65c29cce8062380609b9b2b.tar.gz kutter-f8acf0f54f4e2196b65c29cce8062380609b9b2b.tar.xz kutter-f8acf0f54f4e2196b65c29cce8062380609b9b2b.zip |
delta: Default stepper_b/c position_endstop to stepper_a's
If the position_endstop is not set for stepper_b or stepper_c then use
the value from stepper_a.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/delta.py')
-rw-r--r-- | klippy/delta.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/klippy/delta.py b/klippy/delta.py index 5900a183..e2bb971a 100644 --- a/klippy/delta.py +++ b/klippy/delta.py @@ -15,8 +15,14 @@ class DeltaKinematics: def __init__(self, toolhead, printer, config): stepper_configs = [config.getsection('stepper_' + n) for n in ['a', 'b', 'c']] - self.steppers = [stepper.PrinterHomingStepper(printer, sconfig) - for sconfig in stepper_configs] + stepper_a = stepper.PrinterHomingStepper(printer, stepper_configs[0]) + stepper_b = stepper.PrinterHomingStepper( + printer, stepper_configs[1], + default_position=stepper_a.position_endstop) + stepper_c = stepper.PrinterHomingStepper( + printer, stepper_configs[2], + default_position=stepper_a.position_endstop) + self.steppers = [stepper_a, stepper_b, stepper_c] self.need_motor_enable = self.need_home = True radius = config.getfloat('delta_radius', above=0.) arm_length_a = stepper_configs[0].getfloat('arm_length', above=radius) |