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>
If a null move is added as the first move on the trapezoid motion
queue then it could have a very large move->move_t value. This could
cause numerical stability issues with some advanced kinematic
formulas. Place a limit on the move_t value to avoid this.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This reverts commit 1b92af6078.
The standard "uc1701" lcd_type can now be used in place of the custom
"st7567" lcd_type.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
If the queuelogger was holding the lock when the process is forked
then any attempt to log from the background process would result in a
deadlock. Attempt a workaround by disabling the queuelogger at the
start of the background process.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Provide a list of available heater and sensor names to
gcode macro templates through the printer.heater.available_heaters
and printer.heater.available_sensors variables
Signed-off-by: Simon Kühling <mail@simonkuehling.de>
The builtin Tn command is not sufficiently flexible to control some
multi-extruder printers. Remove the command and encourage users to
define individual gcode_macros for each Tn instance.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The M206 command isn't particularly standardized and isn't issued by
default from 3rd party software in their standard configurations.
Encourage users to use the more powerful SET_GCODE_OFFSET command.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Implement the pressure advance calculations while performing the
definitive integral calculations. This simplifies both the
extruder.py and kin_extruder.c code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The probe object may not have be instantiated when the
screws_tilt_adjust object is instantiated. Just remove the check.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The S parameter is not a standard and was not commonly used. The P
parameter (delay specified in milliseconds) is the commonly accepted
g-code mechanism for dwelling.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add support for an optional uc1701 rst_pin. Use the same reset pin
code handling with the SSD1306 code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
There is concern that some lcd boards that emulate the hd44780 don't
support text updates that wrap the two text framebuffers. Update the
code to treat the two text areas as two separate framebuffers.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Large increases in fan speed can suffer from acceleration lag, so this
change kick starts the fan for a change of 50% or more in the same way
that starting the fan from 0% does.
Signed-off-by: Justin Schuh <code@justinschuh.com>
If an M25 is in a gcode file that is being printed from virtual SD, it
would cause a permanent hang. Detect that case and don't wait for
those M25 commands.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Now that the extruder lookahead method is no longer used it can be
removed from the toolhead and extruder classes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Support averaging the extruder position over a time range to "smooth
out" the velocity changes that occur during pressure advance.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Support calculating the definitive integral of a cartesian axis
position over a time range of the movement queue.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add support for kinematic functions that calculate step times based on
a range of the motion queue. This requires adding additional pause
times when fully flushing the motion queue.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add support for generating steps from kinematic functions that
calculate step times based on a range of the motion queue. It
requires scanning for step generation during the lead up to stepper
activity (when the stepper would nominally be idle). And it requires
scanning for step generation just after a stepper has nominally become
idle.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Use sentinels to make list traversal code simpler. Also add in null
moves so that there are no time gaps in the list.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Update code that modifies the low-level kinematics handlers to first
call toolhead.flush_step_generation().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Don't transition to the normal movement state if there aren't any
moves actually ready to be processed.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Now that the only caller to set_commanded_position() is
set_position(), remove the set_commanded_position() method and pass
the set_position() call directly to the itersolve.c code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Now that the homing code does not call set_commanded_position(), it is
no longer necessary to save/restore the position in the bltouch code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Now that the homing code does not use get_commanded_position(), it is
no longer necessary to alter the low-level commanded position after a
homing move.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
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>