Browse Source

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

Edward Patel 10 years ago
parent
commit
0e6514e7bd
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      Marlin/ultralcd.cpp

+ 3
- 0
Marlin/ultralcd.cpp View File

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

Loading…
Cancel
Save