Bläddra i källkod

Add MANUAL_PROBE_START_Z for manual probing

Scott Lahteine 6 år sedan
förälder
incheckning
2106fa26b1

+ 1
- 0
Marlin/Configuration.h Visa fil

699
  * or (with LCD_BED_LEVELING) the LCD controller.
699
  * or (with LCD_BED_LEVELING) the LCD controller.
700
  */
700
  */
701
 //#define PROBE_MANUALLY
701
 //#define PROBE_MANUALLY
702
+//#define MANUAL_PROBE_START_Z 0.2
702
 
703
 
703
 /**
704
 /**
704
  * A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
705
  * A Fix-Mounted Probe either doesn't deploy or needs manual deployment.

+ 1
- 0
Marlin/src/config/default/Configuration.h Visa fil

699
  * or (with LCD_BED_LEVELING) the LCD controller.
699
  * or (with LCD_BED_LEVELING) the LCD controller.
700
  */
700
  */
701
 //#define PROBE_MANUALLY
701
 //#define PROBE_MANUALLY
702
+//#define MANUAL_PROBE_START_Z 0.2
702
 
703
 
703
 /**
704
 /**
704
  * A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
705
  * A Fix-Mounted Probe either doesn't deploy or needs manual deployment.

+ 8
- 1
Marlin/src/feature/bedlevel/bedlevel.cpp Visa fil

266
 
266
 
267
   void _manual_goto_xy(const float &rx, const float &ry) {
267
   void _manual_goto_xy(const float &rx, const float &ry) {
268
 
268
 
269
-    #if MANUAL_PROBE_HEIGHT > 0
269
+    #ifdef MANUAL_PROBE_START_Z
270
+      #if MANUAL_PROBE_HEIGHT > 0
271
+        do_blocking_move_to(rx, ry, MANUAL_PROBE_HEIGHT);
272
+        do_blocking_move_to_z(MAX(0,MANUAL_PROBE_START_Z);
273
+      #else
274
+        do_blocking_move_to(rx, ry, MAX(0,MANUAL_PROBE_START_Z);
275
+      #endif
276
+    #elif MANUAL_PROBE_HEIGHT > 0
270
       const float prev_z = current_position[Z_AXIS];
277
       const float prev_z = current_position[Z_AXIS];
271
       do_blocking_move_to(rx, ry, MANUAL_PROBE_HEIGHT);
278
       do_blocking_move_to(rx, ry, MANUAL_PROBE_HEIGHT);
272
       do_blocking_move_to_z(prev_z);
279
       do_blocking_move_to_z(prev_z);

Laddar…
Avbryt
Spara