MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.04k stars 19.15k forks source link

[BUG] G61 does not return to saved position when Axis specified without an offset #26222

Open karcaw opened 10 months ago

karcaw commented 10 months ago

Did you test the latest bugfix-2.1.x code?

Yes, and the problem still exists.

Bug Description

When you use the G61 Return to Saved Position feature, and specify any axis to restore, and do not put a offset value, it does not return to the saved location, it does not change that axis at all. It stems from Line 89:

https://github.com/MarlinFirmware/Marlin/blob/11f98adcce51f06a85ef0dd64e6e6b16139a34bd/Marlin/src/gcode/feature/pause/G61.cpp#L87-L89

Which defaults to the current position, and not to stored_position[slot][i] as it should.

The online line documentation here: https://marlinfw.org/docs/gcode/G061.html does not even mention that offsets are an option, so anyone using this command with axis restores is bound to fail.(As I did)

Bug Timeline

In the original code of G61 (#16557)

Expected behavior

I expect it to move back to the proper position.

Actual behavior

It does not move

Steps to Reproduce

for Example if you run:

G28
G0 X10 Y10 Z10
G60
G0 X100 Y100 Z20
G61 X Y  

No movement is seen on the G61. if instead you change that to G61 X0 Y0 it will properly move back to the X10 Y10 position. a bare G61 does work properly.

Version of Marlin Firmware

Marlin 2.1.2

Printer model

Creality Ender 3 Pro

Electronics

Stock 4.2.2 Board

Add-ons

No response

Bed Leveling

UBL Bilinear mesh

Your Slicer

Prusa Slicer

Host Software

OctoPrint

Don't forget to include

Additional information & file uploads

EF8_G16Debug.zip

karcaw commented 8 months ago

yup, still valid

karcaw commented 5 months ago

yup, still valid

karcaw commented 1 month ago

still not fixed

karcaw commented 6 days ago

Any chance we can get this merged?

thisiskeithb commented 6 days ago

Any chance we can get this merged?

Since you've provided a fix, please open a proper Pull Request for review.

See Contributing Code with Pull Requests for more details.

karcaw commented 6 days ago

I made one,... Seems I pointed it at the wrong master: https://github.com/karcaw/Marlin/pull/1

karcaw commented 6 days ago

Added proper PR