From 58ac9f257cb73a0607e3821591f3dfea75670d27 Mon Sep 17 00:00:00 2001 From: studiodyne <42887851+studiodyne@users.noreply.github.com> Date: Sat, 25 Apr 2020 17:42:34 +0200 Subject: [PATCH] NOZZLE_PARK_FEATURE - X/Y only axis move (#17697) --- Marlin/Configuration.h | 2 ++ Marlin/src/libs/nozzle.cpp | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index dc0251527..a69cecf4a 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1501,6 +1501,8 @@ #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_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) diff --git a/Marlin/src/libs/nozzle.cpp b/Marlin/src/libs/nozzle.cpp index b83ec4280..926845ced 100644 --- a/Marlin/src/libs/nozzle.cpp +++ b/Marlin/src/libs/nozzle.cpp @@ -188,7 +188,11 @@ Nozzle nozzle; } break; } - do_blocking_move_to_xy(park, fr_xy); + 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 + ); report_current_position(); }