Mesh export in Bilinear + UBL M503 (#9818)

This commit is contained in:
Scott Lahteine 2018-02-26 01:00:56 -06:00 committed by GitHub
parent 97a35dd534
commit 9d7a1ae9f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 48 additions and 24 deletions

View file

@ -596,21 +596,8 @@
if (parser.seen('S')) { // Store (or Save) Current Mesh Data
g29_storage_slot = parser.has_value() ? parser.value_int() : storage_slot;
if (g29_storage_slot == -1) { // Special case, we are going to 'Export' the mesh to the
SERIAL_ECHOLNPGM("G29 I 999"); // host in a form it can be reconstructed on a different machine
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
if (!isnan(z_values[x][y])) {
SERIAL_ECHOPAIR("M421 I ", x);
SERIAL_ECHOPAIR(" J ", y);
SERIAL_ECHOPGM(" Z ");
SERIAL_ECHO_F(z_values[x][y], 6);
SERIAL_ECHOPAIR(" ; X ", LOGICAL_X_POSITION(mesh_index_to_xpos(x)));
SERIAL_ECHOPAIR(", Y ", LOGICAL_Y_POSITION(mesh_index_to_ypos(y)));
SERIAL_EOL();
}
return;
}
if (g29_storage_slot == -1) // Special case, we are going to 'Export' the mesh to the
return report_current_mesh();
int16_t a = settings.calc_num_meshes();
@ -764,7 +751,6 @@
z_values[location.x_index][location.y_index] = measured_z;
}
SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
} while (location.x_index >= 0 && --max_iterations);
STOW_PROBE();