delta: Fix support for different endstop_position settings on each stepper
The endstop_position is intended to support different values for each stepper so that the individual tower heights can be configured. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
959509496a
commit
156de2e4c2
|
@ -24,7 +24,7 @@ class DeltaKinematics:
|
|||
self.arm_length2 = arm_length**2
|
||||
self.limit_xy2 = -1.
|
||||
tower_height_at_zeros = math.sqrt(self.arm_length2 - radius**2)
|
||||
self.max_z = max([s.position_endstop for s in self.steppers])
|
||||
self.max_z = min([s.position_endstop for s in self.steppers])
|
||||
self.limit_z = self.max_z - (arm_length - tower_height_at_zeros)
|
||||
logging.info(
|
||||
"Delta max build height %.2fmm (radius tapered above %.2fmm)" % (
|
||||
|
@ -119,9 +119,11 @@ class DeltaKinematics:
|
|||
homing_state.home(list(coord), homepos, self.steppers
|
||||
, s.homing_speed/2.0, second_home=True)
|
||||
# Set final homed position
|
||||
coord = [s.mcu_stepper.get_commanded_position() + s.get_homed_offset()
|
||||
for s in self.steppers]
|
||||
homing_state.set_homed_position(self._actuator_to_cartesian(coord))
|
||||
spos = self._cartesian_to_actuator(homepos)
|
||||
spos = [spos[i] + self.steppers[i].position_endstop - self.max_z
|
||||
+ self.steppers[i].get_homed_offset()
|
||||
for i in StepList]
|
||||
homing_state.set_homed_position(self._actuator_to_cartesian(spos))
|
||||
def motor_off(self, move_time):
|
||||
self.limit_xy2 = -1.
|
||||
for stepper in self.steppers:
|
||||
|
|
Loading…
Reference in New Issue