Commit Graph

36 Commits

Author SHA1 Message Date
Kevin O'Connor d7b04aa18f delta: Make the 'arm_length' description more clear in save_state()
Reported by @conlank.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-02 11:46:33 -04:00
Kevin O'Connor c0d860487a stepper: Remove set_tag_position() code
Have callers store the stepper positions in a dict.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-05-29 21:54:34 -04:00
Kevin O'Connor 5a5ecd88e2 stepper: Do not set min_stop_interval in micro-controller
The min_stop_interval safety check is fragile and leads to a notable
amount of complexity.  Avoid these issues by not programming this
safety check.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-30 11:09:08 -04:00
Kevin O'Connor c8434ec54b kinematics: Calculate axis_minimum/axis_maximum in advance
Calculate the get_status() axis_minimum and axis_maximum fields in
advance so that they don't need to be calculated on each get_status()
call.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-01-08 11:52:28 -05:00
Janar Sööt e68cf08d15 kinematics: report all axis limits (min/max)
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2020-12-28 10:19:57 -05:00
Kevin O'Connor f6dd97b784 homing: Remove EndstopError
There's no reason to distinguish between an EndstopError and a
CommandError, so just use CommandError.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-04 11:41:57 -04:00
Kevin O'Connor 1f3a160f47 toolhead: Add a move.move_error() helper
Move the EndstopMoveError() code from homing.py to a new method in the
toolhead Move class.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-03 16:22:54 -04:00
Kevin O'Connor 2ea3631222 delta: Add print_radius option to customize valid XY radius
Add ability to override the default XY move checking radius.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 21:14:09 -05:00
Kevin O'Connor 8ed0f7c5c3 kinematics: Remove support for identifying Z steppers
The caller can now determine which steppers are connected to cartesian
Z movement via the new stepper.is_active_axis() method.  It is
therefore no longer necessary for the kinematic code to identify these
steppers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 20:47:01 -05:00
Kevin O'Connor bcf10aa990 delta: Simplify DeltaCalibration state tracking
Limit the use of coordinate descent "params".

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-06 11:41:09 -05:00
Kevin O'Connor 27e6b533bc delta: Move low-level delta calibration to delta.py
Move the linear delta specific calibration code from
delta_calibrate.py to delta.py.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-06 11:41:09 -05:00
Kevin O'Connor 3683273936 toolhead: Report which axes are homed via get_status()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-24 20:21:13 -05:00
Kevin O'Connor 224574da4a 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>
2019-11-13 19:00:17 -05:00
Kevin O'Connor bfb34e0701 stepper_enable: Move motor_off() logic to stepper_enable.py
Directly disable all the stepper motors on a global motor_off() from
the StepperEnable() class in stepper_enable.py.  This simplifies the
toolhead and kinematic classes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-12 17:32:18 -05:00
Kevin O'Connor 5500538fc5 toolhead: Rename register_move_handler() to register_step_generator()
Rename the function so it is more clear what the step generation code
path is.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-07 10:59:35 -05:00
Kevin O'Connor befd263260 toolhead: Remove kinematic move() call
Now that all kinematics use the trapq system, there is no need to call
into the kinematics on each g-code move.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor 351b565728 delta: Convert step generation to use trapq system
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Florian Heilmann f958542ebb kinematics: Add get_status() method to kinematics
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2019-08-09 20:49:17 -04:00
Kevin O'Connor dd34768e3a homing: Remove no longer needed homing time delay code
Now that homing is implemented via "drip moves", it is no longer
necessary to round the homing speed and it is no longer necessary to
add a delay for cpu processing time.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-10 10:43:20 -04:00
Kevin O'Connor c3f916c60e delta: Make sure to clear limit_xy2 after a homing move
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-27 11:54:17 -04:00
Kevin O'Connor 936a4acd0d delta: Make sure to also exempt the homing retract move from boundary checks
Commit 459e5219 added a special case to the boundary checks to permit
homing moves.  In some cases, the second home retract could also be
outside the normal boundary checks - extend the special case to also
permit that move.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-27 11:43:24 -04:00
Kevin O'Connor d32506bd2e homing: Move homing offset adjustment logic to generic homing code
Move the "stepper phase" adjustment logic from the kinematic classes
to the generic homing.py code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-10 14:30:09 -04:00
Kevin O'Connor 459e521991 delta: Add a special case to the limit checks for the homing position
When a delta printer has different arm lengths or different endstop
positions then the homing position falls outside of the normal
printable area.  Add a special check to the range checking code to
permit this move instead of homing to a position near the actual
homing position.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-10 12:18:22 -04:00
Kevin O'Connor bd1ba86839 delta: Reorganize init()
Just code movement.  Move boundary check init to after tower init.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-10 12:18:22 -04:00
Kevin O'Connor d4bf51231a homing: Implement second home from homing.py
Move the logic for performing the second home from the kinematics
classes to the generic homing code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-10 12:14:27 -04:00
Kevin O'Connor 3db483e270 delta: Wrap lines to 80 columns
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-10 12:14:27 -04:00
Kevin O'Connor f7a7223b30 cartesian: Use homing_speed for homing retract speed
Commit b0d859f2 introduced a second_homing_speed parameter, and it
also changed the retract speed.  Revert the retract speed change (use
homing_speed when the head retracts).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-09 11:17:39 -04:00
Chris Whiteford b0d859f220 stepper: Adding support for a second_homing_speed parameter (#677)
Signed-off-by: Chris Whiteford <chris@chrisandtennille.com>
2018-10-04 18:55:58 -04:00
Kevin O'Connor ed0882dc10 delta: Move "stable position" logic to delta_calibrate.py
Move the "stable position" logic from the delta.py kinematics code to
the delta_calibrate.py calibration code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 13:48:46 -04:00
Kevin O'Connor 390d549c0c delta: Fix maximum halt velocity calculation
If an arm is nearly parallel to the bed then that tower's carriage may
have a velocity up to 3 times greater than the toolhead's maximum
velocity (relative to the print).  Take that into account when
calculating the stepper's maximum halt velocity.

This fixes some rare "No next step" shutdowns on delta printers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-12 22:29:18 -04:00
Kevin O'Connor ca505bf4ac kinematics: Convert get_rails() method to get_steppers()
All callers of get_rails() actually just want the steppers, so return
them directly.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-16 10:16:16 -04:00
Kevin O'Connor 28fa954487 delta: Store stable positions as integers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-15 22:05:13 -04:00
Kevin O'Connor ce0f4fe038 delta: Minor change to get_position_from_stable()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-14 11:55:15 -04:00
Kevin O'Connor a31c31aed4 mcu: Enhance itersolve stepper kinematics allocation
Allocate the stepper_kinematics directly in mcu.py - that way the
kinematic classes don't have to interact with the chelper code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-13 11:37:36 -04:00
Kevin O'Connor b988596519 toolhead: Fill cmove in toolhead instead of in each kinematic class
This simplifies the kinematic classes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-13 11:37:20 -04:00
Kevin O'Connor 8faab46ed2 toolhead: Move kinematic modules to new kinematics/ directory
Move extruder.py, cartesian.py, corexy.py, and delta.py to a new
kinematics/ sub-directory.  This is intended to make adding new
kinematics a little easier.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-12 22:50:25 -04:00