|
@@ -201,6 +201,7 @@
|
201
|
201
|
#endif
|
202
|
202
|
|
203
|
203
|
float homing_feedrate[] = HOMING_FEEDRATE;
|
|
204
|
+int homing_bump_divisor[] = HOMING_BUMP_DIVISOR;
|
204
|
205
|
bool axis_relative_modes[] = AXIS_RELATIVE_MODES;
|
205
|
206
|
int feedmultiply = 100; //100->1 200->2
|
206
|
207
|
int saved_feedmultiply;
|
|
@@ -1131,7 +1132,18 @@ static void run_z_probe() {
|
1131
|
1132
|
st_synchronize();
|
1132
|
1133
|
|
1133
|
1134
|
// move back down slowly to find bed
|
1134
|
|
- feedrate = homing_feedrate[Z_AXIS]/4;
|
|
1135
|
+
|
|
1136
|
+ if (homing_bump_divisor[Z_AXIS] >= 1)
|
|
1137
|
+ {
|
|
1138
|
+ feedrate = homing_feedrate[Z_AXIS]/homing_bump_divisor[Z_AXIS];
|
|
1139
|
+ }
|
|
1140
|
+ else
|
|
1141
|
+ {
|
|
1142
|
+ feedrate = homing_feedrate[Z_AXIS]/10;
|
|
1143
|
+ SERIAL_ECHOLN("Warning: The Homing Bump Feedrate Divisor cannot be less then 1");
|
|
1144
|
+ }
|
|
1145
|
+
|
|
1146
|
+
|
1135
|
1147
|
zPosition -= home_retract_mm(Z_AXIS) * 2;
|
1136
|
1148
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], feedrate/60, active_extruder);
|
1137
|
1149
|
st_synchronize();
|
|
@@ -1293,11 +1305,17 @@ static void homeaxis(int axis) {
|
1293
|
1305
|
st_synchronize();
|
1294
|
1306
|
|
1295
|
1307
|
destination[axis] = 2*home_retract_mm(axis) * axis_home_dir;
|
1296
|
|
-#ifdef DELTA
|
1297
|
|
- feedrate = homing_feedrate[axis]/10;
|
1298
|
|
-#else
|
1299
|
|
- feedrate = homing_feedrate[axis]/2 ;
|
1300
|
|
-#endif
|
|
1308
|
+
|
|
1309
|
+ if (homing_bump_divisor[axis] >= 1)
|
|
1310
|
+ {
|
|
1311
|
+ feedrate = homing_feedrate[axis]/homing_bump_divisor[axis];
|
|
1312
|
+ }
|
|
1313
|
+ else
|
|
1314
|
+ {
|
|
1315
|
+ feedrate = homing_feedrate[axis]/10;
|
|
1316
|
+ SERIAL_ECHOLN("Warning: The Homing Bump Feedrate Divisor cannot be less then 1");
|
|
1317
|
+ }
|
|
1318
|
+
|
1301
|
1319
|
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
|
1302
|
1320
|
st_synchronize();
|
1303
|
1321
|
#ifdef DELTA
|
|
@@ -1756,41 +1774,32 @@ inline void gcode_G28() {
|
1756
|
1774
|
|
1757
|
1775
|
#ifdef AUTO_BED_LEVELING_GRID
|
1758
|
1776
|
|
1759
|
|
- #define MIN_PROBE_EDGE 20 // The probe square sides can be no smaller than this
|
1760
|
|
-
|
1761
|
1777
|
// Make sure probing points are reachable
|
1762
|
1778
|
|
1763
|
1779
|
#if LEFT_PROBE_BED_POSITION < MIN_PROBE_X
|
1764
|
|
- #error The given LEFT_PROBE_BED_POSITION can't be reached by the probe.
|
|
1780
|
+ #error "The given LEFT_PROBE_BED_POSITION can't be reached by the probe."
|
1765
|
1781
|
#elif RIGHT_PROBE_BED_POSITION > MAX_PROBE_X
|
1766
|
|
- #error The given RIGHT_PROBE_BED_POSITION can't be reached by the probe.
|
|
1782
|
+ #error "The given RIGHT_PROBE_BED_POSITION can't be reached by the probe."
|
1767
|
1783
|
#elif FRONT_PROBE_BED_POSITION < MIN_PROBE_Y
|
1768
|
|
- #error The given FRONT_PROBE_BED_POSITION can't be reached by the probe.
|
|
1784
|
+ #error "The given FRONT_PROBE_BED_POSITION can't be reached by the probe."
|
1769
|
1785
|
#elif BACK_PROBE_BED_POSITION > MAX_PROBE_Y
|
1770
|
|
- #error The given BACK_PROBE_BED_POSITION can't be reached by the probe.
|
1771
|
|
-
|
1772
|
|
- // Check if Probe_Offset * Grid Points is greater than Probing Range
|
1773
|
|
-
|
1774
|
|
- #elif abs(X_PROBE_OFFSET_FROM_EXTRUDER) * (AUTO_BED_LEVELING_GRID_POINTS-1) >= RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION
|
1775
|
|
- #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
|
1776
|
|
- #elif abs(Y_PROBE_OFFSET_FROM_EXTRUDER) * (AUTO_BED_LEVELING_GRID_POINTS-1) >= BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION
|
1777
|
|
- #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
|
|
1786
|
+ #error "The given BACK_PROBE_BED_POSITION can't be reached by the probe."
|
1778
|
1787
|
#endif
|
1779
|
1788
|
|
1780
|
1789
|
#else // !AUTO_BED_LEVELING_GRID
|
1781
|
1790
|
|
1782
|
1791
|
#if ABL_PROBE_PT_1_X < MIN_PROBE_X || ABL_PROBE_PT_1_X > MAX_PROBE_X
|
1783
|
|
- #error The given ABL_PROBE_PT_1_X can't be reached by the probe.
|
|
1792
|
+ #error "The given ABL_PROBE_PT_1_X can't be reached by the probe."
|
1784
|
1793
|
#elif ABL_PROBE_PT_2_X < MIN_PROBE_X || ABL_PROBE_PT_2_X > MAX_PROBE_X
|
1785
|
|
- #error The given ABL_PROBE_PT_2_X can't be reached by the probe.
|
|
1794
|
+ #error "The given ABL_PROBE_PT_2_X can't be reached by the probe."
|
1786
|
1795
|
#elif ABL_PROBE_PT_3_X < MIN_PROBE_X || ABL_PROBE_PT_3_X > MAX_PROBE_X
|
1787
|
|
- #error The given ABL_PROBE_PT_3_X can't be reached by the probe.
|
|
1796
|
+ #error "The given ABL_PROBE_PT_3_X can't be reached by the probe."
|
1788
|
1797
|
#elif ABL_PROBE_PT_1_Y < MIN_PROBE_Y || ABL_PROBE_PT_1_Y > MAX_PROBE_Y
|
1789
|
|
- #error The given ABL_PROBE_PT_1_Y can't be reached by the probe.
|
|
1798
|
+ #error "The given ABL_PROBE_PT_1_Y can't be reached by the probe."
|
1790
|
1799
|
#elif ABL_PROBE_PT_2_Y < MIN_PROBE_Y || ABL_PROBE_PT_2_Y > MAX_PROBE_Y
|
1791
|
|
- #error The given ABL_PROBE_PT_2_Y can't be reached by the probe.
|
|
1800
|
+ #error "The given ABL_PROBE_PT_2_Y can't be reached by the probe."
|
1792
|
1801
|
#elif ABL_PROBE_PT_3_Y < MIN_PROBE_Y || ABL_PROBE_PT_3_Y > MAX_PROBE_Y
|
1793
|
|
- #error The given ABL_PROBE_PT_3_Y can't be reached by the probe.
|
|
1802
|
+ #error "The given ABL_PROBE_PT_3_Y can't be reached by the probe."
|
1794
|
1803
|
#endif
|
1795
|
1804
|
|
1796
|
1805
|
#endif // !AUTO_BED_LEVELING_GRID
|
|
@@ -1862,7 +1871,7 @@ inline void gcode_G28() {
|
1862
|
1871
|
SERIAL_PROTOCOLPGM("G29 Auto Bed Leveling\n");
|
1863
|
1872
|
|
1864
|
1873
|
int auto_bed_leveling_grid_points = code_seen('P') ? code_value_long() : AUTO_BED_LEVELING_GRID_POINTS;
|
1865
|
|
- if (auto_bed_leveling_grid_points < 2 || auto_bed_leveling_grid_points > AUTO_BED_LEVELING_GRID_POINTS) {
|
|
1874
|
+ if (auto_bed_leveling_grid_points < 2) {
|
1866
|
1875
|
SERIAL_PROTOCOLPGM("?Number of probed (P)oints is implausible (2 minimum).\n");
|
1867
|
1876
|
return;
|
1868
|
1877
|
}
|
|
@@ -2095,6 +2104,11 @@ inline void gcode_G28() {
|
2095
|
2104
|
#ifdef Z_PROBE_SLED
|
2096
|
2105
|
dock_sled(true, -SLED_DOCKING_OFFSET); // dock the probe, correcting for over-travel
|
2097
|
2106
|
#endif
|
|
2107
|
+
|
|
2108
|
+ #ifdef Z_PROBE_END_SCRIPT
|
|
2109
|
+ enquecommands_P(PSTR(Z_PROBE_END_SCRIPT));
|
|
2110
|
+ st_synchronize();
|
|
2111
|
+ #endif
|
2098
|
2112
|
}
|
2099
|
2113
|
|
2100
|
2114
|
#ifndef Z_PROBE_SLED
|