-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
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
Simplify dock_sled() and some more probe tweaks #4160
Conversation
Huh, I thought I had done that one. |
@@ -1713,27 +1713,37 @@ static void clean_up_after_endstop_or_probe_move() { | |||
z_dest -= zprobe_zoffset; | |||
|
|||
if (z_dest > current_position[Z_AXIS]) { | |||
float old_feedrate = feedrate; | |||
feedrate = homing_feedrate[Z_AXIS]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't set the feedrate for Z here, it doesn't get set anywhere else.
I also noticed, in gcode_M48
it's not setting feedrate
for the move at the end of the n_legs
loop. I believe it should set the feedrate
to XY_PROBE_SPEED
ahead of the loop.
Of course, do_blocking_move
could handle all of this, applying the Z feedrate for Z-only moves, and the XY_PROBE_SPEED
for others, and then functions that call it can leave off setting feedrate
themselves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excep of line 1662, 1674, 1667 in do_blocking_move_to()
. Please look it up. (https://github.com/MarlinFirmware/Marlin/blob/RCBugFix/Marlin/Marlin_main.cpp#L1638)
As long as we do only blocking moves the feedrates are set and restored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah! I've been forgetting song lyrics lately too. Need more vitamins!
Getting better all the time… Check my comments for some suggestions, and of course please keep adding more commits if you see anything else needing a tweak! |
b309b86
to
b3f5a5d
Compare
`dock_sled()` is never called with offset parameter - remove it. We move x only - so only that needs to be homed. Consequence is - we can home to z-min now with a sled probe! Feedrates are set and restored in `do_blocking_move()`. We already checked if the probe is deployed/stowed in deploy/stow_probe. ``` if (z_loc < _Z_RAISE_PROBE_DEPLOY_STOW + 5) z_loc = _Z_RAISE_PROBE_DEPLOY_STOW; ``` makes no sense - remove. Now the raise is the same for deploy/stow -> move before the if. Replace the if with a ternary. Instead writing LOW/HIGH use the boolean `stow` we already have. There is no reason for not using the sled probe in G29/M48 with 'E'. It takes a while but works. (tested!)
…cription Rewrite the Tcodes description
Simplify
dock_sled()
dock_sled()
is never called withoffset
parameter - remove it.We move x only - so only that needs to be homed. Consequence is - we can home to z-min now with a sled probe!
Feedrates are set and restored in
do_blocking_move()
.We already checked if the probe is deployed/stowed in deploy/stow_probe.
if (z_loc < _Z_RAISE_PROBE_DEPLOY_STOW + 5) z_loc = _Z_RAISE_PROBE_DEPLOY_STOW;
makes no sense - remove.
Now the raise is the same for deploy/stow -> move before the if - and remove at all because already done in deploy/stow_probe.
Replace the if with a ternary.
Instead writing LOW/HIGH use the boolean stow we already have.
There is no reason for not using the sled probe in G29/M48 with 'E'.
It takes a while but works. (tested!)
universalize
axis_unhomed_error()
Some more tweaks
Feedrates are set in do_blocking_move()
_Z_RAISE_PROBE_DEPLOY_STOW is always defined here.
If HAS_BED_PROBE is defined in G28 we have a shothand.
Debug output for home y for the HOME_Y_BEFORE_X case.