Add MANUAL_PROBE_START_Z for manual probing

This commit is contained in:
Scott Lahteine 2018-07-18 21:17:15 -05:00
parent 17ed0f815c
commit 2106fa26b1
3 changed files with 10 additions and 1 deletions

View file

@ -699,6 +699,7 @@
* or (with LCD_BED_LEVELING) the LCD controller. * or (with LCD_BED_LEVELING) the LCD controller.
*/ */
//#define PROBE_MANUALLY //#define PROBE_MANUALLY
//#define MANUAL_PROBE_START_Z 0.2
/** /**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment. * A Fix-Mounted Probe either doesn't deploy or needs manual deployment.

View file

@ -699,6 +699,7 @@
* or (with LCD_BED_LEVELING) the LCD controller. * or (with LCD_BED_LEVELING) the LCD controller.
*/ */
//#define PROBE_MANUALLY //#define PROBE_MANUALLY
//#define MANUAL_PROBE_START_Z 0.2
/** /**
* A Fix-Mounted Probe either doesn't deploy or needs manual deployment. * A Fix-Mounted Probe either doesn't deploy or needs manual deployment.

View file

@ -266,7 +266,14 @@ void reset_bed_level() {
void _manual_goto_xy(const float &rx, const float &ry) { 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]; const float prev_z = current_position[Z_AXIS];
do_blocking_move_to(rx, ry, MANUAL_PROBE_HEIGHT); do_blocking_move_to(rx, ry, MANUAL_PROBE_HEIGHT);
do_blocking_move_to_z(prev_z); do_blocking_move_to_z(prev_z);