Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firmware retraction: Fix and extend zhop feature #420

Merged
merged 4 commits into from
Dec 23, 2024

Conversation

fbeauKmi
Copy link
Contributor

@fbeauKmi fbeauKmi commented Oct 30, 2024

Reopen the pull request #211. There was to much changes from the previous PR
@pdscomp @richfelker

This PR fix issue #204.
New firmware_retraction vs old version:

  • The code use gcode_move transform instead of G0/G1 overwrites. the zhop is applied as an offset, it does not affect gcode position (solve an issue with pause/resume). It opens the code to wipes features.
  • add clear_zhop_on_z_moves parameter . Allow to clear zhop if a move in z is requested when toolhead is retracted
  • CLEAR_RETRACTION doesn't reset parameters to default. RESET_RETRACTION is added to do that.
  • add zhop_state status, independent of retract_state
  • no automatic reset of retract_state and parameters on events (home, print_start, print_end). Zhop is reset ONLY on G11/home/stepper off.

Checklist

  • pr title makes sense
  • squashed to 1 commit
  • added a test case if possible
  • if new feature, added to the readme
  • ci is happy and green

@fbeauKmi fbeauKmi requested a review from a team as a code owner October 30, 2024 22:34
@pdscomp
Copy link

pdscomp commented Dec 15, 2024

@fbeauKmi
Just wanted to report I've been running my main printer off this branch exclusively since early November, and have not noticed any buggy behavior. My settings are:

  • Firmware retraction enabled in OrcaSlicer
  • Default retraction set to 0.6 with no Z-Hop in printer.cfg
  • Each "Material settings" (filament profile) configured with some variation of the following (or commented out if no change from default):
    • Filament start G-code:
      M118 Overriding default Z-Hop, setting to 0.2
      SET_RETRACTION z_hop_height=0.2
      GET_RETRACTION
      or for PETG:
      M118 Overriding default retraction, setting to 1.2 and Z-Hop, setting to 0.4
      SET_RETRACTION retract_length=1.2 z_hop_height=0.4
      GET_RETRACTION
    • Filament end G-code:
      M118 Clearing retraction override settings, going back to Klipper defaults from config
      CLEAR_RETRACTION
      GET_RETRACTION
  • This allows me to view the settings at the start of each print and then check that they are back to default at the end of each print, and I haven't noticed any discrepancies doing spot checks on tens of prints.
  • My other use case is to use this to tweak retraction and z_hop_height during a print in order to come up with a value that minimizes stringing and improves finish quality of the layer being printed
    • I've used SET_RETRACTION and GET_RETRACTION extensively during prints to tweak both retract_length and z_hop_height during a print with no ill effects / no unintended offsets being added to the nozzle
    • Examples are increasing retract_length from 0.8 to 1.0, 1.2, 1.4, etc. and z_hop_height from off (0) to 0.2 to 0.4 to 0.8 and turning off again while observing how the printer is printing, and running GET_RETRACTION to make sure my settings were captured
  • Overall I'm extremely happy with the performance of this latest MR, and prior to this had been running off of the PR211 branch exclusively
  • The updates to documentation are clear and make sense to me!

Based on the above testing, I would heartily recommend this for merge, I don't believe this change introduces any new bugs and being able to easily tweak and reset my retraction and z_hop during a print is an EXTREMELY useful feature. I think the updates to RESET_RETRACTION vs. CLEAR_RETRACTION are also perfect for most people's use cases.

Cheers and thank you for the hard work on this!

Paul

@rogerlz rogerlz merged commit 70394db into KalicoCrew:main Dec 23, 2024
3 checks passed
@fbeauKmi fbeauKmi deleted the firmware_retract_2 branch January 3, 2025 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants