stepper: Add get/set_tag_position() and convert calc_position()

Rename calc_position() to calc_tag_position() and have it calculate
the value of the position from the last stepper set_tag_position()
call.  This enables the calc_tag_position() code to be more flexible
as it can be run with arbitrary positions.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-11-13 17:59:40 -05:00
parent e0e2f15498
commit 224574da4a
11 changed files with 56 additions and 40 deletions

View file

@ -330,11 +330,12 @@ Useful steps:
seconds) to a cartesian coordinate (in millimeters), and then
calculate the desired stepper position (in millimeters) from that
cartesian coordinate.
4. Implement the `calc_position()` method in the new kinematics class.
This method calculates the position of the toolhead in cartesian
coordinates from the current position of each stepper. It does not
need to be efficient as it is typically only called during homing
and probing operations.
4. Implement the `calc_tag_position()` method in the new kinematics
class. This method calculates the position of the toolhead in
cartesian coordinates from the position of each stepper (as
returned by `stepper.get_tag_position()`). It does not need to be
efficient as it is typically only called during homing and probing
operations.
5. Other methods. Implement the `check_move()`, `get_status()`,
`get_steppers()`, `home()`, and `set_position()` methods. These
functions are typically used to provide kinematic specific