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>
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>
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>
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>
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>
Now that the tmc drivers perform automatic soft stepper enabling,
there is no need to be able to list multiple pins in the enable_pin
config setting.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Automatically detect if the stepper has a dedicated enable line. If
it does not, then automatically enable virtual enable support.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Now that the PrinterStepper and MCU_stepper classes have been merged,
there is no need for the add_to_endstop() method.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move the enable line tracking out of the main stepper.py code. This
simplifies the main kinematic code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
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>
No longer allow the primary extruder to be named "extruder0". This
avoids internal and external confusion between the printer objects and
config section names.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Calculate the ratio of axis distance to total move distance (axis_d /
move_d) and store in a new member variable axes_r. This avoids
needing to recalculate the value in other code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Now that all callers use the trapq system to queue moves, it is no
longer necessary to individually allocate and fill a 'struct move'.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Wait in the M25 command handler until the work_handler() background
timer fully exits. This ensures that subsequent g-code commands (such
as M27 or M24) will correctly report a paused state.
Reported by @foosel.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Some print start scripts may extrude at a position slightly higher
than the first z layer height. Tweak the backwards z test to reduce
the chance of the tuning test ending prematurely.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
PR #1970 introduced a new parameter, controlling the default behavior of the safe_z_home-module. To avoid unexpected changes, the default of the move_to_previous is now defaulted to False.
Signed-off-by: Nils Friedchen <Nils.Friedchen@googlemail.com>
If '[stepper_x]' and/or '[stepper_y]' have a 'position_min' that is
non-zero, and '[safe_z_home] home_xy_position' is '0,0'; then the 'G28'
command will _not_ move to '0,0'; but stay at 'position_min' during the
Z endstop test.
This fix corrects this issue.
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Below off_below the fan will be turned off. When configured correctly this
can prevent stalling, which may lead to overheating and failed fans. To
simplify calibration and use of this setting, off_below is applied in the
input duty cycle domain, prior to any scaling due to e.g. max_power.
Signed-off-by: Nicholas Seckar <nseckar@gmail.com>
Once a hop is performed, it will only be re-issued if the z-axis has been
moved in the meantime. Usually it is only moved by a z-homing so doing so
will cause safe_z_home to do the hop on the next homing action.
When z-axis is homed, x and y positions are known. When setting this
boolean option, these are set back to their last positions.
Whenever a hop is specified it is re-issued after the Z axis has been
homed. This is especially necessary when a pressure-based probe is used.
Also, the module decides if a hop is necessary, based on either a known
Z position or a flag that is set whenever the motors are disabled.
Signed-off-by: Nils Friedchen <Nils.Friedchen@googlemail.com>