Просмотр исходного кода

Merge pull request #4379 from thinkyhead/rc_blocking_move_logging

Additional logging of do_blocking_move_to
Scott Lahteine 9 лет назад
Родитель
Сommit
8099ee51a5
1 измененных файлов: 24 добавлений и 1 удалений
  1. 24
    1
      Marlin/Marlin_main.cpp

+ 24
- 1
Marlin/Marlin_main.cpp Просмотреть файл

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

Загрузка…
Отмена
Сохранить