Browse Source

Reduce string storage required for DEBUG_LEVELING

Scott Lahteine 8 years ago
parent
commit
98f2e9fc83
1 changed files with 47 additions and 116 deletions
  1. 47
    116
      Marlin/Marlin_main.cpp

+ 47
- 116
Marlin/Marlin_main.cpp View File

1164
   void print_xyz(const char* prefix, const float xyz[]) {
1164
   void print_xyz(const char* prefix, const float xyz[]) {
1165
     print_xyz(prefix, xyz[X_AXIS], xyz[Y_AXIS], xyz[Z_AXIS]);
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
 #endif
1168
 #endif
1168
 
1169
 
1169
 static void set_axis_is_at_home(AxisEnum axis) {
1170
 static void set_axis_is_at_home(AxisEnum axis) {
1251
     #if ENABLED(DEBUG_LEVELING_FEATURE)
1252
     #if ENABLED(DEBUG_LEVELING_FEATURE)
1252
       if (DEBUGGING(LEVELING)) {
1253
       if (DEBUGGING(LEVELING)) {
1253
         SERIAL_ECHOPAIR("> home_offset[axis]==", home_offset[axis]);
1254
         SERIAL_ECHOPAIR("> home_offset[axis]==", home_offset[axis]);
1254
-        print_xyz(" > current_position", current_position);
1255
+        DEBUG_POS("", current_position);
1255
       }
1256
       }
1256
     #endif
1257
     #endif
1257
   }
1258
   }
1306
   feedrate_multiplier = 100;
1307
   feedrate_multiplier = 100;
1307
   refresh_cmd_timeout();
1308
   refresh_cmd_timeout();
1308
   #if ENABLED(DEBUG_LEVELING_FEATURE)
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
   #endif
1311
   #endif
1313
   enable_endstops(true);
1312
   enable_endstops(true);
1314
 }
1313
 }
1321
      */
1320
      */
