|
@@ -1696,7 +1696,12 @@ static void setup_for_endstop_move() {
|
1696
|
1696
|
}
|
1697
|
1697
|
|
1698
|
1698
|
inline void raise_z_after_probing() {
|
1699
|
|
- do_blocking_move_to_z(current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING);
|
|
1699
|
+ #if Z_RAISE_AFTER_PROBING > 0
|
|
1700
|
+ #if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
1701
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("raise_z_after_probing()");
|
|
1702
|
+ #endif
|
|
1703
|
+ do_blocking_move_to_z(current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING);
|
|
1704
|
+ #endif
|
1700
|
1705
|
}
|
1701
|
1706
|
|
1702
|
1707
|
static void clean_up_after_endstop_move() {
|
|
@@ -1822,14 +1827,6 @@ static void setup_for_endstop_move() {
|
1822
|
1827
|
|
1823
|
1828
|
#if Z_RAISE_AFTER_PROBING > 0
|
1824
|
1829
|
if (doRaise) {
|
1825
|
|
- #if ENABLED(DEBUG_LEVELING_FEATURE)
|
1826
|
|
- if (DEBUGGING(LEVELING)) {
|
1827
|
|
- SERIAL_ECHOPAIR("Raise Z (after) by ", Z_RAISE_AFTER_PROBING);
|
1828
|
|
- SERIAL_EOL;
|
1829
|
|
- SERIAL_ECHO("> SERVO_ENDSTOPS > raise_z_after_probing()");
|
1830
|
|
- SERIAL_EOL;
|
1831
|
|
- }
|
1832
|
|
- #endif
|
1833
|
1830
|
raise_z_after_probing(); // this also updates current_position
|
1834
|
1831
|
stepper.synchronize();
|
1835
|
1832
|
}
|
|
@@ -2117,9 +2114,7 @@ static void setup_for_endstop_move() {
|
2117
|
2114
|
|
2118
|
2115
|
float oldXpos = current_position[X_AXIS]; // save x position
|
2119
|
2116
|
if (dock) {
|
2120
|
|
- #if Z_RAISE_AFTER_PROBING > 0
|
2121
|
|
- raise_z_after_probing(); // raise Z
|
2122
|
|
- #endif
|
|
2117
|
+ raise_z_after_probing(); // raise Z
|
2123
|
2118
|
// Dock sled a bit closer to ensure proper capturing
|
2124
|
2119
|
do_blocking_move_to_x(X_MAX_POS + SLED_DOCKING_OFFSET + offset - 1);
|
2125
|
2120
|
digitalWrite(SLED_PIN, LOW); // turn off magnet
|
|
@@ -3578,7 +3573,7 @@ inline void gcode_G28() {
|
3578
|
3573
|
// Allen Key Probe for Delta
|
3579
|
3574
|
#if ENABLED(Z_PROBE_ALLEN_KEY) || SERVO_LEVELING
|
3580
|
3575
|
stow_z_probe();
|
3581
|
|
- #elif Z_RAISE_AFTER_PROBING > 0
|
|
3576
|
+ #else
|
3582
|
3577
|
raise_z_after_probing(); // for non Allen Key probes, such as simple mechanical probe
|
3583
|
3578
|
#endif
|
3584
|
3579
|
#else // !DELTA
|
|
@@ -3653,7 +3648,7 @@ inline void gcode_G28() {
|
3653
|
3648
|
// Sled assembly for Cartesian bots
|
3654
|
3649
|
#if ENABLED(Z_PROBE_SLED)
|
3655
|
3650
|
dock_sled(true); // dock the sled
|
3656
|
|
- #elif Z_RAISE_AFTER_PROBING > 0
|
|
3651
|
+ #else
|
3657
|
3652
|
// Raise Z axis for non-delta and non servo based probes
|
3658
|
3653
|
#if DISABLED(HAS_SERVO_ENDSTOPS) && DISABLED(Z_PROBE_ALLEN_KEY) && DISABLED(Z_PROBE_SLED)
|
3659
|
3654
|
raise_z_after_probing();
|