Commit Graph

17 Commits

Author SHA1 Message Date
Kevin O'Connor d0e4b03739 safe_z_home: Use config.getfloatlist() for home_xy_position config option
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-21 18:08:11 -04:00
Florian Heilmann cf61ca301b safe_z_home: Simplify logic and fix edge case
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2021-05-26 12:57:31 -04:00
Kevin O'Connor 8260a3a0c3 homing: Make homing.py an "extras" module
Move klippy/homing.py to klippy/extras/homing.py and convert the code
to an "extras" modules.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-01-08 14:01:34 -05:00
Kevin O'Connor 14fd40e3f9 safe_z_home: Use configfile note_valid=False when inspecting z position_max
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-12-13 10:42:25 -05:00
Kevin O'Connor 1286d3006c gcode_move: Move GCodeMove class from gcode.py to new extras module
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor 2caaaea9a4 toolhead: Add a manual_move() helper function
Add a helper function for submitting relative movements.  This
function will also automatically ensure gcode.reset_last_position() is
called.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Florian Heilmann 10987003b0
safe_z_home: Make sure X and Y are homed before homing Z (#3153)
In it's current behavior, safe_z_home will attempt to home Z if it thinks the toolhead is above the z endstop even if the motors have since been disabled and the toolhead was moved to another position

Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2020-08-05 11:52:23 -04:00
Kevin O'Connor 12b20c6e77 safe_z_home: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor ddb8311890 gcode: Create new wrapper class for gcode command parameters
Instead of passing a dictionary to the command handlers, create a
wrapper class and pass that class to the command handlers.  This can
simplify the command handler code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor 120331f49a safe_z_home: Simplify check for axes to home
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-22 11:55:25 -04:00
David Smith c0f72a2c38
safe_z_home: Support note_z_not_homed() in kinematics (#2500)
Signed-off-by: David Smith <davidosmith@gmail.com>
2020-03-01 23:00:41 -05:00
Kevin O'Connor 0cfab84e1a gcode: Return previous handler from register_command(cmd, None)
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>
2020-02-12 20:19:18 -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
Master92 2b553a8108 safe_z_home: Fix unintended change in default behavior
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>
2019-10-03 18:06:08 -04:00
Jason S. McMullan 7605244fa0 safe_z_home: Fix issue where 'home_xy_position: 0,0' did not position at 0,0
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>
2019-10-03 18:05:21 -04:00
Master92 3a37d4a208 safe_z_home: Hop only if necessary and add option to move xy back
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>
2019-09-18 09:37:33 -04:00
Florian Heilmann 3d38211b8a extra: Add Safe Z home extra
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2019-08-09 20:49:17 -04:00