From c2ba5d0c094000617f37e57552090399eee64459 Mon Sep 17 00:00:00 2001
From: alexborro <alexborro@gmail.com>
Date: Tue, 24 Mar 2015 15:50:31 -0300
Subject: [PATCH] Fix ZigZag and Topograph table
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

ZigZag: Inverted Behavior.. If T supplied, it does not zigzag.
Topograph table: The table was rotated 90ยบ clockwise.
---
 Marlin/Marlin_main.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp
index 3316862add..b3235f5595 100644
--- a/Marlin/Marlin_main.cpp
+++ b/Marlin/Marlin_main.cpp
@@ -2274,13 +2274,11 @@ inline void gcode_G28() {
           xStart = 0;
           xStop = auto_bed_leveling_grid_points;
           xInc = 1;
-          zig = false;
         }
         else {
           xStart = auto_bed_leveling_grid_points - 1;
           xStop = -1;
           xInc = -1;
-          zig = true;
         }
 
         #ifndef DELTA
@@ -2367,7 +2365,7 @@ inline void gcode_G28() {
         SERIAL_PROTOCOLPGM("+-----------+\n");
 
         for (int yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--) {
-          for (int xx = auto_bed_leveling_grid_points - 1; xx >= 0; xx--) {
+          for (int xx = 0; xx < auto_bed_leveling_grid_points; xx++) {
             int ind = yy * auto_bed_leveling_grid_points + xx;
             float diff = eqnBVector[ind] - mean;
             if (diff >= 0.0)