Don't use step_dist for the "distance along the line of movement per
step" as it's too similar to the stepper.step_dist variable. Use the
name "move_step_d" instead.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Store the start position (in addition to the existing end position) in
the Move class. The start position can be useful to the kinematic
classes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Rename get_homed_position() to get_homed_offset() and return the
endstop position delta in steps instead of an absolute position
relative to position_endstop. The conversion to absolute positions
can be dependent on the type of kinematics in use, so is inappropriate
to do in the low level stepper.py code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Introduce a check_move() method in the extruder and cartesian
kinematic classes. This allows the lower level classes to verify the
contents of the move prior to queing that move.
The speed and acceleration handling for special Z and extrude only
moves are also moved from the generic toolhead class to the low-level
classes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add support for enhancing the precision of endstop switches by also
inspecting the phase of the stepper motor when the endstop triggers.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Rework the code so that the kinematic class (currently just
cartesian.py) has more control over the homing process.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Allow the owner of the stepper object to cacluate the maximum step
jerk velocity. This is used to ensure there is no communication error
between mcu and host.
Disable checking of jerk velocity for extruder stepper motors.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Create a new python file (extruder.py) to control the extruder heater
and stepper motors. This separates the extruder control logic from
the cartesian robot code - making it easier to customize both the
kinematic control of the robot as well as the extruder.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
All users of max_step_velocity and max_step_accel end up multiplying
by step_dist anyway, so it's easier to store max_velocity and
max_accel.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Separate out the low-level stepper motor kinematics handling from the
ToolHead class into its own class.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Perform all acceleration calculations and lookahead checks in
millimeters using the cartesian coordinate system of the request. The
conversion to step coordinates is now done at the time of the step
timing creation.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>