|
@@ -3431,7 +3431,7 @@ inline void gcode_G28() {
|
3431
|
3431
|
#endif // AUTO_BED_LEVELING_LINEAR
|
3432
|
3432
|
|
3433
|
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
|
3436
|
for (uint8_t yCount = 0; yCount < auto_bed_leveling_grid_points; yCount++) {
|
3437
|
3437
|
float yBase = front_probe_bed_position + yGridSpacing * yCount,
|
|
@@ -3451,13 +3451,13 @@ inline void gcode_G28() {
|
3451
|
3451
|
|
3452
|
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
|
3455
|
float xBase = left_probe_bed_position + xGridSpacing * xCount,
|
3456
|
3456
|
xProbe = floor(xBase + (xBase < 0 ? 0 : 0.5));
|
3457
|
3457
|
|
3458
|
3458
|
#if ENABLED(DELTA)
|
3459
|
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
|
3461
|
#endif
|
3462
|
3462
|
|
3463
|
3463
|
float measured_z = probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
|