Browse Source

Use extra G35 BLTouch HS Mode clearance in Tramming Wizard (#20057)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
qwewer0 4 years ago
parent
commit
c753d2b7f4
No account linked to committer's email address

+ 1
- 2
Marlin/src/gcode/bedlevel/G35.cpp View File

120
     // In BLTOUCH HS mode, the probe travels in a deployed state.
120
     // In BLTOUCH HS mode, the probe travels in a deployed state.
121
     // Users of G35 might have a badly misaligned bed, so raise Z by the
121
     // Users of G35 might have a badly misaligned bed, so raise Z by the
122
     // length of the deployed pin (BLTOUCH stroke < 7mm)
122
     // length of the deployed pin (BLTOUCH stroke < 7mm)
123
-    current_position.z = (Z_CLEARANCE_BETWEEN_PROBES) + (7 * ENABLED(BLTOUCH_HS_MODE));
124
-
123
+    do_blocking_move_to_z((Z_CLEARANCE_BETWEEN_PROBES) + TERN0(BLTOUCH_HS_MODE, 7));
125
     const float z_probed_height = probe.probe_at_point(screws_tilt_adjust_pos[i], PROBE_PT_RAISE, 0, true);
124
     const float z_probed_height = probe.probe_at_point(screws_tilt_adjust_pos[i], PROBE_PT_RAISE, 0, true);
126
 
125
 
127
     if (isnan(z_probed_height)) {
126
     if (isnan(z_probed_height)) {

+ 4
- 0
Marlin/src/lcd/menu/menu_tramming.cpp View File

43
 static uint8_t tram_index = 0;
43
 static uint8_t tram_index = 0;
44
 
44
 
45
 bool probe_single_point() {
45
 bool probe_single_point() {
46
+  // In BLTOUCH HS mode, the probe travels in a deployed state.
47
+  // Users of Tramming Wizard might have a badly misaligned bed, so raise Z by the
48
+  // length of the deployed pin (BLTOUCH stroke < 7mm)
49
+  do_blocking_move_to_z((Z_CLEARANCE_BETWEEN_PROBES) + TERN0(BLTOUCH_HS_MODE, 7));
46
   const float z_probed_height = probe.probe_at_point(screws_tilt_adjust_pos[tram_index], PROBE_PT_RAISE, 0, true);
50
   const float z_probed_height = probe.probe_at_point(screws_tilt_adjust_pos[tram_index], PROBE_PT_RAISE, 0, true);
47
   DEBUG_ECHOLNPAIR("probe_single_point: ", z_probed_height, "mm");
51
   DEBUG_ECHOLNPAIR("probe_single_point: ", z_probed_height, "mm");
48
   z_measured[tram_index] = z_probed_height;
52
   z_measured[tram_index] = z_probed_height;

+ 2
- 11
Marlin/src/module/probe.cpp View File

667
     if (bltouch.triggered()) bltouch._reset();
667
     if (bltouch.triggered()) bltouch._reset();
668
   #endif
668
   #endif
669
 
669
 
670
-  // TODO: Adapt for SCARA, where the offset rotates
671
-  xyz_pos_t npos = { rx, ry };
670
+  // On delta keep Z below clip height or do_blocking_move_to will abort
671
+  xyz_pos_t npos = { rx, ry, _MIN(TERN(DELTA, delta_clip_start_height, current_position.z), current_position.z) };
672
   if (probe_relative) {                                     // The given position is in terms of the probe
672
   if (probe_relative) {                                     // The given position is in terms of the probe
673
     if (!can_reach(npos)) {
673
     if (!can_reach(npos)) {
674
       if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Position Not Reachable");
674
       if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Position Not Reachable");
678
   }
678
   }
679
   else if (!position_is_reachable(npos)) return NAN;        // The given position is in terms of the nozzle
679
   else if (!position_is_reachable(npos)) return NAN;        // The given position is in terms of the nozzle
680
 
680
 
681
-  npos.z =
682
-    #if ENABLED(DELTA)
683
-      // Move below clip height or xy move will be aborted by do_blocking_move_to
684
-      _MIN(current_position.z, delta_clip_start_height)
685
-    #else
686
-      current_position.z
687
-    #endif
688
-  ;
689
-
690
   const float old_feedrate_mm_s = feedrate_mm_s;
681
   const float old_feedrate_mm_s = feedrate_mm_s;
691
   feedrate_mm_s = XY_PROBE_FEEDRATE_MM_S;
682
   feedrate_mm_s = XY_PROBE_FEEDRATE_MM_S;
692
 
683
 

Loading…
Cancel
Save