klippain icon indicating copy to clipboard operation
klippain copied to clipboard

PARK does not take Z_OFFSET into account when calculating max_z

Open GreenPlasticWaterCan opened this issue 1 year ago • 1 comments

Klippain branch

  • [X] I confirm using the main branch

Version

v4.3.1-10-g1d9a2b53

Describe the bug and expected behavior

PARK right now does not take into account a positive Z offset, potentially resulting in a move out of range. https://github.com/Frix-x/klippain/blob/1d9a2b5344e230818129f1481b1fdffc61af1257/macros/base/park.cfg#L18

Move out of range: 60.000 60.000 126.000 [0.000]

Reproducer on a V0 with 120x120x120 printbed and lift_z at > 20:

G28 G90 SET_GCODE_OFFSET Z=5 MOVE=1 G1 X60 Y60 Z100 PARK

Changed made to macro to fix:

{% set max_z = printer.toolhead.axis_maximum.z - printer.gcode_move.homing_origin.z |float %}

Thanks @reemo3dp for helping me debug and providing the fix.

Additional information and klippy.log

No response

GreenPlasticWaterCan avatar Mar 30 '24 23:03 GreenPlasticWaterCan

📌 This issue has been marked as stale because it has not had activity in the past 30 days. To keep it open, please respond to this message or add new information. Otherwise, this will be closed in 14 days. Thank you for your contributions!

github-actions[bot] avatar Apr 30 '24 07:04 github-actions[bot]

i added a PR with your fix. thanks :)

Surion79 avatar May 31 '24 10:05 Surion79

Hello, i still have thiss issue, how i can repair this?

Karolas123 avatar Jun 03 '24 08:06 Karolas123

This was merged today :)

Frix-x avatar Jun 18 '24 08:06 Frix-x