Corrected Bed Height vs. Bed Topology for verbosity > 3

and cleaned out some tabs.

Everything else is a rebased PR#2017 as proposed by @CptanPanic
This commit is contained in:
AnHardt 2015-07-14 19:44:28 +02:00 committed by Richard Wackerbarth
parent 62302ceb9e
commit ed6598adf5

View file

@ -2786,20 +2786,20 @@ inline void gcode_G28() {
SERIAL_PROTOCOLPGM("|...Front...|\n"); SERIAL_PROTOCOLPGM("|...Front...|\n");
SERIAL_PROTOCOLPGM("+-----------+\n"); SERIAL_PROTOCOLPGM("+-----------+\n");
float min_diff = 999; float min_diff = 999;
for (int yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--) { for (int yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--) {
for (int xx = 0; xx < auto_bed_leveling_grid_points; xx++) { for (int xx = 0; xx < auto_bed_leveling_grid_points; xx++) {
int ind = yy * auto_bed_leveling_grid_points + xx; int ind = yy * auto_bed_leveling_grid_points + xx;
float diff = eqnBVector[ind] - mean; float diff = eqnBVector[ind] - mean;
float x_tmp = eqnAMatrix[ind + 0 * abl2], float x_tmp = eqnAMatrix[ind + 0 * abl2],
y_tmp = eqnAMatrix[ind + 1 * abl2], y_tmp = eqnAMatrix[ind + 1 * abl2],
z_tmp = 0; z_tmp = 0;
apply_rotation_xyz(plan_bed_level_matrix,x_tmp,y_tmp,z_tmp); apply_rotation_xyz(plan_bed_level_matrix,x_tmp,y_tmp,z_tmp);
if (eqnBVector[ind] - z_tmp < min_diff) if (eqnBVector[ind] - z_tmp < min_diff)
min_diff = eqnBVector[ind] - z_tmp; min_diff = eqnBVector[ind] - z_tmp;
if (diff >= 0.0) if (diff >= 0.0)
@ -2811,32 +2811,31 @@ inline void gcode_G28() {
SERIAL_EOL; SERIAL_EOL;
} // yy } // yy
SERIAL_EOL; SERIAL_EOL;
if (verbose_level > 3) {
SERIAL_PROTOCOLPGM(" \nCorrected Bed Height vs. Bed Topology: \n");
SERIAL_PROTOCOLPGM(" \nCorrected Bed Height vs. Bed Topology: \n"); 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;
float x_tmp = eqnAMatrix[ind + 0 * abl2],
y_tmp = eqnAMatrix[ind + 1 * abl2],
z_tmp = 0;
for (int yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--) { apply_rotation_xyz(plan_bed_level_matrix,x_tmp,y_tmp,z_tmp);
for (int xx = 0; xx < auto_bed_leveling_grid_points; xx++) {
int ind = yy * auto_bed_leveling_grid_points + xx;
float x_tmp = eqnAMatrix[ind + 0 * abl2],
y_tmp = eqnAMatrix[ind + 1 * abl2],
z_tmp = 0;
apply_rotation_xyz(plan_bed_level_matrix,x_tmp,y_tmp,z_tmp); float diff = eqnBVector[ind] - z_tmp - min_diff;
if (diff >= 0.0)
float diff = eqnBVector[ind] - z_tmp - min_diff; SERIAL_PROTOCOLPGM(" +");
if (diff >= 0.0) // Include + for column alignment
SERIAL_PROTOCOLPGM(" +"); else
// Include + for column alignment SERIAL_PROTOCOLCHAR(' ');
else SERIAL_PROTOCOL_F(diff, 5);
SERIAL_PROTOCOLCHAR(' '); } // xx
SERIAL_PROTOCOL_F(diff, 5); SERIAL_EOL;
} // xx } // yy
SERIAL_EOL; SERIAL_EOL;
} // yy }
SERIAL_EOL;
} //do_topography_map } //do_topography_map
#endif //!DELTA #endif //!DELTA
#else // !AUTO_BED_LEVELING_GRID #else // !AUTO_BED_LEVELING_GRID