Browse Source

Add PROBE_Y_FIRST option for probe order

Scott Lahteine 9 years ago
parent
commit
2d2c9bdf92

+ 3
- 0
Marlin/Configuration.h View File

789
   // The Z probe minimum outer margin (to validate G29 parameters).
789
   // The Z probe minimum outer margin (to validate G29 parameters).
790
   #define MIN_PROBE_EDGE 10
790
   #define MIN_PROBE_EDGE 10
791
 
791
 
792
+  // Probe along the Y axis, advancing X after each column
793
+  //#define PROBE_Y_FIRST
794
+
792
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
795
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
793
 
796
 
794
   // 3 arbitrary points to probe.
797
   // 3 arbitrary points to probe.

+ 31
- 13
Marlin/Marlin_main.cpp View File

3771
 
3771
 
3772
       #endif // AUTO_BED_LEVELING_LINEAR
3772
       #endif // AUTO_BED_LEVELING_LINEAR
3773
 
3773
 
3774
-      bool zig = abl_grid_points_y & 1; //always end at [RIGHT_PROBE_BED_POSITION, BACK_PROBE_BED_POSITION]
3774
+      #if ENABLED(PROBE_Y_FIRST)
3775
+        #define PR_OUTER_VAR xCount
3776
+        #define PR_OUTER_END abl_grid_points_x
3777
+        #define PR_INNER_VAR yCount
3778
+        #define PR_INNER_END abl_grid_points_y
3779
+      #else
3780
+        #define PR_OUTER_VAR yCount
3781
+        #define PR_OUTER_END abl_grid_points_y
3782
+        #define PR_INNER_VAR xCount
3783
+        #define PR_INNER_END abl_grid_points_x
3784
+      #endif
3775
 
3785
 
3776
-      for (uint8_t yCount = 0; yCount < abl_grid_points_y; yCount++) {
3777
-        float yBase = front_probe_bed_position + yGridSpacing * yCount;
3778
-        yProbe = floor(yBase + (yBase < 0 ? 0 : 0.5));
3786
+      #if ENABLED(MAKERARM_SCARA)
3787
+        bool zig = true;
3788
+      #else
3789
+        bool zig = PR_OUTER_END & 1; //always end at [RIGHT_PROBE_BED_POSITION, BACK_PROBE_BED_POSITION]
3790
+      #endif
3779
 
3791
 
3780
-        int8_t xStart, xStop, xInc;
3792
+      for (uint8_t PR_OUTER_VAR = 0; PR_OUTER_VAR < PR_OUTER_END; PR_OUTER_VAR++) {
3793
+
3794
+        int8_t inStart, inStop, inInc;
3781
 
3795
 
3782
         if (zig) {
3796
         if (zig) {
3783
-          xStart = 0;
3784
-          xStop = abl_grid_points_x;
3785
-          xInc = 1;
3797
+          inStart = 0;
3798
+          inStop = PR_INNER_END;
3799
+          inInc = 1;
3786
         }
3800
         }
3787
         else {
3801
         else {
3788
-          xStart = abl_grid_points_x - 1;
3789
-          xStop = -1;
3790
-          xInc = -1;
3802
+          inStart = PR_INNER_END - 1;
3803
+          inStop = -1;
3804
+          inInc = -1;
3791
         }
3805
         }
3792
 
3806
 
3793
         zig = !zig;
3807
         zig = !zig;
3794
 
3808
 
3795
-        for (int8_t xCount = xStart; xCount != xStop; xCount += xInc) {
3796
-          float xBase = left_probe_bed_position + xGridSpacing * xCount;
3809
+        for (int8_t PR_INNER_VAR = inStart; PR_INNER_VAR != inStop; PR_INNER_VAR += inInc) {
3810
+
3811
+          float xBase = left_probe_bed_position + xGridSpacing * xCount,
3812
+                yBase = front_probe_bed_position + yGridSpacing * yCount;
3813
+
3797
           xProbe = floor(xBase + (xBase < 0 ? 0 : 0.5));
3814
           xProbe = floor(xBase + (xBase < 0 ? 0 : 0.5));
3815
+          yProbe = floor(yBase + (yBase < 0 ? 0 : 0.5));
3798
 
3816
 
3799
           #if ENABLED(AUTO_BED_LEVELING_LINEAR)
3817
           #if ENABLED(AUTO_BED_LEVELING_LINEAR)
3800
             indexIntoAB[xCount][yCount] = ++probePointCounter;
3818
             indexIntoAB[xCount][yCount] = ++probePointCounter;

+ 3
- 0
Marlin/example_configurations/Cartesio/Configuration.h View File

789
   // The Z probe minimum outer margin (to validate G29 parameters).
789
   // The Z probe minimum outer margin (to validate G29 parameters).
790
   #define MIN_PROBE_EDGE 10
790
   #define MIN_PROBE_EDGE 10
791
 
791
 
792
+  // Probe along the Y axis, advancing X after each column
793
+  //#define PROBE_Y_FIRST
794
+
792
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
795
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
793
 
796
 
794
   // 3 arbitrary points to probe.
797
   // 3 arbitrary points to probe.

+ 3
- 0
Marlin/example_configurations/Felix/Configuration.h View File

772
   // The Z probe minimum outer margin (to validate G29 parameters).
772
   // The Z probe minimum outer margin (to validate G29 parameters).
773
   #define MIN_PROBE_EDGE 10
773
   #define MIN_PROBE_EDGE 10
774
 
774
 
775
+  // Probe along the Y axis, advancing X after each column
776
+  //#define PROBE_Y_FIRST
777
+
775
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
778
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
776
 
779
 
777
   // 3 arbitrary points to probe.
780
   // 3 arbitrary points to probe.

+ 3
- 0
Marlin/example_configurations/Felix/DUAL/Configuration.h View File

770
   // The Z probe minimum outer margin (to validate G29 parameters).
770
   // The Z probe minimum outer margin (to validate G29 parameters).
771
   #define MIN_PROBE_EDGE 10
771
   #define MIN_PROBE_EDGE 10
772
 
772
 
773
+  // Probe along the Y axis, advancing X after each column
774
+  //#define PROBE_Y_FIRST
775
+
773
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
776
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
774
 
777
 
775
   // 3 arbitrary points to probe.
778
   // 3 arbitrary points to probe.

+ 3
- 0
Marlin/example_configurations/Hephestos/Configuration.h View File

781
   // The Z probe minimum outer margin (to validate G29 parameters).
781
   // The Z probe minimum outer margin (to validate G29 parameters).
782
   #define MIN_PROBE_EDGE 10
782
   #define MIN_PROBE_EDGE 10
783
 
783
 
784
+  // Probe along the Y axis, advancing X after each column
785
+  //#define PROBE_Y_FIRST
786
+
784
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
787
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
785
 
788
 
786
   // 3 arbitrary points to probe.
789
   // 3 arbitrary points to probe.

+ 3
- 0
Marlin/example_configurations/Hephestos_2/Configuration.h View File

783
   // The Z probe minimum outer margin (to validate G29 parameters).
783
   // The Z probe minimum outer margin (to validate G29 parameters).
784
   #define MIN_PROBE_EDGE 10
784
   #define MIN_PROBE_EDGE 10
785
 
785
 
786
+  // Probe along the Y axis, advancing X after each column
787
+  //#define PROBE_Y_FIRST
788
+
786
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
789
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
787
 
790
 
788
   // 3 arbitrary points to probe.
791
   // 3 arbitrary points to probe.

+ 3
- 0
Marlin/example_configurations/K8200/Configuration.h View File

806
   // The Z probe minimum outer margin (to validate G29 parameters).
806
   // The Z probe minimum outer margin (to validate G29 parameters).
807
   #define MIN_PROBE_EDGE 10
807
   #define MIN_PROBE_EDGE 10
808
 
808
 
809
+  // Probe along the Y axis, advancing X after each column
810
+  //#define PROBE_Y_FIRST
811
+
809
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
812
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
810
 
813
 
811
   // 3 arbitrary points to probe.
814
   // 3 arbitrary points to probe.

+ 3
- 0
Marlin/example_configurations/K8400/Configuration.h View File

789
   // The Z probe minimum outer margin (to validate G29 parameters).
789
   // The Z probe minimum outer margin (to validate G29 parameters).
790
   #define MIN_PROBE_EDGE 10
790
   #define MIN_PROBE_EDGE 10
791
 
791
 
792
+  // Probe along the Y axis, advancing X after each column
793
+  //#define PROBE_Y_FIRST
794
+
792
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
795
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
793
 
796
 
794
   // 3 arbitrary points to probe.
797
   // 3 arbitrary points to probe.

+ 3
- 0
Marlin/example_configurations/K8400/Dual-head/Configuration.h View File

789
   // The Z probe minimum outer margin (to validate G29 parameters).
789
   // The Z probe minimum outer margin (to validate G29 parameters).
790
   #define MIN_PROBE_EDGE 10
790
   #define MIN_PROBE_EDGE 10
791
 
791
 
792
+  // Probe along the Y axis, advancing X after each column
793
+  //#define PROBE_Y_FIRST
794
+
792
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
795
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
793
 
796
 
794
   // 3 arbitrary points to probe.
797
   // 3 arbitrary points to probe.

+ 3
- 0
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h View File

789
   // The Z probe minimum outer margin (to validate G29 parameters).
789
   // The Z probe minimum outer margin (to validate G29 parameters).
790
   #define MIN_PROBE_EDGE 10
790
   #define MIN_PROBE_EDGE 10
791
 
791
 
792
+  // Probe along the Y axis, advancing X after each column
793
+  //#define PROBE_Y_FIRST
794
+
792
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
795
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
793
 
796
 
794
   // 3 arbitrary points to probe.
797
   // 3 arbitrary points to probe.

+ 3
- 0
Marlin/example_configurations/RigidBot/Configuration.h View File

787
   // The Z probe minimum outer margin (to validate G29 parameters).
787
   // The Z probe minimum outer margin (to validate G29 parameters).
788
   #define MIN_PROBE_EDGE 10
788
   #define MIN_PROBE_EDGE 10
789
 
789
 
790
+  // Probe along the Y axis, advancing X after each column
791
+  //#define PROBE_Y_FIRST
792
+
790
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
793
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
791
 
794
 
792
   // 3 arbitrary points to probe.
795
   // 3 arbitrary points to probe.

+ 3
- 0
Marlin/example_configurations/SCARA/Configuration.h View File

804
   // The Z probe minimum outer margin (to validate G29 parameters).
804
   // The Z probe minimum outer margin (to validate G29 parameters).
805
   #define MIN_PROBE_EDGE 10
805
   #define MIN_PROBE_EDGE 10
806
 
806
 
807
+  // Probe along the Y axis, advancing X after each column
808
+  //#define PROBE_Y_FIRST
809
+
807
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
810
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
808
 
811
 
809
   // 3 arbitrary points to probe.
812
   // 3 arbitrary points to probe.

+ 3
- 0
Marlin/example_configurations/TAZ4/Configuration.h View File

810
   // The Z probe minimum outer margin (to validate G29 parameters).
810
   // The Z probe minimum outer margin (to validate G29 parameters).
811
   #define MIN_PROBE_EDGE 10
811
   #define MIN_PROBE_EDGE 10
812
 
812
 
813
+  // Probe along the Y axis, advancing X after each column
814
+  //#define PROBE_Y_FIRST
815
+
813
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
816
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
814
 
817
 
815
   // 3 arbitrary points to probe.
818
   // 3 arbitrary points to probe.

+ 3
- 0
Marlin/example_configurations/WITBOX/Configuration.h View File

781
   // The Z probe minimum outer margin (to validate G29 parameters).
781
   // The Z probe minimum outer margin (to validate G29 parameters).
782
   #define MIN_PROBE_EDGE 10
782
   #define MIN_PROBE_EDGE 10
783
 
783
 
784
+  // Probe along the Y axis, advancing X after each column
785
+  //#define PROBE_Y_FIRST
786
+
784
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
787
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
785
 
788
 
786
   // 3 arbitrary points to probe.
789
   // 3 arbitrary points to probe.

+ 3
- 0
Marlin/example_configurations/adafruit/ST7565/Configuration.h View File

789
   // The Z probe minimum outer margin (to validate G29 parameters).
789
   // The Z probe minimum outer margin (to validate G29 parameters).
790
   #define MIN_PROBE_EDGE 10
790
   #define MIN_PROBE_EDGE 10
791
 
791
 
792
+  // Probe along the Y axis, advancing X after each column
793
+  //#define PROBE_Y_FIRST
794
+
792
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
795
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
793
 
796
 
794
   // 3 arbitrary points to probe.
797
   // 3 arbitrary points to probe.

+ 3
- 0
Marlin/example_configurations/delta/biv2.5/Configuration.h View File

881
   // The Z probe minimum outer margin (to validate G29 parameters).
881
   // The Z probe minimum outer margin (to validate G29 parameters).
882
   #define MIN_PROBE_EDGE 10
882
   #define MIN_PROBE_EDGE 10
883
 
883
 
884
+  // Probe along the Y axis, advancing X after each column
885
+  //#define PROBE_Y_FIRST
886
+
884
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
887
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
885
 
888
 
886
   // 3 arbitrary points to probe.
889
   // 3 arbitrary points to probe.

+ 3
- 0
Marlin/example_configurations/delta/generic/Configuration.h View File

875
   // The Z probe minimum outer margin (to validate G29 parameters).
875
   // The Z probe minimum outer margin (to validate G29 parameters).
876
   #define MIN_PROBE_EDGE 10
876
   #define MIN_PROBE_EDGE 10
877
 
877
 
878
+  // Probe along the Y axis, advancing X after each column
879
+  //#define PROBE_Y_FIRST
880
+
878
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
881
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
879
 
882
 
880
   // 3 arbitrary points to probe.
883
   // 3 arbitrary points to probe.

+ 3
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

878
   // The Z probe minimum outer margin (to validate G29 parameters).
878
   // The Z probe minimum outer margin (to validate G29 parameters).
879
   #define MIN_PROBE_EDGE 10
879
   #define MIN_PROBE_EDGE 10
880
 
880
 
881
+  // Probe along the Y axis, advancing X after each column
882
+  //#define PROBE_Y_FIRST
883
+
881
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
884
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
882
 
885
 
883
   // 3 arbitrary points to probe.
886
   // 3 arbitrary points to probe.

+ 3
- 0
Marlin/example_configurations/delta/kossel_pro/Configuration.h View File

879
   // The Z probe minimum outer margin (to validate G29 parameters).
879
   // The Z probe minimum outer margin (to validate G29 parameters).
880
   #define MIN_PROBE_EDGE 10
880
   #define MIN_PROBE_EDGE 10
881
 
881
 
882
+  // Probe along the Y axis, advancing X after each column
883
+  //#define PROBE_Y_FIRST
884
+
882
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
885
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
883
 
886
 
884
   // 3 arbitrary points to probe.
887
   // 3 arbitrary points to probe.

+ 3
- 0
Marlin/example_configurations/delta/kossel_xl/Configuration.h View File

881
   // The Z probe minimum outer margin (to validate G29 parameters).
881
   // The Z probe minimum outer margin (to validate G29 parameters).
882
   #define MIN_PROBE_EDGE 10
882
   #define MIN_PROBE_EDGE 10
883
 
883
 
884
+  // Probe along the Y axis, advancing X after each column
885
+  //#define PROBE_Y_FIRST
886
+
884
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
887
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
885
 
888
 
886
   // 3 arbitrary points to probe.
889
   // 3 arbitrary points to probe.

+ 3
- 0
Marlin/example_configurations/makibox/Configuration.h View File

792
   // The Z probe minimum outer margin (to validate G29 parameters).
792
   // The Z probe minimum outer margin (to validate G29 parameters).
793
   #define MIN_PROBE_EDGE 10
793
   #define MIN_PROBE_EDGE 10
794
 
794
 
795
+  // Probe along the Y axis, advancing X after each column
796
+  //#define PROBE_Y_FIRST
797
+
795
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
798
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
796
 
799
 
797
   // 3 arbitrary points to probe.
800
   // 3 arbitrary points to probe.

+ 3
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

785
   // The Z probe minimum outer margin (to validate G29 parameters).
785
   // The Z probe minimum outer margin (to validate G29 parameters).
786
   #define MIN_PROBE_EDGE 10
786
   #define MIN_PROBE_EDGE 10
787
 
787
 
788
+  // Probe along the Y axis, advancing X after each column
789
+  //#define PROBE_Y_FIRST
790
+
788
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
791
 #elif ENABLED(AUTO_BED_LEVELING_3POINT)
789
 
792
 
790
   // 3 arbitrary points to probe.
793
   // 3 arbitrary points to probe.

Loading…
Cancel
Save