Combine Z raise before/after options

master
Scott Lahteine 8 years ago
parent ca184d3d72
commit 10da7ac86c

@ -796,6 +796,14 @@
#define XY_PROBE_SPEED 4000
#endif
#endif
#ifndef Z_RAISE_PROBE_DEPLOY_STOW
#if defined(Z_RAISE_BEFORE_PROBING) && defined(Z_RAISE_AFTER_PROBING)
#define Z_RAISE_PROBE_DEPLOY_STOW (max(Z_RAISE_BEFORE_PROBING, Z_RAISE_AFTER_PROBING))
#else
#error "You must set Z_RAISE_PROBE_DEPLOY_STOW in your configuration."
#endif
#endif
#define _Z_RAISE_PROBE_DEPLOY_STOW (max(Z_RAISE_PROBE_DEPLOY_STOW, Z_RAISE_BETWEEN_PROBINGS))
#endif
/**

@ -509,12 +509,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//#define Z_MIN_PROBE_REPEATABILITY_TEST
//
// Probe Raise options provide clearance for the probe to deploy and stow.
// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
//
// For G28 these apply when the probe deploys and stows.
// For G29 these apply before and after the full procedure.
#define Z_RAISE_BEFORE_PROBING 15 // Raise before probe deploy (e.g., the first probe).
#define Z_RAISE_AFTER_PROBING 15 // Raise before probe stow (e.g., the last probe).
#define Z_RAISE_PROBE_DEPLOY_STOW 15 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 5 // Raise between probing points.
//

@ -1767,8 +1767,8 @@ static void clean_up_after_endstop_or_probe_move() {
float oldXpos = current_position[X_AXIS]; // save x position
float old_feedrate = feedrate;
if (dock) {
#if Z_RAISE_AFTER_PROBING > 0
do_probe_raise(Z_RAISE_AFTER_PROBING);
#if _Z_RAISE_PROBE_DEPLOY_STOW > 0
do_probe_raise(_Z_RAISE_PROBE_DEPLOY_STOW);
#endif
// Dock sled a bit closer to ensure proper capturing
feedrate = XY_PROBE_FEEDRATE;
@ -1778,7 +1778,7 @@ static void clean_up_after_endstop_or_probe_move() {
else {
feedrate = XY_PROBE_FEEDRATE;
float z_loc = current_position[Z_AXIS];
if (z_loc < Z_RAISE_BEFORE_PROBING + 5) z_loc = Z_RAISE_BEFORE_PROBING;
if (z_loc < _Z_RAISE_PROBE_DEPLOY_STOW + 5) z_loc = _Z_RAISE_PROBE_DEPLOY_STOW;
do_blocking_move_to(X_MAX_POS + SLED_DOCKING_OFFSET + offset, current_position[Y_AXIS], z_loc); // this also updates current_position
digitalWrite(SLED_PIN, HIGH); // turn on magnet
}
@ -1800,8 +1800,8 @@ static void clean_up_after_endstop_or_probe_move() {
if (endstops.z_probe_enabled) return;
// Make room for probe
#if Z_RAISE_BEFORE_PROBING > 0
do_probe_raise(Z_RAISE_BEFORE_PROBING);
#if _Z_RAISE_PROBE_DEPLOY_STOW > 0
do_probe_raise(_Z_RAISE_PROBE_DEPLOY_STOW);
#endif
#if ENABLED(Z_PROBE_SLED)
@ -1904,8 +1904,8 @@ static void clean_up_after_endstop_or_probe_move() {
if (!endstops.z_probe_enabled) return;
// Make more room for the servo
#if Z_RAISE_AFTER_PROBING > 0
do_probe_raise(Z_RAISE_AFTER_PROBING);
#if _Z_RAISE_PROBE_DEPLOY_STOW > 0
do_probe_raise(_Z_RAISE_PROBE_DEPLOY_STOW);
#endif
#if ENABLED(Z_PROBE_SLED)
@ -1924,8 +1924,8 @@ static void clean_up_after_endstop_or_probe_move() {
// Move up for safety
feedrate = Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE;
#if Z_RAISE_AFTER_PROBING > 0
destination[Z_AXIS] = current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING;
#if _Z_RAISE_PROBE_DEPLOY_STOW > 0
destination[Z_AXIS] = current_position[Z_AXIS] + _Z_RAISE_PROBE_DEPLOY_STOW;
prepare_move_to_destination_raw(); // this will also set_current_to_destination
#endif
@ -3596,7 +3596,7 @@ inline void gcode_G28() {
#endif // !AUTO_BED_LEVELING_GRID
// Raise to Z_RAISE_AFTER_PROBING. Stow the probe.
// Raise to _Z_RAISE_PROBE_DEPLOY_STOW. Stow the probe.
stow_z_probe();
// Restore state after probing

@ -508,12 +508,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//#define Z_MIN_PROBE_REPEATABILITY_TEST
//
// Probe Raise options provide clearance for the probe to deploy and stow.
// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
//
// For G28 these apply when the probe deploys and stows.
// For G29 these apply before and after the full procedure.
#define Z_RAISE_BEFORE_PROBING 15 // Raise before probe deploy (e.g., the first probe).
#define Z_RAISE_AFTER_PROBING 15 // Raise before probe stow (e.g., the last probe).
#define Z_RAISE_PROBE_DEPLOY_STOW 15 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 5 // Raise between probing points.
//

@ -491,12 +491,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//#define Z_MIN_PROBE_REPEATABILITY_TEST
//
// Probe Raise options provide clearance for the probe to deploy and stow.
// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
//
// For G28 these apply when the probe deploys and stows.
// For G29 these apply before and after the full procedure.
#define Z_RAISE_BEFORE_PROBING 15 // Raise before probe deploy (e.g., the first probe).
#define Z_RAISE_AFTER_PROBING 15 // Raise before probe stow (e.g., the last probe).
#define Z_RAISE_PROBE_DEPLOY_STOW 15 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 5 // Raise between probing points.
//

@ -489,12 +489,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//#define Z_MIN_PROBE_REPEATABILITY_TEST
//
// Probe Raise options provide clearance for the probe to deploy and stow.
// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
//
// For G28 these apply when the probe deploys and stows.
// For G29 these apply before and after the full procedure.
#define Z_RAISE_BEFORE_PROBING 15 // Raise before probe deploy (e.g., the first probe).
#define Z_RAISE_AFTER_PROBING 15 // Raise before probe stow (e.g., the last probe).
#define Z_RAISE_PROBE_DEPLOY_STOW 15 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 5 // Raise between probing points.
//

@ -501,12 +501,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//#define Z_MIN_PROBE_REPEATABILITY_TEST
//
// Probe Raise options provide clearance for the probe to deploy and stow.
// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
//
// For G28 these apply when the probe deploys and stows.
// For G29 these apply before and after the full procedure.
#define Z_RAISE_BEFORE_PROBING 15 // Raise before probe deploy (e.g., the first probe).
#define Z_RAISE_AFTER_PROBING 15 // Raise before probe stow (e.g., the last probe).
#define Z_RAISE_PROBE_DEPLOY_STOW 15 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 5 // Raise between probing points.
//

@ -503,12 +503,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//#define Z_MIN_PROBE_REPEATABILITY_TEST
//
// Probe Raise options provide clearance for the probe to deploy and stow.
// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
//
// For G28 these apply when the probe deploys and stows.
// For G29 these apply before and after the full procedure.
#define Z_RAISE_BEFORE_PROBING 5 // Raise before probe deploy (e.g., the first probe).
#define Z_RAISE_AFTER_PROBING 5 // Raise before probe stow (e.g., the last probe).
#define Z_RAISE_PROBE_DEPLOY_STOW 5 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 2 // Raise between probing points.
//

@ -526,12 +526,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//#define Z_MIN_PROBE_REPEATABILITY_TEST
//
// Probe Raise options provide clearance for the probe to deploy and stow.
// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
//
// For G28 these apply when the probe deploys and stows.
// For G29 these apply before and after the full procedure.
#define Z_RAISE_BEFORE_PROBING 15 // Raise before probe deploy (e.g., the first probe).
#define Z_RAISE_AFTER_PROBING 15 // Raise before probe stow (e.g., the last probe).
#define Z_RAISE_PROBE_DEPLOY_STOW 15 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 5 // Raise between probing points.
//

@ -509,12 +509,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//#define Z_MIN_PROBE_REPEATABILITY_TEST
//
// Probe Raise options provide clearance for the probe to deploy and stow.
// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
//
// For G28 these apply when the probe deploys and stows.
// For G29 these apply before and after the full procedure.
#define Z_RAISE_BEFORE_PROBING 15 // Raise before probe deploy (e.g., the first probe).
#define Z_RAISE_AFTER_PROBING 15 // Raise before probe stow (e.g., the last probe).
#define Z_RAISE_PROBE_DEPLOY_STOW 15 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 5 // Raise between probing points.
//

@ -503,12 +503,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//#define Z_MIN_PROBE_REPEATABILITY_TEST
//
// Probe Raise options provide clearance for the probe to deploy and stow.
// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
//
// For G28 these apply when the probe deploys and stows.
// For G29 these apply before and after the full procedure.
#define Z_RAISE_BEFORE_PROBING 15 // Raise before probe deploy (e.g., the first probe).
#define Z_RAISE_AFTER_PROBING 15 // Raise before probe stow (e.g., the last probe).
#define Z_RAISE_PROBE_DEPLOY_STOW 15 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 5 // Raise between probing points.
//

@ -517,12 +517,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//#define Z_MIN_PROBE_REPEATABILITY_TEST
//
// Probe Raise options provide clearance for the probe to deploy and stow.
// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
//
// For G28 these apply when the probe deploys and stows.
// For G29 these apply before and after the full procedure.
#define Z_RAISE_BEFORE_PROBING 15 // Raise before probe deploy (e.g., the first probe).
#define Z_RAISE_AFTER_PROBING 15 // Raise before probe stow (e.g., the last probe).
#define Z_RAISE_PROBE_DEPLOY_STOW 15 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 5 // Raise between probing points.
//

@ -530,12 +530,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//#define Z_MIN_PROBE_REPEATABILITY_TEST
//
// Probe Raise options provide clearance for the probe to deploy and stow.
// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
//
// For G28 these apply when the probe deploys and stows.
// For G29 these apply before and after the full procedure.
#define Z_RAISE_BEFORE_PROBING 15 // Raise before probe deploy (e.g., the first probe).
#define Z_RAISE_AFTER_PROBING 15 // Raise before probe stow (e.g., the last probe).
#define Z_RAISE_PROBE_DEPLOY_STOW 15 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 5 // Raise between probing points.
//

@ -501,12 +501,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//#define Z_MIN_PROBE_REPEATABILITY_TEST
//
// Probe Raise options provide clearance for the probe to deploy and stow.
// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
//
// For G28 these apply when the probe deploys and stows.
// For G29 these apply before and after the full procedure.
#define Z_RAISE_BEFORE_PROBING 15 // Raise before probe deploy (e.g., the first probe).
#define Z_RAISE_AFTER_PROBING 15 // Raise before probe stow (e.g., the last probe).
#define Z_RAISE_PROBE_DEPLOY_STOW 15 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 5 // Raise between probing points.
//

@ -509,12 +509,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//#define Z_MIN_PROBE_REPEATABILITY_TEST
//
// Probe Raise options provide clearance for the probe to deploy and stow.
// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
//
// For G28 these apply when the probe deploys and stows.
// For G29 these apply before and after the full procedure.
#define Z_RAISE_BEFORE_PROBING 15 // Raise before probe deploy (e.g., the first probe).
#define Z_RAISE_AFTER_PROBING 15 // Raise before probe stow (e.g., the last probe).
#define Z_RAISE_PROBE_DEPLOY_STOW 15 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 5 // Raise between probing points.
//

@ -588,12 +588,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//#define Z_MIN_PROBE_REPEATABILITY_TEST
//
// Probe Raise options provide clearance for the probe to deploy and stow.
// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
//
// For G28 these apply when the probe deploys and stows.
// For G29 these apply before and after the full procedure.
#define Z_RAISE_BEFORE_PROBING 15 // Raise before probe deploy (e.g., the first probe).
#define Z_RAISE_AFTER_PROBING 50 // Raise before probe stow (e.g., the last probe).
#define Z_RAISE_PROBE_DEPLOY_STOW 50 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 5 // Raise between probing points.
//

@ -582,12 +582,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//#define Z_MIN_PROBE_REPEATABILITY_TEST
//
// Probe Raise options provide clearance for the probe to deploy and stow.
// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
//
// For G28 these apply when the probe deploys and stows.
// For G29 these apply before and after the full procedure.
#define Z_RAISE_BEFORE_PROBING 15 // Raise before probe deploy (e.g., the first probe).
#define Z_RAISE_AFTER_PROBING 50 // Raise before probe stow (e.g., the last probe).
#define Z_RAISE_PROBE_DEPLOY_STOW 15 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 5 // Raise between probing points.
//

@ -585,12 +585,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//#define Z_MIN_PROBE_REPEATABILITY_TEST
//
// Probe Raise options provide clearance for the probe to deploy and stow.
// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
//
// For G28 these apply when the probe deploys and stows.
// For G29 these apply before and after the full procedure.
#define Z_RAISE_BEFORE_PROBING 15 // Raise before probe deploy (e.g., the first probe).
#define Z_RAISE_AFTER_PROBING 50 // Raise before probe stow (e.g., the last probe).
#define Z_RAISE_PROBE_DEPLOY_STOW 50 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 5 // Raise between probing points.
//

@ -579,12 +579,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//#define Z_MIN_PROBE_REPEATABILITY_TEST
//
// Probe Raise options provide clearance for the probe to deploy and stow.
// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
//
// For G28 these apply when the probe deploys and stows.
// For G29 these apply before and after the full procedure.
#define Z_RAISE_BEFORE_PROBING 100 // Raise before probe deploy (e.g., the first probe).
#define Z_RAISE_AFTER_PROBING 15 // Raise before probe stow (e.g., the last probe).
#define Z_RAISE_PROBE_DEPLOY_STOW 100 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 5 // Raise between probing points.
//

@ -580,12 +580,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//#define Z_MIN_PROBE_REPEATABILITY_TEST
//
// Probe Raise options provide clearance for the probe to deploy and stow.
// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
//
// For G28 these apply when the probe deploys and stows.
// For G29 these apply before and after the full procedure.
#define Z_RAISE_BEFORE_PROBING 20 // Raise before probe deploy (e.g., the first probe).
#define Z_RAISE_AFTER_PROBING 20 // Raise before probe stow (e.g., the last probe).
#define Z_RAISE_PROBE_DEPLOY_STOW 20 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 10 // Raise between probing points.
//

@ -512,12 +512,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//#define Z_MIN_PROBE_REPEATABILITY_TEST
//
// Probe Raise options provide clearance for the probe to deploy and stow.
// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
//
// For G28 these apply when the probe deploys and stows.
// For G29 these apply before and after the full procedure.
#define Z_RAISE_BEFORE_PROBING 15 // Raise before probe deploy (e.g., the first probe).
#define Z_RAISE_AFTER_PROBING 15 // Raise before probe stow (e.g., the last probe).
#define Z_RAISE_PROBE_DEPLOY_STOW 15 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 5 // Raise between probing points.
//

@ -499,12 +499,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//#define Z_MIN_PROBE_REPEATABILITY_TEST
//
// Probe Raise options provide clearance for the probe to deploy and stow.
// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
//
// For G28 these apply when the probe deploys and stows.
// For G29 these apply before and after the full procedure.
#define Z_RAISE_BEFORE_PROBING 15 // Raise before probe deploy (e.g., the first probe).
#define Z_RAISE_AFTER_PROBING 15 // Raise before probe stow (e.g., the last probe).
#define Z_RAISE_PROBE_DEPLOY_STOW 15 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 5 // Raise between probing points.
//

Loading…
Cancel
Save