Add final Z raise after Delta probe
This commit is contained in:
parent
8c768a76a2
commit
fabf3ae4a0
@ -1388,6 +1388,7 @@ static void setup_for_endstop_move() {
|
|||||||
inline void do_blocking_move_to_xy(float x, float y) { do_blocking_move_to(x, y, current_position[Z_AXIS]); }
|
inline void do_blocking_move_to_xy(float x, float y) { do_blocking_move_to(x, y, current_position[Z_AXIS]); }
|
||||||
inline void do_blocking_move_to_x(float x) { do_blocking_move_to(x, current_position[Y_AXIS], current_position[Z_AXIS]); }
|
inline void do_blocking_move_to_x(float x) { do_blocking_move_to(x, current_position[Y_AXIS], current_position[Z_AXIS]); }
|
||||||
inline void do_blocking_move_to_z(float z) { do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z); }
|
inline void do_blocking_move_to_z(float z) { do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z); }
|
||||||
|
inline void raise_z_after_probing() { do_blocking_move_to_z(current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING); }
|
||||||
|
|
||||||
static void clean_up_after_endstop_move() {
|
static void clean_up_after_endstop_move() {
|
||||||
#if ENABLED(ENDSTOPS_ONLY_FOR_HOMING)
|
#if ENABLED(ENDSTOPS_ONLY_FOR_HOMING)
|
||||||
@ -1518,11 +1519,11 @@ static void setup_for_endstop_move() {
|
|||||||
if (marlin_debug_flags & DEBUG_LEVELING) {
|
if (marlin_debug_flags & DEBUG_LEVELING) {
|
||||||
SERIAL_ECHOPAIR("Raise Z (after) by ", (float)Z_RAISE_AFTER_PROBING);
|
SERIAL_ECHOPAIR("Raise Z (after) by ", (float)Z_RAISE_AFTER_PROBING);
|
||||||
SERIAL_EOL;
|
SERIAL_EOL;
|
||||||
SERIAL_ECHOPAIR("> SERVO_ENDSTOPS > do_blocking_move_to_z ", current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING);
|
SERIAL_ECHOPAIR("> SERVO_ENDSTOPS > raise_z_after_probing()");
|
||||||
SERIAL_EOL;
|
SERIAL_EOL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
do_blocking_move_to_z(current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING); // this also updates current_position
|
raise_z_after_probing(); // this also updates current_position
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1794,7 +1795,7 @@ static void setup_for_endstop_move() {
|
|||||||
float oldXpos = current_position[X_AXIS]; // save x position
|
float oldXpos = current_position[X_AXIS]; // save x position
|
||||||
if (dock) {
|
if (dock) {
|
||||||
#if Z_RAISE_AFTER_PROBING > 0
|
#if Z_RAISE_AFTER_PROBING > 0
|
||||||
do_blocking_move_to_z(current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING); // raise Z
|
raise_z_after_probing(); // raise Z
|
||||||
#endif
|
#endif
|
||||||
do_blocking_move_to_x(X_MAX_POS + SLED_DOCKING_OFFSET + offset - 1); // Dock sled a bit closer to ensure proper capturing
|
do_blocking_move_to_x(X_MAX_POS + SLED_DOCKING_OFFSET + offset - 1); // Dock sled a bit closer to ensure proper capturing
|
||||||
digitalWrite(SLED_PIN, LOW); // turn off magnet
|
digitalWrite(SLED_PIN, LOW); // turn off magnet
|
||||||
@ -3126,7 +3127,14 @@ inline void gcode_G28() {
|
|||||||
|
|
||||||
#endif // !AUTO_BED_LEVELING_GRID
|
#endif // !AUTO_BED_LEVELING_GRID
|
||||||
|
|
||||||
#if DISABLED(DELTA)
|
#if ENABLED(DELTA)
|
||||||
|
// Allen Key Probe for Delta
|
||||||
|
#if ENABLED(Z_PROBE_ALLEN_KEY)
|
||||||
|
stow_z_probe();
|
||||||
|
#elif Z_RAISE_AFTER_PROBING > 0
|
||||||
|
raise_z_after_probing();
|
||||||
|
#endif
|
||||||
|
#else // !DELTA
|
||||||
if (verbose_level > 0)
|
if (verbose_level > 0)
|
||||||
plan_bed_level_matrix.debug(" \n\nBed Level Correction Matrix:");
|
plan_bed_level_matrix.debug(" \n\nBed Level Correction Matrix:");
|
||||||
|
|
||||||
@ -3187,13 +3195,13 @@ inline void gcode_G28() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif // !DELTA
|
|
||||||
|
|
||||||
#if ENABLED(Z_PROBE_SLED)
|
// Sled assembly for Cartesian bots
|
||||||
dock_sled(true); // dock the Z probe
|
#if ENABLED(Z_PROBE_SLED)
|
||||||
#elif ENABLED(Z_PROBE_ALLEN_KEY) //|| SERVO_LEVELING
|
dock_sled(true); // dock the sled
|
||||||
stow_z_probe();
|
#endif
|
||||||
#endif
|
|
||||||
|
#endif // !DELTA
|
||||||
|
|
||||||
#ifdef Z_PROBE_END_SCRIPT
|
#ifdef Z_PROBE_END_SCRIPT
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
|
Loading…
Reference in New Issue
Block a user