Переглянути джерело

Additional logging of do_blocking_move_to

Scott Lahteine 9 роки тому
джерело
коміт
ad16d5019e
1 змінених файлів з 24 додано та 1 видалено
  1. 24
    1
      Marlin/Marlin_main.cpp

+ 24
- 1
Marlin/Marlin_main.cpp Переглянути файл

@@ -1672,7 +1672,7 @@ void do_blocking_move_to(float x, float y, float z, float fr_mm_m /*=0.0*/) {
1672 1672
   float old_feedrate_mm_m = feedrate_mm_m;
1673 1673
 
1674 1674
   #if ENABLED(DEBUG_LEVELING_FEATURE)
1675
-    if (DEBUGGING(LEVELING)) print_xyz(PSTR("do_blocking_move_to"), NULL, x, y, z);
1675
+    if (DEBUGGING(LEVELING)) print_xyz(PSTR(">>> do_blocking_move_to"), NULL, x, y, z);
1676 1676
   #endif
1677 1677
 
1678 1678
   #if ENABLED(DELTA)
@@ -1681,6 +1681,10 @@ void do_blocking_move_to(float x, float y, float z, float fr_mm_m /*=0.0*/) {
1681 1681
 
1682 1682
     set_destination_to_current();          // sync destination at the start
1683 1683
 
1684
+    #if ENABLED(DEBUG_LEVELING_FEATURE)
1685
+      if (DEBUGGING(LEVELING)) DEBUG_POS(PSTR("set_destination_to_current"), destination);
1686
+    #endif
1687
+
1684 1688
     // when in the danger zone
1685 1689
     if (current_position[Z_AXIS] > delta_clip_start_height) {
1686 1690
       if (z > delta_clip_start_height) {   // staying in the danger zone
@@ -1688,28 +1692,47 @@ void do_blocking_move_to(float x, float y, float z, float fr_mm_m /*=0.0*/) {
1688 1692
         destination[Y_AXIS] = y;
1689 1693
         destination[Z_AXIS] = z;
1690 1694
         prepare_move_to_destination_raw(); // set_current_to_destination
1695
+        #if ENABLED(DEBUG_LEVELING_FEATURE)
1696
+          if (DEBUGGING(LEVELING)) DEBUG_POS(PSTR("danger zone move"), current_position);
1697
+        #endif
1691 1698
         return;
1692 1699
       }
1693 1700
       else {
1694 1701
         destination[Z_AXIS] = delta_clip_start_height;
1695 1702
         prepare_move_to_destination_raw(); // set_current_to_destination
1703
+        #if ENABLED(DEBUG_LEVELING_FEATURE)
1704
+          if (DEBUGGING(LEVELING)) DEBUG_POS(PSTR("zone border move"), current_position);
1705
+        #endif
1696 1706
       }
1697 1707
     }
1698 1708
 
1699 1709
     if (z > current_position[Z_AXIS]) {    // raising?
1700 1710
       destination[Z_AXIS] = z;
1701 1711
       prepare_move_to_destination_raw();   // set_current_to_destination
1712
+      #if ENABLED(DEBUG_LEVELING_FEATURE)
1713
+        if (DEBUGGING(LEVELING)) DEBUG_POS(PSTR("z raise move"), current_position);
1714
+      #endif
1702 1715
     }
1703 1716
 
1704 1717
     destination[X_AXIS] = x;
1705 1718
     destination[Y_AXIS] = y;
1706 1719
     prepare_move_to_destination();         // set_current_to_destination
1720
+    #if ENABLED(DEBUG_LEVELING_FEATURE)
1721
+      if (DEBUGGING(LEVELING)) DEBUG_POS(PSTR("xy move"), current_position);
1722
+    #endif
1707 1723
 
1708 1724
     if (z < current_position[Z_AXIS]) {    // lowering?
1709 1725
       destination[Z_AXIS] = z;
1710 1726
       prepare_move_to_destination_raw();   // set_current_to_destination
1727
+      #if ENABLED(DEBUG_LEVELING_FEATURE)
1728
+        if (DEBUGGING(LEVELING)) DEBUG_POS(PSTR("z lower move"), current_position);
1729
+      #endif
1711 1730
     }
1712 1731
 
1732
+    #if ENABLED(DEBUG_LEVELING_FEATURE)
1733
+      if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< do_blocking_move_to");
1734
+    #endif
1735
+
1713 1736
   #else
1714 1737
 
1715 1738
     // If Z needs to raise, do it before moving XY

Завантаження…
Відмінити
Зберегти