Fix M421 AUTO_BED_LEVELING_BILINEAR and AUTO_BED_LEVELING_UBL

M421 was not connected up for AUTO_BED_LEVELING_BILINEAR.
M421 needed to migrate mesh data to new UBL EEPROM layout.
This commit is contained in:
Roxy-3D
2017-04-02 16:13:15 -05:00
committed by Roxy-3D
parent 3412950abc
commit 0423e93c42
2 changed files with 36 additions and 5 deletions

View File

@@ -327,8 +327,13 @@
// Invalidate Mesh Points. This command is a little bit asymetrical because
// it directly specifies the repetition count and does not use the 'R' parameter.
if (code_seen('I')) {
int cnt = 0;
repetition_cnt = code_has_value() ? code_value_int() : 1;
while (repetition_cnt--) {
if (cnt>20) {
cnt = 0;
idle();
}
const mesh_index_pair location = find_closest_mesh_point_of_type(REAL, x_pos, y_pos, 0, NULL, false); // The '0' says we want to use the nozzle's position
if (location.x_index < 0) {
SERIAL_PROTOCOLLNPGM("Entire Mesh invalidated.\n");
@@ -1433,4 +1438,4 @@
SERIAL_ECHOLNPGM("Done Editing Mesh");
}
#endif // AUTO_BED_LEVELING_UBL
#endif // AUTO_BED_LEVELING_UBL