From 2106fa26b19e1d3edc2b59bfd1504f7b4e87683a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 18 Jul 2018 21:17:15 -0500 Subject: [PATCH] Add MANUAL_PROBE_START_Z for manual probing --- Marlin/Configuration.h | 1 + Marlin/src/config/default/Configuration.h | 1 + Marlin/src/feature/bedlevel/bedlevel.cpp | 9 ++++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 67710c802..4cfc1007b 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -699,6 +699,7 @@ * or (with LCD_BED_LEVELING) the LCD controller. */ //#define PROBE_MANUALLY +//#define MANUAL_PROBE_START_Z 0.2 /** * A Fix-Mounted Probe either doesn't deploy or needs manual deployment. diff --git a/Marlin/src/config/default/Configuration.h b/Marlin/src/config/default/Configuration.h index 67710c802..4cfc1007b 100644 --- a/Marlin/src/config/default/Configuration.h +++ b/Marlin/src/config/default/Configuration.h @@ -699,6 +699,7 @@ * or (with LCD_BED_LEVELING) the LCD controller. */ //#define PROBE_MANUALLY +//#define MANUAL_PROBE_START_Z 0.2 /** * A Fix-Mounted Probe either doesn't deploy or needs manual deployment. diff --git a/Marlin/src/feature/bedlevel/bedlevel.cpp b/Marlin/src/feature/bedlevel/bedlevel.cpp index 797a9dc50..a33a14887 100644 --- a/Marlin/src/feature/bedlevel/bedlevel.cpp +++ b/Marlin/src/feature/bedlevel/bedlevel.cpp @@ -266,7 +266,14 @@ void reset_bed_level() { void _manual_goto_xy(const float &rx, const float &ry) { - #if MANUAL_PROBE_HEIGHT > 0 + #ifdef MANUAL_PROBE_START_Z + #if MANUAL_PROBE_HEIGHT > 0 + do_blocking_move_to(rx, ry, MANUAL_PROBE_HEIGHT); + do_blocking_move_to_z(MAX(0,MANUAL_PROBE_START_Z); + #else + do_blocking_move_to(rx, ry, MAX(0,MANUAL_PROBE_START_Z); + #endif + #elif MANUAL_PROBE_HEIGHT > 0 const float prev_z = current_position[Z_AXIS]; do_blocking_move_to(rx, ry, MANUAL_PROBE_HEIGHT); do_blocking_move_to_z(prev_z);