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
     #if IS_NEWPANEL
62
     #if IS_NEWPANEL
63
       static void move_z_with_encoder(const float &multiplier);
63
       static void move_z_with_encoder(const float &multiplier);
64
       static float measure_point_with_encoder();
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
       static void manually_probe_remaining_mesh(const xy_pos_t&, const float&, const float&, const bool) _O0;
66
       static void manually_probe_remaining_mesh(const xy_pos_t&, const float&, const float&, const bool) _O0;
67
       static void fine_tune_mesh(const xy_pos_t &pos, const bool do_ubl_mesh_map) _O0;
67
       static void fine_tune_mesh(const xy_pos_t &pos, const bool do_ubl_mesh_map) _O0;
68
     #endif
68
     #endif

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

484
             }
484
             }
485
 
485
 
486
             if (parser.seen('B')) {
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
               if (ABS(g29_card_thickness) > 1.5f) {
488
               if (ABS(g29_card_thickness) > 1.5f) {
489
                 SERIAL_ECHOLNPGM("?Error in Business Card measurement.");
489
                 SERIAL_ECHOLNPGM("?Error in Business Card measurement.");
490
                 return;
490
                 return;
837
 
837
 
838
     static void echo_and_take_a_measurement() { SERIAL_ECHOLNPGM(" and take a measurement."); }
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
       ui.capture();
841
       ui.capture();
842
       save_ubl_active_state_and_disable();   // Disable bed level correction for probing
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
         //, _MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS]) * 0.5f);
845
         //, _MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS]) * 0.5f);
846
       planner.synchronize();
846
       planner.synchronize();
847
 
847
 

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

2603
   #endif
2603
   #endif
2604
 #endif
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
 #ifndef __SAM3X8E__ //todo: hal: broken hal encapsulation
2610
 #ifndef __SAM3X8E__ //todo: hal: broken hal encapsulation
2607
   #undef UI_VOLTAGE_LEVEL
2611
   #undef UI_VOLTAGE_LEVEL
2608
   #undef RADDS_DISPLAY
2612
   #undef RADDS_DISPLAY

Loading…
Cancel
Save