|
@@ -1734,16 +1734,6 @@ void process_commands()
|
1734
|
1734
|
SERIAL_ECHOLNPGM(MSG_POSITION_UNKNOWN);
|
1735
|
1735
|
break; // abort G29, since we don't know where we are
|
1736
|
1736
|
}
|
1737
|
|
- int left_probe_bed_position=LEFT_PROBE_BED_POSITION;
|
1738
|
|
- int right_probe_bed_position=RIGHT_PROBE_BED_POSITION;
|
1739
|
|
- int back_probe_bed_position=BACK_PROBE_BED_POSITION;
|
1740
|
|
- int front_probe_bed_position=FRONT_PROBE_BED_POSITION;
|
1741
|
|
- int auto_bed_leveling_grid_points=AUTO_BED_LEVELING_GRID_POINTS;
|
1742
|
|
- if (code_seen('L')) left_probe_bed_position=(int)code_value();
|
1743
|
|
- if (code_seen('R')) right_probe_bed_position=(int)code_value();
|
1744
|
|
- if (code_seen('B')) back_probe_bed_position=(int)code_value();
|
1745
|
|
- if (code_seen('F')) front_probe_bed_position=(int)code_value();
|
1746
|
|
- if (code_seen('P')) auto_bed_leveling_grid_points=(int)code_value();
|
1747
|
1737
|
|
1748
|
1738
|
#ifdef Z_PROBE_SLED
|
1749
|
1739
|
dock_sled(false);
|
|
@@ -1764,6 +1754,16 @@ void process_commands()
|
1764
|
1754
|
feedrate = homing_feedrate[Z_AXIS];
|
1765
|
1755
|
#ifdef AUTO_BED_LEVELING_GRID
|
1766
|
1756
|
// probe at the points of a lattice grid
|
|
1757
|
+ int left_probe_bed_position=LEFT_PROBE_BED_POSITION;
|
|
1758
|
+ int right_probe_bed_position=RIGHT_PROBE_BED_POSITION;
|
|
1759
|
+ int back_probe_bed_position=BACK_PROBE_BED_POSITION;
|
|
1760
|
+ int front_probe_bed_position=FRONT_PROBE_BED_POSITION;
|
|
1761
|
+ int auto_bed_leveling_grid_points=AUTO_BED_LEVELING_GRID_POINTS;
|
|
1762
|
+ if (code_seen('L')) left_probe_bed_position=(int)code_value();
|
|
1763
|
+ if (code_seen('R')) right_probe_bed_position=(int)code_value();
|
|
1764
|
+ if (code_seen('B')) back_probe_bed_position=(int)code_value();
|
|
1765
|
+ if (code_seen('F')) front_probe_bed_position=(int)code_value();
|
|
1766
|
+ if (code_seen('P')) auto_bed_leveling_grid_points=(int)code_value();
|
1767
|
1767
|
|
1768
|
1768
|
int xGridSpacing = (right_probe_bed_position - left_probe_bed_position) / (auto_bed_leveling_grid_points-1);
|
1769
|
1769
|
int yGridSpacing = (back_probe_bed_position - front_probe_bed_position) / (auto_bed_leveling_grid_points-1);
|