jschuh / klipper-macros

A collection of useful macros for the Klipper 3D printer firmware
GNU General Public License v3.0
921 stars 167 forks source link

Added ending z variable in globals and added it's functionality to #120

Closed LifeSizeDeity closed 1 year ago

LifeSizeDeity commented 1 year ago

Print End.

Also move nozzle to starting purge location before heating so filament doesn't drip.

The nozzle drip change probably doesn't need to be added but the z variable seemed like low hanging fruit.

jschuh commented 1 year ago

Thanks for the interest, but the PR has some issues, and beyond that I don't think these changes would be a good fit.

Regarding the extruder changes, it would break the macros for anyone who doesn't have the automatic purge line configured, because there's no guarantee the extruder would be at temp otherwise. Also it's generally a bad idea to preheat the extruder so close to the bed, because the bed heater throws off Klipper's PID algorithm, which can trigger an emergency shutdown. That's why the extruder is usually parked a safe distance from the bed until it reaches target temp.

Regarding start_end_park_y, that's a special case to handle the fact that normally the Y axis is parked in the opposite location at the end of the print, so it's easier to remove the part. The Z and X don't need that special handling, because the X doesn't change and by default the Z is relative to the last extruder position (so the normal park_x and park_z options work fine).

More generally, I wouldn't accept a PR that changes multiple unrelated things at once. If the changes are not related (as here) then they would be different PRs. If the changes are logically distinct but dependent on each other, then they can be done as separate commits in the same PR.