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

Change G27 to allow Z raise if homing needed #26789

Open
wants to merge 36 commits into
base: bugfix-2.1.x
Choose a base branch
from

Conversation

classicrocker883
Copy link
Contributor

@classicrocker883 classicrocker883 commented Feb 12, 2024

Description

When using G27 P3, this allows Z axis to be raised even if homing may be needed.
Same for G27 P4, allows XY to move if Z axis is not homed.

When a blocking move is done only in the Z axis, it moves up by NOZZLE_PARK_Z_RAISE_MIN which is around 10mm.

  • Change G27 P3 to allow Z raise if homing needed
    • Allow XY if Z !homed (G27 P4)


  • tweak ProUI caselight moved to other PR
  • update macros.h so previous #define are above next call
  • add millis_t to libs/duration_t.h
  • duration_t.h/compat.h/stepper.cpp/motion.h/motion.cpp

unrelated but should be addressed


Requirements

Benefits

Configurations

Related Issues

The only foreseen negative consequence of this change is if the axis is already near its max limit. This really should not be an issue, a user doesn't have to be extra careful in that regard knowing where the limit is.

But if a user just wants to raise the Z, homing isn't required, and this can be beneficial when aborting a print, when a print is complete, or just wanting to raise Z say if the head is too close to the bed, or printed part, for any reason.
Then G27 P3 can be used without needing to "Home"/"trusted axis"

@classicrocker883 classicrocker883 changed the title Change G27 to allow Z raise if homing needed Change G27 to allow Z raise if homing needed + tweak ProUI caselight Feb 14, 2024
@classicrocker883 classicrocker883 changed the title Change G27 to allow Z raise if homing needed + tweak ProUI caselight Change G27 to allow Z raise if homing needed Feb 21, 2024
@classicrocker883 classicrocker883 changed the title Change G27 to allow Z raise if homing needed Change G27 to allow Z raise if homing needed, amend duration_t.h Feb 21, 2024
@classicrocker883 classicrocker883 changed the title Change G27 to allow Z raise if homing needed, amend duration_t.h Change G27 to allow Z raise if homing needed, amend duration_t.h/compat.h Feb 21, 2024
@classicrocker883 classicrocker883 changed the title Change G27 to allow Z raise if homing needed, amend duration_t.h/compat.h Change G27 to allow Z raise if homing needed, amend duration_t.h/compat.h,stepper.cpp Feb 22, 2024
@classicrocker883 classicrocker883 changed the title Change G27 to allow Z raise if homing needed, amend duration_t.h/compat.h,stepper.cpp Change G27 to allow Z raise if homing needed, amend duration_t.h/compat.h/stepper.cpp Feb 22, 2024
@classicrocker883 classicrocker883 changed the title Change G27 to allow Z raise if homing needed, amend duration_t.h/compat.h/stepper.cpp Change G27 to allow Z raise if homing needed, amend various files Feb 28, 2024
@sjasonsmith
Copy link
Contributor

I think your change to G27 is worth considering. Can you remove all the other unrelated changes from the PR, so that the G27 change can be reviewed and evaluated in isolation?

@classicrocker883
Copy link
Contributor Author

done

@sjasonsmith
Copy link
Contributor

@InsanityAutomation now that the scope of this PR is very small, I'd like your opinion on these G-Code changes. The changes seem reasonable to me. Yes, with the Z-raise it may be possible to crash to the endstop, but it is a small move (presumably at low speed), and it is a compromise between that and potentially dragging across the bed or whatever else is beneath the head.

@InsanityAutomation
Copy link
Contributor

With advanced pause, we allow either behavior with HOME_BEFORE_FILAMENT_CHANGE as the behavior is nearly identical. For consistency sake, I would prefer to see the option in configuration.h to allow or disallow this behavior. As @sjasonsmith notes, the impact is fairly small however the viable use cases are also few and far between. Personally I would configure my own machines to block the behavior. We could look at the axis trust factor on the function, and possibly allow it if position is is known but not trusted (eg manually set or steppers disabled prior) for a general case finding a middle ground that should be viable on both sides.

@classicrocker883
Copy link
Contributor Author

classicrocker883 commented Apr 14, 2024

oh i see so like in configuration.h add something like #define ALLOW_G27_ZRAISE, otherwise default to having it trusted.
the only other possible "compromise" is having it only allow to raise Z if axis is !trusted maybe 1 or 2 times.

let me know what I should do, option 1?

@InsanityAutomation
Copy link
Contributor

Yup, adding the config option as described to allow this behavior is the route I would go.

@classicrocker883
Copy link
Contributor Author

classicrocker883 commented Apr 20, 2024

added if G27_BYPASS_TRUST is enabled, allows G27 P3 !trusted/homed Z axis
added to Configuration.h under NOZZLE_PARK_FEATURE

#define G27_BYPASS_TRUST              // Allows `G27 P3` to raise Z even if axis is not trusted

not sure about the wording/placement, but anyone got something better?

@thisiskeithb
Copy link
Member

added if G27_BYPASS_TRUST is enabled, allows G27 P3 !trusted/homed Z axis
added to Configuration.h under NOZZLE_PARK_FEATURE

b47a445 disables this by default to retain existing behavior.

@classicrocker883
Copy link
Contributor Author

I don't understand, what is causing the error in checks? only says operation cancelled on very last one. surely it cannot be something in this PR two files

@thisiskeithb
Copy link
Member

I don't understand, what is causing the error in checks? only says operation cancelled on very last one. surely it cannot be something in this PR two files

Sometimes there are issues on GitHub's end. I restarted the failed job(s), so watch the checks page for details: https://github.com/MarlinFirmware/Marlin/pull/26789/checks

@classicrocker883
Copy link
Contributor Author

Sometimes there are issues on GitHub's end. I restarted the failed job(s), so watch the checks page for details: https://github.com/MarlinFirmware/Marlin/pull/26789/checks

ok thanks, I figured it was something like that. seems to be working. it was strange because it was the same error a couple times in a row

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants