mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-27 22:08:02 +00:00
Add array indexIntoAB[xx][yy]
and use it.
This commit is contained in:
parent
e2d69f66b2
commit
3d23424121
@ -2561,6 +2561,7 @@ inline void gcode_G28() {
|
||||
double eqnAMatrix[abl2 * 3], // "A" matrix of the linear system of equations
|
||||
eqnBVector[abl2], // "B" vector of Z points
|
||||
mean = 0.0;
|
||||
int8_t indexIntoAB[auto_bed_leveling_grid_points][auto_bed_leveling_grid_points];
|
||||
#endif // !DELTA
|
||||
|
||||
int probePointCounter = 0;
|
||||
@ -2625,7 +2626,7 @@ inline void gcode_G28() {
|
||||
bed_level[xCount][yCount] = measured_z + z_offset;
|
||||
#endif
|
||||
|
||||
probePointCounter++;
|
||||
indexIntoAB[xCount][yCount] = probePointCounter++;
|
||||
|
||||
idle();
|
||||
|
||||
@ -2679,7 +2680,7 @@ inline void gcode_G28() {
|
||||
|
||||
for (int yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--) {
|
||||
for (int xx = 0; xx < auto_bed_leveling_grid_points; xx++) {
|
||||
int ind = yy * auto_bed_leveling_grid_points + xx;
|
||||
int ind = indexIntoAB[xx][yy];
|
||||
float diff = eqnBVector[ind] - mean;
|
||||
|
||||
float x_tmp = eqnAMatrix[ind + 0 * abl2],
|
||||
@ -2705,7 +2706,7 @@ inline void gcode_G28() {
|
||||
|
||||
for (int yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--) {
|
||||
for (int xx = 0; xx < auto_bed_leveling_grid_points; xx++) {
|
||||
int ind = yy * auto_bed_leveling_grid_points + xx;
|
||||
int ind = indexIntoAB[xx][yy];
|
||||
float x_tmp = eqnAMatrix[ind + 0 * abl2],
|
||||
y_tmp = eqnAMatrix[ind + 1 * abl2],
|
||||
z_tmp = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user