Collapse the "homing:move_begin", "homing:move_end", home_prepare(),
and home_finalize() into two new events: "homing:homing_move_begin"
and "homing:homing_move_end". This simplifies the homing code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
When overriding a g-code command, allow the caller to obtain the
previous command handler. Use this feature in homing_override and
safe_z_home.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Don't obtain the step_distance from the config, instead obtain
step_distance from the instantiated stepper object.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Don't obtain the step_distance from the config, instead obtain
step_distance from the instantiated stepper object.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
In the rare case where the step generation code finds an interval of
zero, it was possible for an integer division of a negative number to
cause an incorrect result. Fix that by using the idiv_up() and
idiv_down() helpers.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
There have been several reports that increasing the delay from 37us to
40us eliminates screen corruption on some clone hd44780 displays.
Increase the timeout value so that the standard code works on these
displays.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
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>
Move interpolation checks to _init_mesh_params() so they can be done whle the config is being parsed. Do not allow a probe_count higher than 6 for lagrange interpolation, as this typically leads to oscillation.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Don't force probing when BED_MESH_MAP is executed, output the existing mesh. If the user wants to probe each time before a map they can do so with a gcode_macro.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Renamed some variables in set_mesh() previous called "mesh_min" and "mesh_max" to alleviate confusion with the config options.
Renamed several attributes for clarity. The "calibrate" attribute is now bmc, "probe_params" is now "mesh_params", "probed_z_table" is now "probed_matrix", "mesh_z_table" is now "mesh_matrix".
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Points are now logged after the printer is ready. The formatting is improved, printing out the point index, and its corresponding automatic and manual points.
BED_MESH_OUTPUT now includes a PGP parameter, if PGP=1 the generated points are printed to the terminal.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Rename min_point, max_point, and bed_radius to mesh_min, mesh_max, and mesh_radius respectively. Add "mesh_origin" option, that allows round beds to specificy the center of the mesh.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Fix typo that resulted in _get_extended_params() being called for all
commands. Allow "extended" g-code commands to contain numbers.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Some kinematics do not result in a constant step rate during homing
operations. Calculate the endstop checking rate using the total
distance traveled on the axis divided by the axis step distance.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The STEPPER_BUZZ command needs to know if the axis is using radians
instead of millimeters so that it can move a more appropriate
distance.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add a mechanism for obtaining the print_time via a callback instead of
by flushing the look-ahead queue.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The print_time parameter of heater.set_temp() is not currently used
and it isn't necessary to flush the look-ahead queue just get the
print_time. Remove the parameter from heater.set_temp() to avoid
flushing the look-ahead queue.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>