delta: Fix delta kinematics startup

Commit 1e1364c3 moved the storage of the stepper position to the
mcu_stepper class.  The initializing of that position needs to be
pushed back until after the mcu_stepper class is instantiated.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2016-11-30 21:24:03 -05:00
parent bc80ed4e88
commit 35719e665c
1 changed files with 1 additions and 1 deletions

View File

@ -28,12 +28,12 @@ class DeltaKinematics:
(cos(210.)*radius, sin(210.)*radius), (cos(210.)*radius, sin(210.)*radius),
(cos(330.)*radius, sin(330.)*radius), (cos(330.)*radius, sin(330.)*radius),
(cos(90.)*radius, sin(90.)*radius)] (cos(90.)*radius, sin(90.)*radius)]
self.set_position([0., 0., 0.])
def build_config(self): def build_config(self):
for stepper in self.steppers: for stepper in self.steppers:
stepper.set_max_jerk(0.005 * stepper.max_accel) # XXX stepper.set_max_jerk(0.005 * stepper.max_accel) # XXX
for stepper in self.steppers: for stepper in self.steppers:
stepper.build_config() stepper.build_config()
self.set_position([0., 0., 0.])
def get_max_speed(self): def get_max_speed(self):
# XXX - this returns conservative values # XXX - this returns conservative values
max_xy_speed = min(s.max_velocity for s in self.steppers) max_xy_speed = min(s.max_velocity for s in self.steppers)