Mesh export in Bilinear + UBL M503

This commit is contained in:
Scott Lahteine
2018-02-25 08:07:48 -06:00
parent 8d5a77001e
commit 966d9af98a
4 changed files with 60 additions and 23 deletions

View File

@ -2098,14 +2098,16 @@ void MarlinSettings::reset(
#if ENABLED(MESH_BED_LEVELING)
for (uint8_t py = 0; py < GRID_MAX_POINTS_Y; py++) {
for (uint8_t px = 0; px < GRID_MAX_POINTS_X; px++) {
CONFIG_ECHO_START;
SERIAL_ECHOPAIR_P(port, " G29 S3 X", (int)px + 1);
SERIAL_ECHOPAIR_P(port, " Y", (int)py + 1);
SERIAL_ECHOPGM_P(port, " Z");
SERIAL_PROTOCOL_F_P(port, LINEAR_UNIT(mbl.z_values[px][py]), 5);
SERIAL_EOL_P(port);
if (leveling_is_valid()) {
for (uint8_t py = 0; py < GRID_MAX_POINTS_Y; py++) {
for (uint8_t px = 0; px < GRID_MAX_POINTS_X; px++) {
CONFIG_ECHO_START;
SERIAL_ECHOPAIR_P(port, " G29 S3 X", (int)px + 1);
SERIAL_ECHOPAIR_P(port, " Y", (int)py + 1);
SERIAL_ECHOPGM_P(port, " Z");
SERIAL_PROTOCOL_F_P(port, LINEAR_UNIT(mbl.z_values[px][py]), 5);
SERIAL_EOL_P(port);
}
}
}
@ -2119,6 +2121,27 @@ void MarlinSettings::reset(
SERIAL_ECHOLNPGM_P(port, " meshes.\n");
}
ubl.report_current_mesh(
#if ADD_PORT_ARG
port
#endif
);
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
if (leveling_is_valid()) {
for (uint8_t py = 0; py < GRID_MAX_POINTS_Y; py++) {
for (uint8_t px = 0; px < GRID_MAX_POINTS_X; px++) {
CONFIG_ECHO_START;
SERIAL_ECHOPAIR_P(port, " G29 W I", (int)px + 1);
SERIAL_ECHOPAIR_P(port, " J", (int)py + 1);
SERIAL_ECHOPGM_P(port, " Z");
SERIAL_PROTOCOL_F_P(port, LINEAR_UNIT(z_values[px][py]), 5);
SERIAL_EOL_P(port);
}
}
}
#endif
#endif // HAS_LEVELING