1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +00:00

Bug fix! Missed putting z value back in right slot after zigzag mod.

This commit is contained in:
Edward Patel 2015-04-05 04:13:34 +02:00
parent ea10601406
commit 0e6514e7bd

View File

@ -1809,6 +1809,9 @@ static void _lcd_level_bed()
debounce_click = true; debounce_click = true;
int ix = _lcd_level_bed_position % MESH_NUM_X_POINTS; int ix = _lcd_level_bed_position % MESH_NUM_X_POINTS;
int iy = _lcd_level_bed_position / MESH_NUM_X_POINTS; int iy = _lcd_level_bed_position / MESH_NUM_X_POINTS;
if (iy&1) { // Zig zag
ix = (MESH_NUM_X_POINTS - 1) - ix;
}
mbl.set_z(ix, iy, current_position[Z_AXIS]); mbl.set_z(ix, iy, current_position[Z_AXIS]);
_lcd_level_bed_position++; _lcd_level_bed_position++;
if (_lcd_level_bed_position == MESH_NUM_X_POINTS*MESH_NUM_Y_POINTS) { if (_lcd_level_bed_position == MESH_NUM_X_POINTS*MESH_NUM_Y_POINTS) {