1322
     void prepare_move_raw() {
1321
     void prepare_move_raw() {
1323
       #if ENABLED(DEBUG_LEVELING_FEATURE)
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
       #endif
1324
       #endif
1328
       refresh_cmd_timeout();
1325
       refresh_cmd_timeout();
1329
       calculate_delta(destination);
1326
       calculate_delta(destination);
1353
         current_position[Z_AXIS] = corrected_position.z;
1350
         current_position[Z_AXIS] = corrected_position.z;
1354
 
1351
 
1355
         #if ENABLED(DEBUG_LEVELING_FEATURE)
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
         #endif
1354
         #endif
1360
 
1355
 
1361
         sync_plan_position();
1356
         sync_plan_position();
1388
       current_position[Z_AXIS] = corrected_position.z;
1383
       current_position[Z_AXIS] = corrected_position.z;
1389
 
1384
 
1390
       #if ENABLED(DEBUG_LEVELING_FEATURE)
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
       #endif
1387
       #endif
1395
 
1388
 
1396
       sync_plan_position();
1389
       sync_plan_position();
1412
       long start_steps = st_get_position(Z_AXIS);
1405
       long start_steps = st_get_position(Z_AXIS);
1413
 
1406
 
1414
       #if ENABLED(DEBUG_LEVELING_FEATURE)
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
       #endif
1409
       #endif
1419
 
1410
 
1420
       // move down slowly until you find the bed
1411
       // move down slowly until you find the bed
1433
       current_position[Z_AXIS] = mm;
1424
       current_position[Z_AXIS] = mm;
1434
 
1425
 
1435
       #if ENABLED(DEBUG_LEVELING_FEATURE)
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
       #endif
1428
       #endif
1440
 
1429
 
1441
       sync_plan_position_delta();
1430
       sync_plan_position_delta();
1476
       sync_plan_position();
1465
       sync_plan_position();
1477
 
1466
 
1478
       #if ENABLED(DEBUG_LEVELING_FEATURE)
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
       #endif
1469
       #endif
1483
 
1470
 
1484
     #endif // !DELTA
1471
     #endif // !DELTA
1492
     float oldFeedRate = feedrate;
1479
     float oldFeedRate = feedrate;
1493
 
1480
 
1494
     #if ENABLED(DEBUG_LEVELING_FEATURE)
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
     #endif
1483
     #endif
1499
 
1484
 
1500
     #if ENABLED(DELTA)
1485
     #if ENABLED(DELTA)
1545
 
1530
 
1546
   static void clean_up_after_endstop_move() {
1531
   static void clean_up_after_endstop_move() {
1547
     #if ENABLED(DEBUG_LEVELING_FEATURE)
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
     #endif
1534
     #endif
1552
     endstops_not_homing();
1535
     endstops_not_homing();
1553
     feedrate = saved_feedrate;
1536
     feedrate = saved_feedrate;
1560
   static void deploy_z_probe() {
1543
   static void deploy_z_probe() {
1561
 
1544
 
1562
     #if ENABLED(DEBUG_LEVELING_FEATURE)
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
     #endif
1547
     #endif
1567
 
1548
 
1568
     if (z_probe_is_active) return;
1549
     if (z_probe_is_active) return;
1658
       UNUSED(doRaise);
1639
       UNUSED(doRaise);
1659
     #endif
1640
     #endif
1660
     #if ENABLED(DEBUG_LEVELING_FEATURE)
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
     #endif
1643
     #endif
1665
 
1644
 
1666
     if (!z_probe_is_active) return;
1645
     if (!z_probe_is_active) return;
1772
         SERIAL_ECHOLNPGM("probe_pt >>>");
1751
         SERIAL_ECHOLNPGM("probe_pt >>>");
1773
         SERIAL_ECHOPAIR("> ProbeAction:", (unsigned long)probe_action);
1752
         SERIAL_ECHOPAIR("> ProbeAction:", (unsigned long)probe_action);
1774
         SERIAL_EOL;
1753
         SERIAL_EOL;
1775
-        print_xyz("> current_position", current_position);
1754
+        DEBUG_POS("", current_position);
1776
       }
1755
       }
1777
     #endif
1756
     #endif
1778
 
1757
 
1802
     #if DISABLED(Z_PROBE_SLED) && DISABLED(Z_PROBE_ALLEN_KEY)
1781
     #if DISABLED(Z_PROBE_SLED) && DISABLED(Z_PROBE_ALLEN_KEY)
1803
       if (probe_action & ProbeDeploy) {
1782
       if (probe_action & ProbeDeploy) {
1804
         #if ENABLED(DEBUG_LEVELING_FEATURE)
1783
         #if ENABLED(DEBUG_LEVELING_FEATURE)
1805
-          if (DEBUGGING(LEVELING)) {
1806
-            SERIAL_ECHOLNPGM("> ProbeDeploy");
1807
-          }
1784
+          if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> ProbeDeploy");
1808
         #endif
1785
         #endif
1809
         deploy_z_probe();
1786
         deploy_z_probe();
1810
       }
1787
       }
1816
     #if DISABLED(Z_PROBE_SLED) && DISABLED(Z_PROBE_ALLEN_KEY)
1793
     #if DISABLED(Z_PROBE_SLED) && DISABLED(Z_PROBE_ALLEN_KEY)
1817
       if (probe_action & ProbeStow) {
1794
       if (probe_action & ProbeStow) {
1818
         #if ENABLED(DEBUG_LEVELING_FEATURE)
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
         #endif
1797
         #endif
1823
         stow_z_probe();
1798
         stow_z_probe();
1824
       }
1799
       }
1835
     }
1810
     }
1836
 
1811
 
1837
     #if ENABLED(DEBUG_LEVELING_FEATURE)
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
     #endif
1814
     #endif
1842
 
1815
 
1843
     return measured_z;
1816
     return measured_z;
1902
      */
1875
      */
1903
     void reset_bed_level() {
1876
     void reset_bed_level() {
1904
       #if ENABLED(DEBUG_LEVELING_FEATURE)
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
       #endif
1879
       #endif
1909
       for (int y = 0; y < AUTO_BED_LEVELING_GRID_POINTS; y++) {
1880
       for (int y = 0; y < AUTO_BED_LEVELING_GRID_POINTS; y++) {
1910
         for (int x = 0; x < AUTO_BED_LEVELING_GRID_POINTS; x++) {
1881
         for (int x = 0; x < AUTO_BED_LEVELING_GRID_POINTS; x++) {
1954
   static void dock_sled(bool dock, int offset = 0) {
1925
   static void dock_sled(bool dock, int offset = 0) {
1955
     #if ENABLED(DEBUG_LEVELING_FEATURE)
1926
     #if ENABLED(DEBUG_LEVELING_FEATURE)
1956
       if (DEBUGGING(LEVELING)) {
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
     #endif
1931
     #endif
1961
 
1932
 
2000
   #if ENABLED(DEBUG_LEVELING_FEATURE)
1971
   #if ENABLED(DEBUG_LEVELING_FEATURE)
2001
     if (DEBUGGING(LEVELING)) {
1972
     if (DEBUGGING(LEVELING)) {
2002
       SERIAL_ECHOPAIR(">>> homeaxis(", (unsigned long)axis);
1973
       SERIAL_ECHOPAIR(">>> homeaxis(", (unsigned long)axis);
2003
-      SERIAL_CHAR(')');
2004
-      SERIAL_EOL;
1974
+      SERIAL_ECHOLNPGM(")");
2005
     }
1975
     }
2006
   #endif
1976
   #endif
2007
   #define HOMEAXIS_DO(LETTER) \
1977
   #define HOMEAXIS_DO(LETTER) \
2066
     sync_plan_position();
2036
     sync_plan_position();
2067
 
2037
 
2068
     #if ENABLED(DEBUG_LEVELING_FEATURE)
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
     #endif
2040
     #endif
2073
     enable_endstops(false); // Disable endstops while moving away
2041
     enable_endstops(false); // Disable endstops while moving away
2074
 
2042
 
2078
     st_synchronize();
2046
     st_synchronize();
2079
 
2047
 
2080
     #if ENABLED(DEBUG_LEVELING_FEATURE)
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
     #endif
2050
     #endif
2085
     enable_endstops(true); // Enable endstops for next homing move
2051
     enable_endstops(true); // Enable endstops for next homing move
2086
 
2052
 
2093
     st_synchronize();
2059
     st_synchronize();
2094
 
2060
 
2095
     #if ENABLED(DEBUG_LEVELING_FEATURE)
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
     #endif
2063
     #endif
2100
 
2064
 
2101
     #if ENABLED(Z_DUAL_ENDSTOPS)
2065
     #if ENABLED(Z_DUAL_ENDSTOPS)
2127
       // retrace by the amount specified in endstop_adj
2091
       // retrace by the amount specified in endstop_adj
2128
       if (endstop_adj[axis] * axis_home_dir < 0) {
2092
       if (endstop_adj[axis] * axis_home_dir < 0) {
2129
         #if ENABLED(DEBUG_LEVELING_FEATURE)
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
         #endif
2095
         #endif
2134
         enable_endstops(false); // Disable endstops while moving away
2096
         enable_endstops(false); // Disable endstops while moving away
2135
         sync_plan_position();
2097
         sync_plan_position();
2137
         #if ENABLED(DEBUG_LEVELING_FEATURE)
2099
         #if ENABLED(DEBUG_LEVELING_FEATURE)
2138
           if (DEBUGGING(LEVELING)) {
2100
           if (DEBUGGING(LEVELING)) {
2139
             SERIAL_ECHOPAIR("> endstop_adj = ", endstop_adj[axis]);
2101
             SERIAL_ECHOPAIR("> endstop_adj = ", endstop_adj[axis]);
2140
-            print_xyz(" > destination", destination);
2102
+            DEBUG_POS("", destination);
2141
           }
2103
           }
2142
         #endif
2104
         #endif
2143
         line_to_destination();
2105
         line_to_destination();
2144
         st_synchronize();
2106
         st_synchronize();
2145
         #if ENABLED(DEBUG_LEVELING_FEATURE)
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
         #endif
2109
         #endif
2150
         enable_endstops(true); // Enable endstops for next homing move
2110
         enable_endstops(true); // Enable endstops for next homing move
2151
       }
2111
       }
2164
     sync_plan_position();
2124
     sync_plan_position();
2165
 
2125
 
2166
     #if ENABLED(DEBUG_LEVELING_FEATURE)
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
     #endif
2128
     #endif
2171
 
2129
 
2172
     destination[axis] = current_position[axis];
2130
     destination[axis] = current_position[axis];
2179
     #if ENABLED(Z_PROBE_SLED) || SERVO_LEVELING || ENABLED(FIX_MOUNTED_PROBE)
2137
     #if ENABLED(Z_PROBE_SLED) || SERVO_LEVELING || ENABLED(FIX_MOUNTED_PROBE)
2180
       if (axis == Z_AXIS && axis_home_dir < 0) {
2138
       if (axis == Z_AXIS && axis_home_dir < 0) {
2181
         #if ENABLED(DEBUG_LEVELING_FEATURE)
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
         #endif
2141
         #endif
2186
         _Z_STOW;
2142
         _Z_STOW;
2187
       }
2143
       }
2191
     #if HAS_SERVO_ENDSTOPS
2147
     #if HAS_SERVO_ENDSTOPS
2192
       if (_Z_SERVO_TEST && servo_endstop_id[axis] >= 0) {
2148
       if (_Z_SERVO_TEST && servo_endstop_id[axis] >= 0) {
2193
         #if ENABLED(DEBUG_LEVELING_FEATURE)
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
         #endif
2151
         #endif
2198
         servo[servo_endstop_id[axis]].move(servo_endstop_angle[axis][1]);
2152
         servo[servo_endstop_id[axis]].move(servo_endstop_angle[axis][1]);
2199
         if (_Z_PROBE_SUBTEST) z_probe_is_active = false;
2153
         if (_Z_PROBE_SUBTEST) z_probe_is_active = false;
2205
   #if ENABLED(DEBUG_LEVELING_FEATURE)
2159
   #if ENABLED(DEBUG_LEVELING_FEATURE)
2206
     if (DEBUGGING(LEVELING)) {
2160
     if (DEBUGGING(LEVELING)) {
2207
       SERIAL_ECHOPAIR("<<< homeaxis(", (unsigned long)axis);
2161
       SERIAL_ECHOPAIR("<<< homeaxis(", (unsigned long)axis);
2208
-      SERIAL_CHAR(')');
2209
-      SERIAL_EOL;
2162
+      SERIAL_ECHOLNPGM(")");
2210
     }
2163
     }
2211
   #endif
2164
   #endif
2212
 }
2165
 }
2444
 inline void gcode_G28() {
2397
 inline void gcode_G28() {
2445
 
2398
 
2446
   #if ENABLED(DEBUG_LEVELING_FEATURE)
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
   #endif
2401
   #endif
2451
 
2402
 
2452
   // Wait for planner moves to finish!
2403
   // Wait for planner moves to finish!
2507
     sync_plan_position_delta();
2458
     sync_plan_position_delta();
2508
 
2459
 
2509
     #if ENABLED(DEBUG_LEVELING_FEATURE)
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
     #endif
2462
     #endif
2514
 
2463
 
2515
   #else // NOT DELTA
2464
   #else // NOT DELTA
2525
       if (home_all_axis || homeZ) {
2474
       if (home_all_axis || homeZ) {
2526
         HOMEAXIS(Z);
2475
         HOMEAXIS(Z);
2527
         #if ENABLED(DEBUG_LEVELING_FEATURE)
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
         #endif
2478
         #endif
2532
       }
2479
       }
2533
 
2480
 
2541
           if (DEBUGGING(LEVELING)) {
2488
           if (DEBUGGING(LEVELING)) {
2542
             SERIAL_ECHOPAIR("Raise Z (before homing) to ", (float)(MIN_Z_HEIGHT_FOR_HOMING));
2489
             SERIAL_ECHOPAIR("Raise Z (before homing) to ", (float)(MIN_Z_HEIGHT_FOR_HOMING));
2543
             SERIAL_EOL;
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
         #endif
2494
         #endif
2548
         line_to_destination();
2495
         line_to_destination();
2586
         sync_plan_position();
2533
         sync_plan_position();
2587
 
2534
 
2588
         #if ENABLED(DEBUG_LEVELING_FEATURE)
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
         #endif
2537
         #endif
2593
 
2538
 
2594
         destination[X_AXIS] = current_position[X_AXIS];
2539
         destination[X_AXIS] = current_position[X_AXIS];
2605
         #endif
2550
         #endif
2606
 
2551
 
2607
         #if ENABLED(DEBUG_LEVELING_FEATURE)
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
         #endif
2554
         #endif
2612
       }
2555
       }
2613
 
2556
 
2636
         HOMEAXIS(X);
2579
         HOMEAXIS(X);
2637
       #endif
2580
       #endif
2638
       #if ENABLED(DEBUG_LEVELING_FEATURE)
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
       #endif
2583
       #endif
2643
     }
2584
     }
2644
 
2585
 
2647
       if (home_all_axis || homeY) {
2588
       if (home_all_axis || homeY) {
2648
         HOMEAXIS(Y);
2589
         HOMEAXIS(Y);
2649
         #if ENABLED(DEBUG_LEVELING_FEATURE)
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
         #endif
2592
         #endif
2654
       }
2593
       }
2655
     #endif
2594
     #endif
2688
 
2627
 
2689
             #if ENABLED(DEBUG_LEVELING_FEATURE)
2628
             #if ENABLED(DEBUG_LEVELING_FEATURE)
2690
               if (DEBUGGING(LEVELING)) {
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
             #endif
2633
             #endif
2695
 
2634
 
2752
         #endif // !Z_SAFE_HOMING
2691
         #endif // !Z_SAFE_HOMING
2753
 
2692
 
2754
         #if ENABLED(DEBUG_LEVELING_FEATURE)
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
         #endif
2695
         #endif
2759
 
2696
 
2760
       } // home_all_axis || homeZ
2697
       } // home_all_axis || homeZ
2790
       line_to_destination();
2727
       line_to_destination();
2791
       st_synchronize();
2728
       st_synchronize();
2792
       #if ENABLED(DEBUG_LEVELING_FEATURE)
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
       #endif
2731
       #endif
2797
     }
2732
     }
2798
   #endif
2733
   #endif
3015
     #if ENABLED(DEBUG_LEVELING_FEATURE)
2950
     #if ENABLED(DEBUG_LEVELING_FEATURE)
3016
       if (DEBUGGING(LEVELING)) {
2951
       if (DEBUGGING(LEVELING)) {
3017
         SERIAL_ECHOLNPGM("gcode_G29 >>>");
2952
         SERIAL_ECHOLNPGM("gcode_G29 >>>");
3018
-        print_xyz("> current_position", current_position);
2953
+        DEBUG_POS("", current_position);
3019
       }
2954
       }
3020
     #endif
2955
     #endif
3021
 
2956
 
3234
       } //yProbe
3169
       } //yProbe
3235
 
3170
 
3236
       #if ENABLED(DEBUG_LEVELING_FEATURE)
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
       #endif
3173
       #endif
3241
 
3174
 
3242
       clean_up_after_endstop_move();
3175
       clean_up_after_endstop_move();
3433
         sync_plan_position();
3366
         sync_plan_position();
3434
 
3367
 
3435
         #if ENABLED(DEBUG_LEVELING_FEATURE)
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
         #endif
3370
         #endif
3440
       }
3371
       }
3441
 
3372
 

Loading…
Cancel
Save