itersolve: Support setting the stepper position via a cartesian coordinate

Add support for an itersolve_set_position() function that sets a
stepper position from a cartesian coordinate.  This eliminates the
need for both the python and C code to be able to translate from a
cartesian coordinate to a stepper position.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-06-22 13:03:07 -04:00
parent 0216201cb6
commit 890298d34d
9 changed files with 34 additions and 29 deletions

View file

@ -243,9 +243,9 @@ class PrinterRail:
def set_max_jerk(self, max_halt_velocity, max_accel):
for stepper in self.steppers:
stepper.set_max_jerk(max_halt_velocity, max_accel)
def set_position(self, pos):
def set_position(self, newpos):
for stepper in self.steppers:
stepper.set_position(pos)
stepper.set_position(newpos)
def motor_enable(self, print_time, enable=0):
for stepper in self.steppers:
stepper.motor_enable(print_time, enable)