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

Add park move options #23158

Merged
merged 9 commits into from
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1891,8 +1891,9 @@
#if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z_raise }
#define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
//#define NOZZLE_PARK_X_ONLY // X move only is required to park
//#define NOZZLE_PARK_Y_ONLY // Y move only is required to park
#define NOZZLE_PARK_MOVE 4 // 0 = move both X & Y to get to park,
HoverClub marked this conversation as resolved.
Show resolved Hide resolved
// 1 = Y only to park, 2 = X only,
// 3 = move X first then Y, 4 = move Y first then X
#define NOZZLE_PARK_Z_RAISE_MIN 2 // (mm) Always raise Z by at least this distance
#define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis)
#define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers)
Expand Down
18 changes: 13 additions & 5 deletions Marlin/src/libs/nozzle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,19 @@ Nozzle nozzle;
break;
}

do_blocking_move_to_xy(
TERN(NOZZLE_PARK_Y_ONLY, current_position, park).x,
TERN(NOZZLE_PARK_X_ONLY, current_position, park).y,
fr_xy
);
#if NOZZLE_PARK_MOVE == 0
do_blocking_move_to_xy(park.x, park.y, fr_xy);
#elif NOZZLE_PARK_MOVE == 1
do_blocking_move_to_x(park.x, fr_xy);
#elif NOZZLE_PARK_MOVE == 2
do_blocking_move_to_y(park.y, fr_xy);
#elif NOZZLE_PARK_MOVE == 3
do_blocking_move_to_x(park.x, fr_xy);
do_blocking_move_to_y(park.y, fr_xy);
#elif NOZZLE_PARK_MOVE == 4
do_blocking_move_to_y(park.y, fr_xy);
do_blocking_move_to_x(park.x, fr_xy);
#endif

report_current_position();
}
Expand Down