Browse Source

Add BABYSTEP_ZPROBE_OFFSET as an optional feature

Scott Lahteine 7 years ago
parent
commit
52c3ace102

+ 1
- 0
Marlin/Configuration_adv.h View File

@@ -585,6 +585,7 @@
585 585
   #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
586 586
   #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
587 587
   #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
588
+  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
588 589
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
589 590
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
590 591
                                         // Note: Extra time may be added to mitigate controller latency.

+ 2
- 2
Marlin/Marlin_main.cpp View File

@@ -7973,7 +7973,7 @@ inline void gcode_M503() {
7973 7973
 
7974 7974
     if (!isnan(last_zoffset)) {
7975 7975
 
7976
-      #if ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(BABYSTEPPING)
7976
+      #if ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(BABYSTEP_ZPROBE_OFFSET)
7977 7977
         const float diff = zprobe_zoffset - last_zoffset;
7978 7978
       #endif
7979 7979
 
@@ -7989,7 +7989,7 @@ inline void gcode_M503() {
7989 7989
         #endif
7990 7990
       #endif
7991 7991
 
7992
-      #if ENABLED(BABYSTEPPING)
7992
+      #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
7993 7993
         if (!no_babystep && planner.abl_enabled)
7994 7994
           thermalManager.babystep_axis(Z_AXIS, -lround(diff * planner.axis_steps_per_mm[Z_AXIS]));
7995 7995
       #else

+ 4
- 4
Marlin/SanityCheck.h View File

@@ -262,12 +262,12 @@
262 262
 #if ENABLED(BABYSTEPPING)
263 263
   #if DISABLED(ULTRA_LCD)
264 264
     #error "BABYSTEPPING requires an LCD controller."
265
-  #endif
266
-  #if ENABLED(SCARA)
265
+  #elif ENABLED(SCARA)
267 266
     #error "BABYSTEPPING is not implemented for SCARA yet."
268
-  #endif
269
-  #if ENABLED(DELTA) && ENABLED(BABYSTEP_XY)
267
+  #elif ENABLED(DELTA) && ENABLED(BABYSTEP_XY)
270 268
     #error "BABYSTEPPING only implemented for Z axis on deltabots."
269
+  #elif ENABLED(BABYSTEP_ZPROBE_OFFSET) && !HAS_BED_PROBE
270
+    #error "BABYSTEP_ZPROBE_OFFSET requires a probe."
271 271
   #endif
272 272
 #endif
273 273
 

+ 1
- 0
Marlin/example_configurations/Cartesio/Configuration_adv.h View File

@@ -582,6 +582,7 @@
582 582
   #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
583 583
   #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
584 584
   #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
585
+  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
585 586
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
586 587
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
587 588
                                         // Note: Extra time may be added to mitigate controller latency.

+ 1
- 0
Marlin/example_configurations/Felix/Configuration_adv.h View File

@@ -582,6 +582,7 @@
582 582
   #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
583 583
   #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
584 584
   #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
585
+  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
585 586
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
586 587
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
587 588
                                         // Note: Extra time may be added to mitigate controller latency.

+ 1
- 0
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

@@ -582,6 +582,7 @@
582 582
   #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
583 583
   #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
584 584
   #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
585
+  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
585 586
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
586 587
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
587 588
                                         // Note: Extra time may be added to mitigate controller latency.

+ 1
- 0
Marlin/example_configurations/Hephestos_2/Configuration_adv.h View File

@@ -566,6 +566,7 @@
566 566
   #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
567 567
   #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
568 568
   #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
569
+  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
569 570
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
570 571
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
571 572
                                         // Note: Extra time may be added to mitigate controller latency.

+ 1
- 0
Marlin/example_configurations/K8200/Configuration_adv.h View File

@@ -595,6 +595,7 @@
595 595
   #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
596 596
   #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
597 597
   #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
598
+  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
598 599
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
599 600
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
600 601
                                         // Note: Extra time may be added to mitigate controller latency.

+ 1
- 0
Marlin/example_configurations/K8400/Configuration_adv.h View File

@@ -582,6 +582,7 @@
582 582
   #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
583 583
   #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
584 584
   #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
585
+  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
585 586
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
586 587
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
587 588
                                         // Note: Extra time may be added to mitigate controller latency.

+ 1
- 0
Marlin/example_configurations/RigidBot/Configuration_adv.h View File

@@ -582,6 +582,7 @@
582 582
   #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
583 583
   #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
584 584
   #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
585
+  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
585 586
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
586 587
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
587 588
                                         // Note: Extra time may be added to mitigate controller latency.

+ 1
- 0
Marlin/example_configurations/SCARA/Configuration_adv.h View File

@@ -582,6 +582,7 @@
582 582
   #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
583 583
   #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
584 584
   #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
585
+  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
585 586
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
586 587
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
587 588
                                         // Note: Extra time may be added to mitigate controller latency.

+ 1
- 0
Marlin/example_configurations/TAZ4/Configuration_adv.h View File

@@ -590,6 +590,7 @@
590 590
   #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
591 591
   #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
592 592
   #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
593
+  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
593 594
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
594 595
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
595 596
                                         // Note: Extra time may be added to mitigate controller latency.

+ 1
- 0
Marlin/example_configurations/TinyBoy2/Configuration_adv.h View File

@@ -585,6 +585,7 @@
585 585
   #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
586 586
   #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
587 587
   #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
588
+  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
588 589
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
589 590
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
590 591
                                         // Note: Extra time may be added to mitigate controller latency.

+ 1
- 0
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

@@ -582,6 +582,7 @@
582 582
   #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
583 583
   #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
584 584
   #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
585
+  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
585 586
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
586 587
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
587 588
                                         // Note: Extra time may be added to mitigate controller latency.

+ 1
- 0
Marlin/example_configurations/delta/flsun_kossel_mini/Configuration_adv.h View File

@@ -587,6 +587,7 @@
587 587
   #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
588 588
   #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
589 589
   #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
590
+  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
590 591
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
591 592
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
592 593
                                         // Note: Extra time may be added to mitigate controller latency.

+ 1
- 0
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

@@ -602,6 +602,7 @@
602 602
   #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
603 603
   #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
604 604
   #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
605
+  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
605 606
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
606 607
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
607 608
                                         // Note: Extra time may be added to mitigate controller latency.

+ 1
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

@@ -602,6 +602,7 @@
602 602
   #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
603 603
   #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
604 604
   #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
605
+  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
605 606
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
606 607
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
607 608
                                         // Note: Extra time may be added to mitigate controller latency.

+ 1
- 0
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h View File

@@ -589,6 +589,7 @@
589 589
   #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
590 590
   #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
591 591
   #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
592
+  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
592 593
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
593 594
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
594 595
                                         // Note: Extra time may be added to mitigate controller latency.

+ 1
- 0
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h View File

@@ -584,6 +584,7 @@
584 584
   #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
585 585
   #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
586 586
   #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
587
+  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
587 588
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
588 589
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
589 590
                                         // Note: Extra time may be added to mitigate controller latency.

+ 1
- 0
Marlin/example_configurations/makibox/Configuration_adv.h View File

@@ -582,6 +582,7 @@
582 582
   #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
583 583
   #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
584 584
   #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
585
+  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
585 586
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
586 587
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
587 588
                                         // Note: Extra time may be added to mitigate controller latency.

+ 1
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

@@ -582,6 +582,7 @@
582 582
   #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
583 583
   #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
584 584
   #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
585
+  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
585 586
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
586 587
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
587 588
                                         // Note: Extra time may be added to mitigate controller latency.

+ 1
- 0
Marlin/example_configurations/wt150/Configuration_adv.h View File

@@ -585,6 +585,7 @@
585 585
   #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
586 586
   #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
587 587
   #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
588
+  //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
588 589
   //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
589 590
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
590 591
                                         // Note: Extra time may be added to mitigate controller latency.

+ 6
- 8
Marlin/ultralcd.cpp View File

@@ -1086,8 +1086,8 @@ void kill_screen(const char* lcd_msg) {
1086 1086
       #if ENABLED(BABYSTEP_XY)
1087 1087
         MENU_ITEM(submenu, MSG_BABYSTEP_X, lcd_babystep_x);
1088 1088
         MENU_ITEM(submenu, MSG_BABYSTEP_Y, lcd_babystep_y);
1089
-      #endif //BABYSTEP_XY
1090
-      #if !HAS_BED_PROBE
1089
+      #endif
1090
+      #if DISABLED(BABYSTEP_ZPROBE_OFFSET)
1091 1091
         MENU_ITEM(submenu, MSG_BABYSTEP_Z, lcd_babystep_z);
1092 1092
       #endif
1093 1093
     #endif
@@ -2409,12 +2409,10 @@ void kill_screen(const char* lcd_msg) {
2409 2409
   void lcd_control_motion_menu() {
2410 2410
     START_MENU();
2411 2411
     MENU_BACK(MSG_CONTROL);
2412
-    #if HAS_BED_PROBE
2413
-      #if ENABLED(BABYSTEPPING)
2414
-        MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
2415
-      #else
2416
-        MENU_ITEM_EDIT_CALLBACK(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX, refresh_zprobe_zoffset);
2417
-      #endif
2412
+    #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
2413
+      MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
2414
+    #elif HAS_BED_PROBE
2415
+      MENU_ITEM_EDIT_CALLBACK(float32, MSG_ZPROBE_ZOFFSET, &zprobe_zoffset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX, refresh_zprobe_zoffset);
2418 2416
     #endif
2419 2417
     // Manual bed leveling, Bed Z:
2420 2418
     #if ENABLED(MESH_BED_LEVELING) && ENABLED(LCD_BED_LEVELING)

Loading…
Cancel
Save