From c7faba1108eedd24561503c991d67a7d2ca50904 Mon Sep 17 00:00:00 2001 From: Speaka <48431623+Speaka@users.noreply.github.com> Date: Wed, 11 Nov 2020 02:41:21 +0100 Subject: [PATCH] Tramming Wizard wait position (#20063) --- Marlin/Configuration_adv.h | 1 + Marlin/src/lcd/menu/menu_tramming.cpp | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 59a58f94e8d86..df666a1def8a6 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -811,6 +811,7 @@ //#define ASSISTED_TRAMMING_MENU_ITEM // Add a menu item to run G35 Assisted Tramming (MarlinUI) //#define ASSISTED_TRAMMING_WIZARD // Make the menu item open a Tramming Wizard sub-menu + //#define ASSISTED_TRAMMING_WAIT_POSITION { X_CENTER, Y_CENTER, 30 } // Move the nozzle out of the way for adjustment /** * Screw thread: diff --git a/Marlin/src/lcd/menu/menu_tramming.cpp b/Marlin/src/lcd/menu/menu_tramming.cpp index 317335d51bc27..c9043a118bd8d 100644 --- a/Marlin/src/lcd/menu/menu_tramming.cpp +++ b/Marlin/src/lcd/menu/menu_tramming.cpp @@ -50,6 +50,14 @@ bool probe_single_point() { const float z_probed_height = probe.probe_at_point(screws_tilt_adjust_pos[tram_index], PROBE_PT_RAISE, 0, true); DEBUG_ECHOLNPAIR("probe_single_point: ", z_probed_height, "mm"); z_measured[tram_index] = z_probed_height; + + #ifdef ASSISTED_TRAMMING_WAIT_POSITION + // Move XY to safe position + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Moving away"); + const xyz_pos_t wait_pos = ASSISTED_TRAMMING_WAIT_POSITION; + do_blocking_move_to(wait_pos, XY_PROBE_FEEDRATE_MM_S); + #endif + return !isnan(z_probed_height); }