Browse Source

Merge pull request #4804 from thinkyhead/rc_fix_broken_G29

Fix some regressive typos in G29
Scott Lahteine 8 years ago
parent
commit
2fce217576
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      Marlin/Marlin_main.cpp

+ 3
- 3
Marlin/Marlin_main.cpp View File

3431
       #endif // AUTO_BED_LEVELING_LINEAR
3431
       #endif // AUTO_BED_LEVELING_LINEAR
3432
 
3432
 
3433
       int probePointCounter = 0;
3433
       int probePointCounter = 0;
3434
-      uint8_t zig = auto_bed_leveling_grid_points & 1; //always end at [RIGHT_PROBE_BED_POSITION, BACK_PROBE_BED_POSITION]
3434
+      bool zig = auto_bed_leveling_grid_points & 1; //always end at [RIGHT_PROBE_BED_POSITION, BACK_PROBE_BED_POSITION]
3435
 
3435
 
3436
       for (uint8_t yCount = 0; yCount < auto_bed_leveling_grid_points; yCount++) {
3436
       for (uint8_t yCount = 0; yCount < auto_bed_leveling_grid_points; yCount++) {
3437
         float yBase = front_probe_bed_position + yGridSpacing * yCount,
3437
         float yBase = front_probe_bed_position + yGridSpacing * yCount,
3451
 
3451
 
3452
         zig = !zig;
3452
         zig = !zig;
3453
 
3453
 
3454
-        for (uint8_t xCount = xStart; xCount != xStop; xCount += xInc) {
3454
+        for (int8_t xCount = xStart; xCount != xStop; xCount += xInc) {
3455
           float xBase = left_probe_bed_position + xGridSpacing * xCount,
3455
           float xBase = left_probe_bed_position + xGridSpacing * xCount,
3456
                 xProbe = floor(xBase + (xBase < 0 ? 0 : 0.5));
3456
                 xProbe = floor(xBase + (xBase < 0 ? 0 : 0.5));
3457
 
3457
 
3458
           #if ENABLED(DELTA)
3458
           #if ENABLED(DELTA)
3459
             // Avoid probing outside the round or hexagonal area of a delta printer
3459
             // Avoid probing outside the round or hexagonal area of a delta printer
3460
-            if (sq(xProbe) + sq(yProbe) > sq(DELTA_PROBEABLE_RADIUS) + 0.1) continue;
3460
+            if (HYPOT2(xProbe, yProbe) > sq(DELTA_PROBEABLE_RADIUS) + 0.1) continue;
3461
           #endif
3461
           #endif
3462
 
3462
 
3463
           float measured_z = probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
3463
           float measured_z = probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);

Loading…
Cancel
Save