Browse Source

Double-touch debugging

Scott Lahteine 8 years ago
parent
commit
2febd8ec82
1 changed files with 13 additions and 0 deletions
  1. 13
    0
      Marlin/Marlin_main.cpp

+ 13
- 0
Marlin/Marlin_main.cpp View File

2027
       // Do a first probe at the fast speed
2027
       // Do a first probe at the fast speed
2028
       do_probe_move(-(Z_MAX_LENGTH) - 10, Z_PROBE_SPEED_FAST);
2028
       do_probe_move(-(Z_MAX_LENGTH) - 10, Z_PROBE_SPEED_FAST);
2029
 
2029
 
2030
+      #if ENABLED(DEBUG_LEVELING_FEATURE)
2031
+        float first_probe_z = current_position[Z_AXIS];
2032
+        if (DEBUGGING(LEVELING))
2033
+          SERIAL_ECHOPAIR("1st Probe Z:", first_probe_z);
2034
+      #endif
2035
+
2030
       // move up by the bump distance
2036
       // move up by the bump distance
2031
       do_blocking_move_to_z(current_position[Z_AXIS] + home_bump_mm(Z_AXIS), MMM_TO_MMS(Z_PROBE_SPEED_FAST));
2037
       do_blocking_move_to_z(current_position[Z_AXIS] + home_bump_mm(Z_AXIS), MMM_TO_MMS(Z_PROBE_SPEED_FAST));
2032
 
2038
 
2047
       if (DEBUGGING(LEVELING)) DEBUG_POS("<<< run_z_probe", current_position);
2053
       if (DEBUGGING(LEVELING)) DEBUG_POS("<<< run_z_probe", current_position);
2048
     #endif
2054
     #endif
2049
 
2055
 
2056
+    // Debug: compare probe heights
2057
+    #if ENABLED(PROBE_DOUBLE_TOUCH) && ENABLED(DEBUG_LEVELING_FEATURE)
2058
+      if (DEBUGGING(LEVELING)) {
2059
+        SERIAL_ECHOPAIR("2nd Probe Z:", current_position[Z_AXIS]);
2060
+        SERIAL_ECHOLNPAIR(" Discrepancy:", first_probe_z - current_position[Z_AXIS]);
2061
+      }
2062
+    #endif
2050
     return current_position[Z_AXIS];
2063
     return current_position[Z_AXIS];
2051
   }
2064
   }
2052
 
2065
 

Loading…
Cancel
Save