|
@@ -1667,6 +1667,8 @@ static void setup_for_endstop_move() {
|
1667
|
1667
|
|
1668
|
1668
|
static void run_z_probe() {
|
1669
|
1669
|
|
|
1670
|
+ float old_feedrate = feedrate;
|
|
1671
|
+
|
1670
|
1672
|
/**
|
1671
|
1673
|
* To prevent stepper_inactive_time from running out and
|
1672
|
1674
|
* EXTRUDER_RUNOUT_PREVENT from extruding
|
|
@@ -1743,6 +1745,8 @@ static void setup_for_endstop_move() {
|
1743
|
1745
|
#endif
|
1744
|
1746
|
|
1745
|
1747
|
#endif // !DELTA
|
|
1748
|
+
|
|
1749
|
+ feedrate = old_feedrate;
|
1746
|
1750
|
}
|
1747
|
1751
|
|
1748
|
1752
|
/**
|
|
@@ -1750,7 +1754,7 @@ static void setup_for_endstop_move() {
|
1750
|
1754
|
* The final current_position may not be the one that was requested
|
1751
|
1755
|
*/
|
1752
|
1756
|
static void do_blocking_move_to(float x, float y, float z) {
|
1753
|
|
- float oldFeedRate = feedrate;
|
|
1757
|
+ float old_feedrate = feedrate;
|
1754
|
1758
|
|
1755
|
1759
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1756
|
1760
|
if (DEBUGGING(LEVELING)) print_xyz("do_blocking_move_to", x, y, z);
|
|
@@ -1758,7 +1762,7 @@ static void setup_for_endstop_move() {
|
1758
|
1762
|
|
1759
|
1763
|
#if ENABLED(DELTA)
|
1760
|
1764
|
|
1761
|
|
- feedrate = XY_TRAVEL_SPEED;
|
|
1765
|
+ feedrate = xy_travel_speed;
|
1762
|
1766
|
|
1763
|
1767
|
destination[X_AXIS] = x;
|
1764
|
1768
|
destination[Y_AXIS] = y;
|
|
@@ -1769,8 +1773,6 @@ static void setup_for_endstop_move() {
|
1769
|
1773
|
else
|
1770
|
1774
|
prepare_move_to_destination(); // this will also set_current_to_destination
|
1771
|
1775
|
|
1772
|
|
- stepper.synchronize();
|
1773
|
|
-
|
1774
|
1776
|
#else
|
1775
|
1777
|
|
1776
|
1778
|
feedrate = homing_feedrate[Z_AXIS];
|
|
@@ -1784,11 +1786,12 @@ static void setup_for_endstop_move() {
|
1784
|
1786
|
current_position[X_AXIS] = x;
|
1785
|
1787
|
current_position[Y_AXIS] = y;
|
1786
|
1788
|
line_to_current_position();
|
1787
|
|
- stepper.synchronize();
|
1788
|
1789
|
|
1789
|
1790
|
#endif
|
1790
|
1791
|
|
1791
|
|
- feedrate = oldFeedRate;
|
|
1792
|
+ stepper.synchronize();
|
|
1793
|
+
|
|
1794
|
+ feedrate = old_feedrate;
|
1792
|
1795
|
}
|
1793
|
1796
|
|
1794
|
1797
|
inline void do_blocking_move_to_xy(float x, float y) {
|
|
@@ -1838,6 +1841,8 @@ static void setup_for_endstop_move() {
|
1838
|
1841
|
DEPLOY_Z_SERVO();
|
1839
|
1842
|
|
1840
|
1843
|
#elif ENABLED(Z_PROBE_ALLEN_KEY)
|
|
1844
|
+ float old_feedrate = feedrate;
|
|
1845
|
+
|
1841
|
1846
|
feedrate = Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE;
|
1842
|
1847
|
|
1843
|
1848
|
// If endstop is already false, the Z probe is deployed
|
|
@@ -1849,7 +1854,6 @@ static void setup_for_endstop_move() {
|
1849
|
1854
|
if (z_min_endstop)
|
1850
|
1855
|
#endif
|
1851
|
1856
|
{
|
1852
|
|
-
|
1853
|
1857
|
// Move to the start position to initiate deployment
|
1854
|
1858
|
destination[X_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_1_X;
|
1855
|
1859
|
destination[Y_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_1_Y;
|
|
@@ -1886,10 +1890,12 @@ static void setup_for_endstop_move() {
|
1886
|
1890
|
}
|
1887
|
1891
|
|
1888
|
1892
|
// Partially Home X,Y for safety
|
1889
|
|
- destination[X_AXIS] = destination[X_AXIS] * 0.75;
|
1890
|
|
- destination[Y_AXIS] = destination[Y_AXIS] * 0.75;
|
|
1893
|
+ destination[X_AXIS] *= 0.75;
|
|
1894
|
+ destination[Y_AXIS] *= 0.75;
|
1891
|
1895
|
prepare_move_to_destination_raw(); // this will also set_current_to_destination
|
1892
|
1896
|
|
|
1897
|
+ feedrate = old_feedrate;
|
|
1898
|
+
|
1893
|
1899
|
stepper.synchronize();
|
1894
|
1900
|
|
1895
|
1901
|
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
|
|
@@ -1943,6 +1949,8 @@ static void setup_for_endstop_move() {
|
1943
|
1949
|
|
1944
|
1950
|
#elif ENABLED(Z_PROBE_ALLEN_KEY)
|
1945
|
1951
|
|
|
1952
|
+ float old_feedrate = feedrate;
|
|
1953
|
+
|
1946
|
1954
|
// Move up for safety
|
1947
|
1955
|
feedrate = Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE;
|
1948
|
1956
|
|
|
@@ -1983,6 +1991,8 @@ static void setup_for_endstop_move() {
|
1983
|
1991
|
destination[Y_AXIS] = 0;
|
1984
|
1992
|
prepare_move_to_destination_raw(); // this will also set_current_to_destination
|
1985
|
1993
|
|
|
1994
|
+ feedrate = old_feedrate;
|
|
1995
|
+
|
1986
|
1996
|
stepper.synchronize();
|
1987
|
1997
|
|
1988
|
1998
|
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
|
|
@@ -3829,9 +3839,8 @@ inline void gcode_G28() {
|
3829
|
3839
|
// TODO: clear the leveling matrix or the planner will be set incorrectly
|
3830
|
3840
|
setup_for_endstop_move(); // Too late. Must be done before deploying.
|
3831
|
3841
|
|
3832
|
|
- feedrate = homing_feedrate[Z_AXIS];
|
3833
|
|
-
|
3834
|
3842
|
run_z_probe();
|
|
3843
|
+
|
3835
|
3844
|
SERIAL_PROTOCOLPGM("Bed X: ");
|
3836
|
3845
|
SERIAL_PROTOCOL(current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER + 0.0001);
|
3837
|
3846
|
SERIAL_PROTOCOLPGM(" Y: ");
|