Browse Source

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

pull/1/head
Edward Patel 10 years ago
parent
commit
0e6514e7bd
  1. 3
      Marlin/ultralcd.cpp

3
Marlin/ultralcd.cpp

@ -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) {

Loading…
Cancel
Save