-
-
Notifications
You must be signed in to change notification settings - Fork 19.7k
Closed
Description
Did you test the latest bugfix-2.0.x code?
Yes, and the problem still exists.
Bug Description
In GcodeSuite::G29() in Marlin/src/gcode/bedlevel/abl/G29.cpp at line 300 is the following code:
i = (rx - bilinear_start.x + 0.5 * abl.gridSpacing.x) / abl.gridSpacing.x;
j = (ry - bilinear_start.y + 0.5 * abl.gridSpacing.y) / abl.gridSpacing.y;
When this code executes, abl.gridSpacing is uninitialised. bilinear_grid_spacing should be used instead.
Bug Timeline
It has been in the code since at least 2017.
Expected behavior
I expect the X and Y parameters to be converted into equivalent I and J parameters.
Actual behavior
The actual behaviour is undefined. The z value for some grid point will be set but not necessarily the one specified.
Steps to Reproduce
- G28
- G29
- G29 W X200 Y200 Z2
- M420 V
On my 200x200 bed with a 3x3 grid this should result in something like
Bilinear Leveling Grid:
0 1 2
0 +0.084 -0.016 +0.039
1 +0.082 +0.195 -0.038
2 +0.023 +0.224 +2.000
In reality the 0, 0 value gets set to 2.0 rather than the 2, 2 value.
Version of Marlin Firmware
Latest bugfix branch
Printer model
Custom ATMega256 based machine
Electronics
No response
Add-ons
No response
Bed Leveling
ABL Bilinear mesh
Your Slicer
No response
Host Software
No response
Additional information & file uploads
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels