Browse Source

Use MANUAL_PROBE_START_Z for UBL manual probing (#20160)

Jason Smith 4 years ago
parent
commit
39305aa47c
No account linked to committer's email address

+ 1
- 1
Marlin/src/feature/bedlevel/ubl/ubl.h View File

@@ -62,7 +62,7 @@ class unified_bed_leveling {
62 62
     #if IS_NEWPANEL
63 63
       static void move_z_with_encoder(const float &multiplier);
64 64
       static float measure_point_with_encoder();
65
-      static float measure_business_card_thickness(float in_height);
65
+      static float measure_business_card_thickness();
66 66
       static void manually_probe_remaining_mesh(const xy_pos_t&, const float&, const float&, const bool) _O0;
67 67
       static void fine_tune_mesh(const xy_pos_t &pos, const bool do_ubl_mesh_map) _O0;
68 68
     #endif

+ 3
- 3
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp View File

@@ -484,7 +484,7 @@
484 484
             }
485 485
 
486 486
             if (parser.seen('B')) {
487
-              g29_card_thickness = parser.has_value() ? parser.value_float() : measure_business_card_thickness(float(Z_CLEARANCE_BETWEEN_PROBES));
487
+              g29_card_thickness = parser.has_value() ? parser.value_float() : measure_business_card_thickness();
488 488
               if (ABS(g29_card_thickness) > 1.5f) {
489 489
                 SERIAL_ECHOLNPGM("?Error in Business Card measurement.");
490 490
                 return;
@@ -837,11 +837,11 @@
837 837
 
838 838
     static void echo_and_take_a_measurement() { SERIAL_ECHOLNPGM(" and take a measurement."); }
839 839
 
840
-    float unified_bed_leveling::measure_business_card_thickness(float in_height) {
840
+    float unified_bed_leveling::measure_business_card_thickness() {
841 841
       ui.capture();
842 842
       save_ubl_active_state_and_disable();   // Disable bed level correction for probing
843 843
 
844
-      do_blocking_move_to(0.5f * (MESH_MAX_X - (MESH_MIN_X)), 0.5f * (MESH_MAX_Y - (MESH_MIN_Y)), in_height);
844
+      do_blocking_move_to(0.5f * (MESH_MAX_X - (MESH_MIN_X)), 0.5f * (MESH_MAX_Y - (MESH_MIN_Y)), MANUAL_PROBE_START_Z);
845 845
         //, _MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS]) * 0.5f);
846 846
       planner.synchronize();
847 847
 

+ 4
- 0
Marlin/src/inc/Conditionals_post.h View File

@@ -2603,6 +2603,10 @@
2603 2603
   #endif
2604 2604
 #endif
2605 2605
 
2606
+#if !defined(MANUAL_PROBE_START_Z) && defined(Z_CLEARANCE_BETWEEN_PROBES)
2607
+  #define MANUAL_PROBE_START_Z Z_CLEARANCE_BETWEEN_PROBES
2608
+#endif
2609
+
2606 2610
 #ifndef __SAM3X8E__ //todo: hal: broken hal encapsulation
2607 2611
   #undef UI_VOLTAGE_LEVEL
2608 2612
   #undef RADDS_DISPLAY

Loading…
Cancel
Save