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

[BUG] G28 documentation does not explain L parameter #22126

Closed
dwery opened this issue Jun 12, 2021 · 5 comments
Closed

[BUG] G28 documentation does not explain L parameter #22126

dwery opened this issue Jun 12, 2021 · 5 comments

Comments

@dwery
Copy link

dwery commented Jun 12, 2021

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

Yes, and the problem still exists.

Bug Description

With bed leveling enabled, G28 has an additional L parameter that's not explained in the docs.

Bug Timeline

No response

Expected behavior

No response

Actual behavior

No response

Steps to Reproduce

No response

Version of Marlin Firmware

n/a

Printer model

No response

Electronics

No response

Add-ons

No response

Your Slicer

No response

Host Software

No response

Additional information & file uploads

No response

@Roxy-3D
Copy link
Member

Roxy-3D commented Jun 14, 2021

Incidentally, for anybody wondering.... The 'L' option disables the Bed Leveling matrix prior to homing the extruder.

// Disable the leveling matrix before homing
#if HAS_LEVELING
const bool leveling_restore_state = parser.boolval('L', TERN(RESTORE_LEVELING_AFTER_G28, planner.leveling_active, ENABLED(ENABLE_LEVELING_AFTER_G28)));
IF_ENABLED(PROBE_MANUALLY, g29_in_progress = false); // Cancel the active G29 session
set_bed_leveling_enabled(false);
#endif

@dwery
Copy link
Author

dwery commented Jun 15, 2021

Uhm, it looks more like it’s handling the restoring of the previous state

@slowbro
Copy link
Member

slowbro commented Jun 16, 2021

In bugfix-2.0.x, it looks like this:

  // Disable the leveling matrix before homing
  #if CAN_SET_LEVELING_AFTER_G28
    const bool leveling_restore_state = parser.boolval('L', TERN1(RESTORE_LEVELING_AFTER_G28, planner.leveling_active));
  #endif

// ... skip a bunch of lines ...

  TERN_(CAN_SET_LEVELING_AFTER_G28, if (leveling_restore_state) set_bed_leveling_enabled());                                                                                                                                                   

So, it's controlling if the leveling should be restored after homing. The default is yes, and it will return to whatever the state is (parser.leveling_active). If you supply L0 it will not restore the leveling state (but will still diable it before homing).

@slowbro
Copy link
Member

slowbro commented Jun 19, 2021

Documentation merged, this can be closed.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants