Browse Source

Cleanup, comment zigzag

Scott Lahteine 8 years ago
parent
commit
73ce3a61c7
1 changed files with 6 additions and 8 deletions
  1. 6
    8
      Marlin/Marlin_main.cpp

+ 6
- 8
Marlin/Marlin_main.cpp View File

3783
         #define PR_INNER_END abl_grid_points_x
3783
         #define PR_INNER_END abl_grid_points_x
3784
       #endif
3784
       #endif
3785
 
3785
 
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
3786
+      bool zig = PR_OUTER_END & 1;  // Always end at RIGHT and BACK_PROBE_BED_POSITION
3791
 
3787
 
3788
+      // Outer loop is Y with PROBE_Y_FIRST disabled
3792
       for (uint8_t PR_OUTER_VAR = 0; PR_OUTER_VAR < PR_OUTER_END; PR_OUTER_VAR++) {
3789
       for (uint8_t PR_OUTER_VAR = 0; PR_OUTER_VAR < PR_OUTER_END; PR_OUTER_VAR++) {
3793
 
3790
 
3794
         int8_t inStart, inStop, inInc;
3791
         int8_t inStart, inStop, inInc;
3795
 
3792
 
3796
-        if (zig) {
3793
+        if (zig) { // away from origin
3797
           inStart = 0;
3794
           inStart = 0;
3798
           inStop = PR_INNER_END;
3795
           inStop = PR_INNER_END;
3799
           inInc = 1;
3796
           inInc = 1;
3800
         }
3797
         }
3801
-        else {
3798
+        else {     // towards origin
3802
           inStart = PR_INNER_END - 1;
3799
           inStart = PR_INNER_END - 1;
3803
           inStop = -1;
3800
           inStop = -1;
3804
           inInc = -1;
3801
           inInc = -1;
3805
         }
3802
         }
3806
 
3803
 
3807
-        zig = !zig;
3804
+        zig = !zig; // zag
3808
 
3805
 
3806
+        // Inner loop is Y with PROBE_Y_FIRST enabled
3809
         for (int8_t PR_INNER_VAR = inStart; PR_INNER_VAR != inStop; PR_INNER_VAR += inInc) {
3807
         for (int8_t PR_INNER_VAR = inStart; PR_INNER_VAR != inStop; PR_INNER_VAR += inInc) {
3810
 
3808
 
3811
           float xBase = left_probe_bed_position + xGridSpacing * xCount,
3809
           float xBase = left_probe_bed_position + xGridSpacing * xCount,

Loading…
Cancel
Save