mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-23 22:54:10 -06:00
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:
parent
0216201cb6
commit
890298d34d
9 changed files with 34 additions and 29 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue