Browse Source

Merge pull request #4379 from thinkyhead/rc_blocking_move_logging

Additional logging of do_blocking_move_to
Scott Lahteine 9 years ago
parent
commit
8099ee51a5
1 changed files with 24 additions and 1 deletions
  1. 24
    1
      Marlin/Marlin_main.cpp

+ 24
- 1
Marlin/Marlin_main.cpp View File

1667
   float old_feedrate_mm_m = feedrate_mm_m;
1667
   float old_feedrate_mm_m = feedrate_mm_m;
1668
 
1668
 
1669
   #if ENABLED(DEBUG_LEVELING_FEATURE)
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
   #endif
1671
   #endif
1672
 
1672
 
1673
   #if ENABLED(DELTA)
1673
   #if ENABLED(DELTA)
1676
 
1676
 
1677
     set_destination_to_current();          // sync destination at the start
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
     // when in the danger zone
1683
     // when in the danger zone
1680
     if (current_position[Z_AXIS] > delta_clip_start_height) {
1684
     if (current_position[Z_AXIS] > delta_clip_start_height) {
1681
       if (z > delta_clip_start_height) {   // staying in the danger zone
1685
       if (z > delta_clip_start_height) {   // staying in the danger zone
1683
         destination[Y_AXIS] = y;
1687
         destination[Y_AXIS] = y;
1684
         destination[Z_AXIS] = z;
1688
         destination[Z_AXIS] = z;
1685
         prepare_move_to_destination_raw(); // set_current_to_destination
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
         return;
1693
         return;
1687
       }
1694
       }
1688
       else {
1695
       else {
1689
         destination[Z_AXIS] = delta_clip_start_height;
1696
         destination[Z_AXIS] = delta_clip_start_height;
1690
         prepare_move_to_destination_raw(); // set_current_to_destination
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
     if (z > current_position[Z_AXIS]) {    // raising?
1704
     if (z > current_position[Z_AXIS]) {    // raising?
1695
       destination[Z_AXIS] = z;
1705
       destination[Z_AXIS] = z;
1696
       prepare_move_to_destination_raw();   // set_current_to_destination
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
     destination[X_AXIS] = x;
1712
     destination[X_AXIS] = x;
1700
     destination[Y_AXIS] = y;
1713
     destination[Y_AXIS] = y;
1701
     prepare_move_to_destination();         // set_current_to_destination
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
     if (z < current_position[Z_AXIS]) {    // lowering?
1719
     if (z < current_position[Z_AXIS]) {    // lowering?
1704
       destination[Z_AXIS] = z;
1720
       destination[Z_AXIS] = z;
1705
       prepare_move_to_destination_raw();   // set_current_to_destination
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
   #else
1731
   #else
1709
 
1732
 
1710
     // If Z needs to raise, do it before moving XY
1733
     // If Z needs to raise, do it before moving XY

Loading…
Cancel
Save