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

@ -54,9 +54,8 @@ class CartKinematics:
def calc_position(self):
return [rail.get_commanded_position() for rail in self.rails]
def set_position(self, newpos, homing_axes):
for i in StepList:
rail = self.rails[i]
rail.set_position(newpos[i])
for i, rail in enumerate(self.rails):
rail.set_position(newpos)
if i in homing_axes:
self.limits[i] = rail.get_range()
def _home_axis(self, homing_state, axis, rail):