aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/safe_z_home.py
Commit message (Collapse)AuthorAgeFilesLines
* force_move: Use strings for axes to clear in clear_homing_state()Kevin O'Connor2025-01-211-1/+1
| | | | | | | Pass a string such as "xyz" to kin.clear_homing_state(). This makes the parameter a little less cryptic. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Pass set_position() homing_axes parameter as a stringKevin O'Connor2025-01-211-1/+1
| | | | | | | | Use strings such as "xyz" to specify which axes are to be considered homing during a set_position() call. This makes the parameter a little less cryptic. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* force_move: Implement CLEAR for SET_KINEMATIC_POSITION (#6262)Dennis Marttinen2025-01-101-2/+1
| | | | | | | | `CLEAR` clears the homing status (resets the axis limits) without turning off the motors. This is particularly useful when implementing safe Z homing in `[homing_override]` on printers with multiple independent Z steppers (where `FORCE_MOVE` can't be used). Signed-off-by: Dennis Marttinen <twelho@welho.tech>
* safe_z_home: Fix final z hop to use relative z coordinates (#5879)redstone992022-11-221-1/+4
| | | | | | | | | | | After a G28 z-axis homing, there is a final z hop. It was hoping to height z_hop as an absolute z height rather than relative. If the z-axis home leaves the head at a z height higher than z_hop, e.g. because you were using a probe to do z homing, this meant that it was z hopping in the negative z direction, which could result in crashing the toolhead. Signed-off-by: Joshua Redstone <redstone@gmail.com>
* safe_z_home: Use config.getfloatlist() for home_xy_position config optionKevin O'Connor2021-08-211-7/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* safe_z_home: Simplify logic and fix edge caseFlorian Heilmann2021-05-261-19/+13
| | | | Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
* homing: Make homing.py an "extras" moduleKevin O'Connor2021-01-081-1/+1
| | | | | | | 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>
* safe_z_home: Use configfile note_valid=False when inspecting z position_maxKevin O'Connor2020-12-131-5/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_move: Move GCodeMove class from gcode.py to new extras moduleKevin O'Connor2020-08-201-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Add a manual_move() helper functionKevin O'Connor2020-08-201-27/+14
| | | | | | | | 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>
* safe_z_home: Make sure X and Y are homed before homing Z (#3153)Florian Heilmann2020-08-051-3/+12
| | | | | 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>
* safe_z_home: Use new GCodeCommand wrappersKevin O'Connor2020-05-051-5/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Create new wrapper class for gcode command parametersKevin O'Connor2020-05-051-2/+4
| | | | | | | | 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>
* safe_z_home: Simplify check for axes to homeKevin O'Connor2020-04-221-5/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* safe_z_home: Support note_z_not_homed() in kinematics (#2500)David Smith2020-03-011-0/+2
| | | Signed-off-by: David Smith <davidosmith@gmail.com>
* gcode: Return previous handler from register_command(cmd, None)Kevin O'Connor2020-02-121-3/+3
| | | | | | | | 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>
* toolhead: Report which axes are homed via get_status()Kevin O'Connor2019-11-241-3/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* safe_z_home: Fix unintended change in default behaviorMaster922019-10-031-1/+1
| | | | | | 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>
* safe_z_home: Fix issue where 'home_xy_position: 0,0' did not position at 0,0Jason S. McMullan2019-10-031-4/+2
| | | | | | | | | | | 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>
* safe_z_home: Hop only if necessary and add option to move xy backMaster922019-09-181-15/+35
| | | | | | | | | | | | | | | 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>
* extra: Add Safe Z home extraFlorian Heilmann2019-08-091-0/+82
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>