MBL print function optimization
This commit is contained in:
parent
f94bc72235
commit
b234560b22
|
|
@ -4870,20 +4870,7 @@ void process_commands()
|
||||||
*/
|
*/
|
||||||
case 81:
|
case 81:
|
||||||
if (mbl.active) {
|
if (mbl.active) {
|
||||||
SERIAL_PROTOCOLPGM("Num X,Y: ");
|
mbl.print();
|
||||||
SERIAL_PROTOCOL(MESH_NUM_X_POINTS);
|
|
||||||
SERIAL_PROTOCOL(',');
|
|
||||||
SERIAL_PROTOCOL(MESH_NUM_Y_POINTS);
|
|
||||||
SERIAL_PROTOCOLPGM("\nZ search height: ");
|
|
||||||
SERIAL_PROTOCOL(MESH_HOME_Z_SEARCH);
|
|
||||||
SERIAL_PROTOCOLLNPGM("\nMeasured points:");
|
|
||||||
for (uint8_t y = MESH_NUM_Y_POINTS; y-- > 0;) {
|
|
||||||
for (uint8_t x = 0; x < MESH_NUM_X_POINTS; x++) {
|
|
||||||
SERIAL_PROTOCOLPGM(" ");
|
|
||||||
SERIAL_PROTOCOL_F(mbl.z_values[y][x], 5);
|
|
||||||
}
|
|
||||||
SERIAL_PROTOCOLLN();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
SERIAL_PROTOCOLLNPGM("Mesh bed leveling not active.");
|
SERIAL_PROTOCOLLNPGM("Mesh bed leveling not active.");
|
||||||
|
|
|
||||||
|
|
@ -149,4 +149,17 @@ void mesh_bed_leveling::upsample_3x3()
|
||||||
}
|
}
|
||||||
#endif // (MESH_NUM_X_POINTS>=5 && MESH_NUM_Y_POINTS>=5 && (MESH_NUM_X_POINTS&1)==1 && (MESH_NUM_Y_POINTS&1)==1)
|
#endif // (MESH_NUM_X_POINTS>=5 && MESH_NUM_Y_POINTS>=5 && (MESH_NUM_X_POINTS&1)==1 && (MESH_NUM_Y_POINTS&1)==1)
|
||||||
|
|
||||||
|
void mesh_bed_leveling::print() {
|
||||||
|
SERIAL_PROTOCOLLNPGM("Num X,Y: " STRINGIFY(MESH_NUM_X_POINTS) "," STRINGIFY(MESH_NUM_Y_POINTS));
|
||||||
|
SERIAL_PROTOCOLLNPGM("Z search height: " STRINGIFY(MESH_HOME_Z_SEARCH));
|
||||||
|
SERIAL_PROTOCOLLNPGM("Measured points:");
|
||||||
|
for (uint8_t y = MESH_NUM_Y_POINTS; y-- > 0;) {
|
||||||
|
for (uint8_t x = 0; x < MESH_NUM_X_POINTS; x++) {
|
||||||
|
SERIAL_PROTOCOLPGM(" ");
|
||||||
|
SERIAL_PROTOCOL_F(z_values[y][x], 5);
|
||||||
|
}
|
||||||
|
SERIAL_PROTOCOLLN();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif // MESH_BED_LEVELING
|
#endif // MESH_BED_LEVELING
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ public:
|
||||||
#if MESH_NUM_X_POINTS>=5 && MESH_NUM_Y_POINTS>=5 && (MESH_NUM_X_POINTS&1)==1 && (MESH_NUM_Y_POINTS&1)==1
|
#if MESH_NUM_X_POINTS>=5 && MESH_NUM_Y_POINTS>=5 && (MESH_NUM_X_POINTS&1)==1 && (MESH_NUM_Y_POINTS&1)==1
|
||||||
void upsample_3x3();
|
void upsample_3x3();
|
||||||
#endif
|
#endif
|
||||||
|
void print();
|
||||||
};
|
};
|
||||||
|
|
||||||
extern mesh_bed_leveling mbl;
|
extern mesh_bed_leveling mbl;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue