|
@@ -1164,6 +1164,7 @@ XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR);
|
1164
|
1164
|
void print_xyz(const char* prefix, const float xyz[]) {
|
1165
|
1165
|
print_xyz(prefix, xyz[X_AXIS], xyz[Y_AXIS], xyz[Z_AXIS]);
|
1166
|
1166
|
}
|
|
1167
|
+ #define DEBUG_POS(PREFIX,VAR) do{ SERIAL_ECHOPGM(PREFIX); print_xyz(" > " STRINGIFY(VAR), VAR); }while(0)
|
1167
|
1168
|
#endif
|
1168
|
1169
|
|
1169
|
1170
|
static void set_axis_is_at_home(AxisEnum axis) {
|
|
@@ -1251,7 +1252,7 @@ static void set_axis_is_at_home(AxisEnum axis) {
|
1251
|
1252
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1252
|
1253
|
if (DEBUGGING(LEVELING)) {
|
1253
|
1254
|
SERIAL_ECHOPAIR("> home_offset[axis]==", home_offset[axis]);
|
1254
|
|
- print_xyz(" > current_position", current_position);
|
|
1255
|
+ DEBUG_POS("", current_position);
|
1255
|
1256
|
}
|
1256
|
1257
|
#endif
|
1257
|
1258
|
}
|
|
@@ -1306,9 +1307,7 @@ static void setup_for_endstop_move() {
|
1306
|
1307
|
feedrate_multiplier = 100;
|
1307
|
1308
|
refresh_cmd_timeout();
|
1308
|
1309
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1309
|
|
- if (DEBUGGING(LEVELING)) {
|
1310
|
|
- SERIAL_ECHOLNPGM("setup_for_endstop_move > enable_endstops(true)");
|
1311
|
|
- }
|
|
1310
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("setup_for_endstop_move > enable_endstops(true)");
|
1312
|
1311
|
#endif
|
1313
|
1312
|
enable_endstops(true);
|
1314
|
1313
|
}
|
|
@@ -1321,9 +1320,7 @@ static void setup_for_endstop_move() {
|
1321
|
1320
|
*/
|
1322
|
1321
|
void prepare_move_raw() {
|
1323
|
1322
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1324
|
|
- if (DEBUGGING(LEVELING)) {
|
1325
|
|
- print_xyz("prepare_move_raw > destination", destination);
|
1326
|
|
- }
|
|
1323
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("prepare_move_raw", destination);
|
1327
|
1324
|
#endif
|
1328
|
1325
|
refresh_cmd_timeout();
|
1329
|
1326
|
calculate_delta(destination);
|
|
@@ -1353,9 +1350,7 @@ static void setup_for_endstop_move() {
|
1353
|
1350
|
current_position[Z_AXIS] = corrected_position.z;
|
1354
|
1351
|
|
1355
|
1352
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1356
|
|
- if (DEBUGGING(LEVELING)) {
|
1357
|
|
- print_xyz("set_bed_level_equation_lsq > current_position", current_position);
|
1358
|
|
- }
|
|
1353
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("set_bed_level_equation_lsq", current_position);
|
1359
|
1354
|
#endif
|
1360
|
1355
|
|
1361
|
1356
|
sync_plan_position();
|
|
@@ -1388,9 +1383,7 @@ static void setup_for_endstop_move() {
|
1388
|
1383
|
current_position[Z_AXIS] = corrected_position.z;
|
1389
|
1384
|
|
1390
|
1385
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1391
|
|
- if (DEBUGGING(LEVELING)) {
|
1392
|
|
- print_xyz("set_bed_level_equation_3pts > current_position", current_position);
|
1393
|
|
- }
|
|
1386
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("set_bed_level_equation_3pts", current_position);
|
1394
|
1387
|
#endif
|
1395
|
1388
|
|
1396
|
1389
|
sync_plan_position();
|
|
@@ -1412,9 +1405,7 @@ static void setup_for_endstop_move() {
|
1412
|
1405
|
long start_steps = st_get_position(Z_AXIS);
|
1413
|
1406
|
|
1414
|
1407
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1415
|
|
- if (DEBUGGING(LEVELING)) {
|
1416
|
|
- SERIAL_ECHOLNPGM("run_z_probe (DELTA) 1");
|
1417
|
|
- }
|
|
1408
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("run_z_probe (DELTA) 1");
|
1418
|
1409
|
#endif
|
1419
|
1410
|
|
1420
|
1411
|
// move down slowly until you find the bed
|
|
@@ -1433,9 +1424,7 @@ static void setup_for_endstop_move() {
|
1433
|
1424
|
current_position[Z_AXIS] = mm;
|
1434
|
1425
|
|
1435
|
1426
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1436
|
|
- if (DEBUGGING(LEVELING)) {
|
1437
|
|
- print_xyz("run_z_probe (DELTA) 2 > current_position", current_position);
|
1438
|
|
- }
|
|
1427
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("run_z_probe (DELTA) 2", current_position);
|
1439
|
1428
|
#endif
|
1440
|
1429
|
|
1441
|
1430
|
sync_plan_position_delta();
|
|
@@ -1476,9 +1465,7 @@ static void setup_for_endstop_move() {
|
1476
|
1465
|
sync_plan_position();
|
1477
|
1466
|
|
1478
|
1467
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1479
|
|
- if (DEBUGGING(LEVELING)) {
|
1480
|
|
- print_xyz("run_z_probe > current_position", current_position);
|
1481
|
|
- }
|
|
1468
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("run_z_probe", current_position);
|
1482
|
1469
|
#endif
|
1483
|
1470
|
|
1484
|
1471
|
#endif // !DELTA
|
|
@@ -1492,9 +1479,7 @@ static void setup_for_endstop_move() {
|
1492
|
1479
|
float oldFeedRate = feedrate;
|
1493
|
1480
|
|
1494
|
1481
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1495
|
|
- if (DEBUGGING(LEVELING)) {
|
1496
|
|
- print_xyz("do_blocking_move_to", x, y, z);
|
1497
|
|
- }
|
|
1482
|
+ if (DEBUGGING(LEVELING)) print_xyz("do_blocking_move_to", x, y, z);
|
1498
|
1483
|
#endif
|
1499
|
1484
|
|
1500
|
1485
|
#if ENABLED(DELTA)
|
|
@@ -1545,9 +1530,7 @@ static void setup_for_endstop_move() {
|
1545
|
1530
|
|
1546
|
1531
|
static void clean_up_after_endstop_move() {
|
1547
|
1532
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1548
|
|
- if (DEBUGGING(LEVELING)) {
|
1549
|
|
- SERIAL_ECHOLNPGM("clean_up_after_endstop_move > ENDSTOPS_ONLY_FOR_HOMING > endstops_not_homing()");
|
1550
|
|
- }
|
|
1533
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("clean_up_after_endstop_move > ENDSTOPS_ONLY_FOR_HOMING > endstops_not_homing()");
|
1551
|
1534
|
#endif
|
1552
|
1535
|
endstops_not_homing();
|
1553
|
1536
|
feedrate = saved_feedrate;
|
|
@@ -1560,9 +1543,7 @@ static void setup_for_endstop_move() {
|
1560
|
1543
|
static void deploy_z_probe() {
|
1561
|
1544
|
|
1562
|
1545
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1563
|
|
- if (DEBUGGING(LEVELING)) {
|
1564
|
|
- print_xyz("deploy_z_probe > current_position", current_position);
|
1565
|
|
- }
|
|
1546
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("deploy_z_probe", current_position);
|
1566
|
1547
|
#endif
|
1567
|
1548
|
|
1568
|
1549
|
if (z_probe_is_active) return;
|
|
@@ -1658,9 +1639,7 @@ static void setup_for_endstop_move() {
|
1658
|
1639
|
UNUSED(doRaise);
|
1659
|
1640
|
#endif
|
1660
|
1641
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1661
|
|
- if (DEBUGGING(LEVELING)) {
|
1662
|
|
- print_xyz("stow_z_probe > current_position", current_position);
|
1663
|
|
- }
|
|
1642
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("stow_z_probe", current_position);
|
1664
|
1643
|
#endif
|
1665
|
1644
|
|
1666
|
1645
|
if (!z_probe_is_active) return;
|
|
@@ -1772,7 +1751,7 @@ static void setup_for_endstop_move() {
|
1772
|
1751
|
SERIAL_ECHOLNPGM("probe_pt >>>");
|
1773
|
1752
|
SERIAL_ECHOPAIR("> ProbeAction:", (unsigned long)probe_action);
|
1774
|
1753
|
SERIAL_EOL;
|
1775
|
|
- print_xyz("> current_position", current_position);
|
|
1754
|
+ DEBUG_POS("", current_position);
|
1776
|
1755
|
}
|
1777
|
1756
|
#endif
|
1778
|
1757
|
|
|
@@ -1802,9 +1781,7 @@ static void setup_for_endstop_move() {
|
1802
|
1781
|
#if DISABLED(Z_PROBE_SLED) && DISABLED(Z_PROBE_ALLEN_KEY)
|
1803
|
1782
|
if (probe_action & ProbeDeploy) {
|
1804
|
1783
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1805
|
|
- if (DEBUGGING(LEVELING)) {
|
1806
|
|
- SERIAL_ECHOLNPGM("> ProbeDeploy");
|
1807
|
|
- }
|
|
1784
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> ProbeDeploy");
|
1808
|
1785
|
#endif
|
1809
|
1786
|
deploy_z_probe();
|
1810
|
1787
|
}
|
|
@@ -1816,9 +1793,7 @@ static void setup_for_endstop_move() {
|
1816
|
1793
|
#if DISABLED(Z_PROBE_SLED) && DISABLED(Z_PROBE_ALLEN_KEY)
|
1817
|
1794
|
if (probe_action & ProbeStow) {
|
1818
|
1795
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1819
|
|
- if (DEBUGGING(LEVELING)) {
|
1820
|
|
- SERIAL_ECHOLNPGM("> ProbeStow (stow_z_probe will do Z Raise)");
|
1821
|
|
- }
|
|
1796
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> ProbeStow (stow_z_probe will do Z Raise)");
|
1822
|
1797
|
#endif
|
1823
|
1798
|
stow_z_probe();
|
1824
|
1799
|
}
|
|
@@ -1835,9 +1810,7 @@ static void setup_for_endstop_move() {
|
1835
|
1810
|
}
|
1836
|
1811
|
|
1837
|
1812
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1838
|
|
- if (DEBUGGING(LEVELING)) {
|
1839
|
|
- SERIAL_ECHOLNPGM("<<< probe_pt");
|
1840
|
|
- }
|
|
1813
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< probe_pt");
|
1841
|
1814
|
#endif
|
1842
|
1815
|
|
1843
|
1816
|
return measured_z;
|
|
@@ -1902,9 +1875,7 @@ static void setup_for_endstop_move() {
|
1902
|
1875
|
*/
|
1903
|
1876
|
void reset_bed_level() {
|
1904
|
1877
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1905
|
|
- if (DEBUGGING(LEVELING)) {
|
1906
|
|
- SERIAL_ECHOLNPGM("reset_bed_level");
|
1907
|
|
- }
|
|
1878
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("reset_bed_level");
|
1908
|
1879
|
#endif
|
1909
|
1880
|
for (int y = 0; y < AUTO_BED_LEVELING_GRID_POINTS; y++) {
|
1910
|
1881
|
for (int x = 0; x < AUTO_BED_LEVELING_GRID_POINTS; x++) {
|
|
@@ -1954,8 +1925,8 @@ static void setup_for_endstop_move() {
|
1954
|
1925
|
static void dock_sled(bool dock, int offset = 0) {
|
1955
|
1926
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1956
|
1927
|
if (DEBUGGING(LEVELING)) {
|
1957
|
|
- SERIAL_ECHOPAIR("dock_sled", dock);
|
1958
|
|
- SERIAL_EOL;
|
|
1928
|
+ SERIAL_ECHOPAIR("dock_sled(", dock);
|
|
1929
|
+ SERIAL_ECHOLNPGM(")");
|
1959
|
1930
|
}
|
1960
|
1931
|
#endif
|
1961
|
1932
|
|
|
@@ -2000,8 +1971,7 @@ static void homeaxis(AxisEnum axis) {
|
2000
|
1971
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2001
|
1972
|
if (DEBUGGING(LEVELING)) {
|
2002
|
1973
|
SERIAL_ECHOPAIR(">>> homeaxis(", (unsigned long)axis);
|
2003
|
|
- SERIAL_CHAR(')');
|
2004
|
|
- SERIAL_EOL;
|
|
1974
|
+ SERIAL_ECHOLNPGM(")");
|
2005
|
1975
|
}
|
2006
|
1976
|
#endif
|
2007
|
1977
|
#define HOMEAXIS_DO(LETTER) \
|
|
@@ -2066,9 +2036,7 @@ static void homeaxis(AxisEnum axis) {
|
2066
|
2036
|
sync_plan_position();
|
2067
|
2037
|
|
2068
|
2038
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2069
|
|
- if (DEBUGGING(LEVELING)) {
|
2070
|
|
- SERIAL_ECHOLNPGM("> enable_endstops(false)");
|
2071
|
|
- }
|
|
2039
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> enable_endstops(false)");
|
2072
|
2040
|
#endif
|
2073
|
2041
|
enable_endstops(false); // Disable endstops while moving away
|
2074
|
2042
|
|
|
@@ -2078,9 +2046,7 @@ static void homeaxis(AxisEnum axis) {
|
2078
|
2046
|
st_synchronize();
|
2079
|
2047
|
|
2080
|
2048
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2081
|
|
- if (DEBUGGING(LEVELING)) {
|
2082
|
|
- SERIAL_ECHOLNPGM("> enable_endstops(true)");
|
2083
|
|
- }
|
|
2049
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> enable_endstops(true)");
|
2084
|
2050
|
#endif
|
2085
|
2051
|
enable_endstops(true); // Enable endstops for next homing move
|
2086
|
2052
|
|
|
@@ -2093,9 +2059,7 @@ static void homeaxis(AxisEnum axis) {
|
2093
|
2059
|
st_synchronize();
|
2094
|
2060
|
|
2095
|
2061
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2096
|
|
- if (DEBUGGING(LEVELING)) {
|
2097
|
|
- print_xyz("> TRIGGER ENDSTOP > current_position", current_position);
|
2098
|
|
- }
|
|
2062
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("> TRIGGER ENDSTOP", current_position);
|
2099
|
2063
|
#endif
|
2100
|
2064
|
|
2101
|
2065
|
#if ENABLED(Z_DUAL_ENDSTOPS)
|
|
@@ -2127,9 +2091,7 @@ static void homeaxis(AxisEnum axis) {
|
2127
|
2091
|
// retrace by the amount specified in endstop_adj
|
2128
|
2092
|
if (endstop_adj[axis] * axis_home_dir < 0) {
|
2129
|
2093
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2130
|
|
- if (DEBUGGING(LEVELING)) {
|
2131
|
|
- SERIAL_ECHOLNPGM("> enable_endstops(false)");
|
2132
|
|
- }
|
|
2094
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> enable_endstops(false)");
|
2133
|
2095
|
#endif
|
2134
|
2096
|
enable_endstops(false); // Disable endstops while moving away
|
2135
|
2097
|
sync_plan_position();
|
|
@@ -2137,15 +2099,13 @@ static void homeaxis(AxisEnum axis) {
|
2137
|
2099
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2138
|
2100
|
if (DEBUGGING(LEVELING)) {
|
2139
|
2101
|
SERIAL_ECHOPAIR("> endstop_adj = ", endstop_adj[axis]);
|
2140
|
|
- print_xyz(" > destination", destination);
|
|
2102
|
+ DEBUG_POS("", destination);
|
2141
|
2103
|
}
|
2142
|
2104
|
#endif
|
2143
|
2105
|
line_to_destination();
|
2144
|
2106
|
st_synchronize();
|
2145
|
2107
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2146
|
|
- if (DEBUGGING(LEVELING)) {
|
2147
|
|
- SERIAL_ECHOLNPGM("> enable_endstops(true)");
|
2148
|
|
- }
|
|
2108
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> enable_endstops(true)");
|
2149
|
2109
|
#endif
|
2150
|
2110
|
enable_endstops(true); // Enable endstops for next homing move
|
2151
|
2111
|
}
|
|
@@ -2164,9 +2124,7 @@ static void homeaxis(AxisEnum axis) {
|
2164
|
2124
|
sync_plan_position();
|
2165
|
2125
|
|
2166
|
2126
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2167
|
|
- if (DEBUGGING(LEVELING)) {
|
2168
|
|
- print_xyz("> AFTER set_axis_is_at_home > current_position", current_position);
|
2169
|
|
- }
|
|
2127
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("> AFTER set_axis_is_at_home", current_position);
|
2170
|
2128
|
#endif
|
2171
|
2129
|
|
2172
|
2130
|
destination[axis] = current_position[axis];
|
|
@@ -2179,9 +2137,7 @@ static void homeaxis(AxisEnum axis) {
|
2179
|
2137
|
#if ENABLED(Z_PROBE_SLED) || SERVO_LEVELING || ENABLED(FIX_MOUNTED_PROBE)
|
2180
|
2138
|
if (axis == Z_AXIS && axis_home_dir < 0) {
|
2181
|
2139
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2182
|
|
- if (DEBUGGING(LEVELING)) {
|
2183
|
|
- SERIAL_ECHOLNPGM("> SERVO_LEVELING > " STRINGIFY(_Z_STOW));
|
2184
|
|
- }
|
|
2140
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> SERVO_LEVELING > " STRINGIFY(_Z_STOW));
|
2185
|
2141
|
#endif
|
2186
|
2142
|
_Z_STOW;
|
2187
|
2143
|
}
|
|
@@ -2191,9 +2147,7 @@ static void homeaxis(AxisEnum axis) {
|
2191
|
2147
|
#if HAS_SERVO_ENDSTOPS
|
2192
|
2148
|
if (_Z_SERVO_TEST && servo_endstop_id[axis] >= 0) {
|
2193
|
2149
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2194
|
|
- if (DEBUGGING(LEVELING)) {
|
2195
|
|
- SERIAL_ECHOLNPGM("> SERVO_ENDSTOPS > Stow with servo.move()");
|
2196
|
|
- }
|
|
2150
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> SERVO_ENDSTOPS > Stow with servo.move()");
|
2197
|
2151
|
#endif
|
2198
|
2152
|
servo[servo_endstop_id[axis]].move(servo_endstop_angle[axis][1]);
|
2199
|
2153
|
if (_Z_PROBE_SUBTEST) z_probe_is_active = false;
|
|
@@ -2205,8 +2159,7 @@ static void homeaxis(AxisEnum axis) {
|
2205
|
2159
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2206
|
2160
|
if (DEBUGGING(LEVELING)) {
|
2207
|
2161
|
SERIAL_ECHOPAIR("<<< homeaxis(", (unsigned long)axis);
|
2208
|
|
- SERIAL_CHAR(')');
|
2209
|
|
- SERIAL_EOL;
|
|
2162
|
+ SERIAL_ECHOLNPGM(")");
|
2210
|
2163
|
}
|
2211
|
2164
|
#endif
|
2212
|
2165
|
}
|
|
@@ -2444,9 +2397,7 @@ inline void gcode_G4() {
|
2444
|
2397
|
inline void gcode_G28() {
|
2445
|
2398
|
|
2446
|
2399
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2447
|
|
- if (DEBUGGING(LEVELING)) {
|
2448
|
|
- SERIAL_ECHOLNPGM("gcode_G28 >>>");
|
2449
|
|
- }
|
|
2400
|
+ if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("gcode_G28 >>>");
|
2450
|
2401
|
#endif
|
2451
|
2402
|
|
2452
|
2403
|
// Wait for planner moves to finish!
|
|
@@ -2507,9 +2458,7 @@ inline void gcode_G28() {
|
2507
|
2458
|
sync_plan_position_delta();
|
2508
|
2459
|
|
2509
|
2460
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2510
|
|
- if (DEBUGGING(LEVELING)) {
|
2511
|
|
- print_xyz("(DELTA) > current_position", current_position);
|
2512
|
|
- }
|
|
2461
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("(DELTA)", current_position);
|
2513
|
2462
|
#endif
|
2514
|
2463
|
|
2515
|
2464
|
#else // NOT DELTA
|
|
@@ -2525,9 +2474,7 @@ inline void gcode_G28() {
|
2525
|
2474
|
if (home_all_axis || homeZ) {
|
2526
|
2475
|
HOMEAXIS(Z);
|
2527
|
2476
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2528
|
|
- if (DEBUGGING(LEVELING)) {
|
2529
|
|
- print_xyz("> HOMEAXIS(Z) > current_position", current_position);
|
2530
|
|
- }
|
|
2477
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("> HOMEAXIS(Z)", current_position);
|
2531
|
2478
|
#endif
|
2532
|
2479
|
}
|
2533
|
2480
|
|
|
@@ -2541,8 +2488,8 @@ inline void gcode_G28() {
|
2541
|
2488
|
if (DEBUGGING(LEVELING)) {
|
2542
|
2489
|
SERIAL_ECHOPAIR("Raise Z (before homing) to ", (float)(MIN_Z_HEIGHT_FOR_HOMING));
|
2543
|
2490
|
SERIAL_EOL;
|
2544
|
|
- print_xyz("> (home_all_axis || homeZ) > current_position", current_position);
|
2545
|
|
- print_xyz("> (home_all_axis || homeZ) > destination", destination);
|
|
2491
|
+ DEBUG_POS("> (home_all_axis || homeZ)", current_position);
|
|
2492
|
+ DEBUG_POS("> (home_all_axis || homeZ)", destination);
|
2546
|
2493
|
}
|
2547
|
2494
|
#endif
|
2548
|
2495
|
line_to_destination();
|
|
@@ -2586,9 +2533,7 @@ inline void gcode_G28() {
|
2586
|
2533
|
sync_plan_position();
|
2587
|
2534
|
|
2588
|
2535
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2589
|
|
- if (DEBUGGING(LEVELING)) {
|
2590
|
|
- print_xyz("> QUICK_HOME > current_position 1", current_position);
|
2591
|
|
- }
|
|
2536
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("> QUICK_HOME 1", current_position);
|
2592
|
2537
|
#endif
|
2593
|
2538
|
|
2594
|
2539
|
destination[X_AXIS] = current_position[X_AXIS];
|
|
@@ -2605,9 +2550,7 @@ inline void gcode_G28() {
|
2605
|
2550
|
#endif
|
2606
|
2551
|
|
2607
|
2552
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2608
|
|
- if (DEBUGGING(LEVELING)) {
|
2609
|
|
- print_xyz("> QUICK_HOME > current_position 2", current_position);
|
2610
|
|
- }
|
|
2553
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("> QUICK_HOME 2", current_position);
|
2611
|
2554
|
#endif
|
2612
|
2555
|
}
|
2613
|
2556
|
|
|
@@ -2636,9 +2579,7 @@ inline void gcode_G28() {
|
2636
|
2579
|
HOMEAXIS(X);
|
2637
|
2580
|
#endif
|
2638
|
2581
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2639
|
|
- if (DEBUGGING(LEVELING)) {
|
2640
|
|
- print_xyz("> homeX", current_position);
|
2641
|
|
- }
|
|
2582
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("> homeX", current_position);
|
2642
|
2583
|
#endif
|
2643
|
2584
|
}
|
2644
|
2585
|
|
|
@@ -2647,9 +2588,7 @@ inline void gcode_G28() {
|
2647
|
2588
|
if (home_all_axis || homeY) {
|
2648
|
2589
|
HOMEAXIS(Y);
|
2649
|
2590
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2650
|
|
- if (DEBUGGING(LEVELING)) {
|
2651
|
|
- print_xyz("> homeY", current_position);
|
2652
|
|
- }
|
|
2591
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("> homeY", current_position);
|
2653
|
2592
|
#endif
|
2654
|
2593
|
}
|
2655
|
2594
|
#endif
|
|
@@ -2688,8 +2627,8 @@ inline void gcode_G28() {
|
2688
|
2627
|
|
2689
|
2628
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2690
|
2629
|
if (DEBUGGING(LEVELING)) {
|
2691
|
|
- print_xyz("> Z_SAFE_HOMING > home_all_axis > current_position", current_position);
|
2692
|
|
- print_xyz("> Z_SAFE_HOMING > home_all_axis > destination", destination);
|
|
2630
|
+ DEBUG_POS("> Z_SAFE_HOMING > home_all_axis", current_position);
|
|
2631
|
+ DEBUG_POS("> Z_SAFE_HOMING > home_all_axis", destination);
|
2693
|
2632
|
}
|
2694
|
2633
|
#endif
|
2695
|
2634
|
|
|
@@ -2752,9 +2691,7 @@ inline void gcode_G28() {
|
2752
|
2691
|
#endif // !Z_SAFE_HOMING
|
2753
|
2692
|
|
2754
|
2693
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2755
|
|
- if (DEBUGGING(LEVELING)) {
|
2756
|
|
- print_xyz("> (home_all_axis || homeZ) > final", current_position);
|
2757
|
|
- }
|
|
2694
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("> (home_all_axis || homeZ) > final", current_position);
|
2758
|
2695
|
#endif
|
2759
|
2696
|
|
2760
|
2697
|
} // home_all_axis || homeZ
|
|
@@ -2790,9 +2727,7 @@ inline void gcode_G28() {
|
2790
|
2727
|
line_to_destination();
|
2791
|
2728
|
st_synchronize();
|
2792
|
2729
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
2793
|
|
- if (DEBUGGING(LEVELING)) {
|
2794
|
|
- print_xyz("mbl_was_active > current_position", current_position);
|
2795
|
|
- }
|
|
2730
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("mbl_was_active", current_position);
|
2796
|
2731
|
#endif
|
2797
|
2732
|
}
|
2798
|
2733
|
#endif
|
|
@@ -3015,7 +2950,7 @@ inline void gcode_G28() {
|
3015
|
2950
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
3016
|
2951
|
if (DEBUGGING(LEVELING)) {
|
3017
|
2952
|
SERIAL_ECHOLNPGM("gcode_G29 >>>");
|
3018
|
|
- print_xyz("> current_position", current_position);
|
|
2953
|
+ DEBUG_POS("", current_position);
|
3019
|
2954
|
}
|
3020
|
2955
|
#endif
|
3021
|
2956
|
|
|
@@ -3234,9 +3169,7 @@ inline void gcode_G28() {
|
3234
|
3169
|
} //yProbe
|
3235
|
3170
|
|
3236
|
3171
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
3237
|
|
- if (DEBUGGING(LEVELING)) {
|
3238
|
|
- print_xyz("> probing complete > current_position", current_position);
|
3239
|
|
- }
|
|
3172
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("> probing complete", current_position);
|
3240
|
3173
|
#endif
|
3241
|
3174
|
|
3242
|
3175
|
clean_up_after_endstop_move();
|
|
@@ -3433,9 +3366,7 @@ inline void gcode_G28() {
|
3433
|
3366
|
sync_plan_position();
|
3434
|
3367
|
|
3435
|
3368
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
3436
|
|
- if (DEBUGGING(LEVELING)) {
|
3437
|
|
- print_xyz("> corrected Z in G29", current_position);
|
3438
|
|
- }
|
|
3369
|
+ if (DEBUGGING(LEVELING)) DEBUG_POS("> corrected Z in G29", current_position);
|
3439
|
3370
|
#endif
|
3440
|
3371
|
}
|
3441
|
3372
|
|