johncarlson21 / SV04-Marlin-2.1.x

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. | Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
http://marlinfw.org
GNU General Public License v3.0
20 stars 7 forks source link

Meshviewer mesh output reversed per line after reboot #27

Open ThomasToka opened 1 year ago

ThomasToka commented 1 year ago

Describe the bug The mesh is reversed on loadup via RTS_INIT

To Reproduce Steps to reproduce the behavior:

  1. generate mesh
  2. look at the lines.. for example 1 2 3 4 5
  3. reboot printer
  4. go to meshviewer, each line is reversed so the example line gets 5 4 3 2 1

Expected behavior showing as saved

Additional context the fix for this is to change the order here:

https://github.com/johncarlson21/SV04-Marlin-2.1.x/blob/859bc997a6ad3309186f739cb1cdee27746ea8a8/Marlin/src/lcd/e3v2/creality/LCD_RTS.cpp#L366

  // away from origin
  if (zig)
  {
    inStart = GRID_MAX_POINTS_X - 1;
    inStop = -1;
    inInc = -1;
  }
  else
  {
    // towards origin
    inStart = 0;
    inStop = GRID_MAX_POINTS_X;
    inInc = 1;
  }

Thank you for the code. I included it in my fork and came to this bug after user reports.