Browse Source

Additional logging of do_blocking_move_to

Scott Lahteine 9 years ago
parent
commit
ad16d5019e
1 changed files with 24 additions and 1 deletions
  1. 24
    1
      Marlin/Marlin_main.cpp

+ 24
- 1
Marlin/Marlin_main.cpp View File

1672
   float old_feedrate_mm_m = feedrate_mm_m;
1672
   float old_feedrate_mm_m = feedrate_mm_m;
1673
 
1673
 
1674
   #if ENABLED(DEBUG_LEVELING_FEATURE)
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
   #endif
1676
   #endif
1677
 
1677
 
1678
   #if ENABLED(DELTA)
1678
   #if ENABLED(DELTA)
1681
 
1681
 
1682
     set_destination_to_current();          // sync destination at the start
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
     // when in the danger zone
1688
     // when in the danger zone
1685
     if (current_position[Z_AXIS] > delta_clip_start_height) {
1689
     if (current_position[Z_AXIS] > delta_clip_start_height) {
1686
       if (z > delta_clip_start_height) {   // staying in the danger zone
1690
       if (z > delta_clip_start_height) {   // staying in the danger zone
1688
         destination[Y_AXIS] = y;
1692
         destination[Y_AXIS] = y;
1689
         destination[Z_AXIS] = z;
1693
         destination[Z_AXIS] = z;
1690
         prepare_move_to_destination_raw(); // set_current_to_destination
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
         return;
1698
         return;
1692
       }
1699
       }
1693
       else {
1700
       else {
1694
         destination[Z_AXIS] = delta_clip_start_height;
1701
         destination[Z_AXIS] = delta_clip_start_height;
1695
         prepare_move_to_destination_raw(); // set_current_to_destination
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
     if (z > current_position[Z_AXIS]) {    // raising?
1709
     if (z > current_position[Z_AXIS]) {    // raising?
1700
       destination[Z_AXIS] = z;
1710
       destination[Z_AXIS] = z;
1701
       prepare_move_to_destination_raw();   // set_current_to_destination
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
     destination[X_AXIS] = x;
1717
     destination[X_AXIS] = x;
1705
     destination[Y_AXIS] = y;
1718
     destination[Y_AXIS] = y;
1706
     prepare_move_to_destination();         // set_current_to_destination
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
     if (z < current_position[Z_AXIS]) {    // lowering?
1724
     if (z < current_position[Z_AXIS]) {    // lowering?
1709
       destination[Z_AXIS] = z;
1725
       destination[Z_AXIS] = z;
1710
       prepare_move_to_destination_raw();   // set_current_to_destination
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
   #else
1736
   #else
1714
 
1737
 
1715
     // If Z needs to raise, do it before moving XY
1738
     // If Z needs to raise, do it before moving XY

Loading…
Cancel
Save