moggieuk / Happy-Hare

MMU software driver for Klipper (ERCF, Tradrack, Prusa)
GNU General Public License v3.0
395 stars 94 forks source link

Fix resume after pause during toolchange #293

Open bakatrouble opened 1 month ago

bakatrouble commented 1 month ago

My use case: I've installed Blobifier, so if an error happens during toolchange, klipper saves pause position at the Blobifier position, right on the tray. I do not want the print to continue from that position, so I call _MMU_SAVE_POSITION in my PAUSE macro and then restore the saved position in the RESUME macro. Before this change, I had nozzle dragging across both printed parts and the tray edge back to the saved position on the Blobifier tray.

Now the position at which was the toolchange initiated is set as the return position used by klipper's resume logic: https://github.com/Klipper3d/klipper/blob/master/klippy/extras/pause_resume.py#L83

Took me a while to debug and figure out where that return to a position was exactly happening

bakatrouble commented 1 month ago

Just noticed that perhaps restore_xy_pos should be respected here?

moggieuk commented 1 month ago

Thanks! I need to think about all the possible corner cases for this carefully. I've been busy the past couple of weeks but have some time in the next few days...

moggieuk commented 1 month ago

This is still on my list of things to review... soon ;-)

leweljun commented 2 weeks ago

I have the same issue and was fixed by this PR I merged this change with v2.5.2-33-gecb57559 and completed a 49hrs print, too bad I don't have logs.