-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Further cleanup of UBL #6552
Further cleanup of UBL #6552
Conversation
In UBL_G29.cpp, please replaces all the X_MIN_POS ... travel limits with the UBL_MESH_MIN_X ... versions. |
How about in G26? |
6fa7f38
to
3494c9a
Compare
Marlin/ubl_G29.cpp
Outdated
safe_delay(20); | ||
for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) { | ||
for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) { | ||
float x_tmp = pgm_read_float(ubl.mesh_index_to_xpos[i]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need an ampersand here, I believe.
float x_tmp = pgm_read_float(ubl.mesh_index_to_xpos[i]),
should be
float x_tmp = pgm_read_float(&ubl.mesh_index_to_xpos[i]),
Same with the next line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed!
ccc4676
to
6843d0e
Compare
6843d0e
to
7ba7474
Compare
Yes... for now... that is probably the right thing to do. But I suspect G26 has value to the Bi-Linear and original Mesh bed leveling. In which case, using the UBL constants is not the 'right' thing to do... |
If it's "right" for UBL then it's ok. It should be self-consistent. |
Good catch! This is wrong.... These are xy, xz and yz terms in the polynomial. They are not x^2, y^2 or z^2 terms. The code will NOT work like this. - lsf->x2bar = lsf->x2bar / N - lsf->xbar * lsf->xbar;
- lsf->y2bar = lsf->y2bar / N - lsf->ybar * lsf->ybar;
- lsf->z2bar = lsf->z2bar / N - lsf->zbar * lsf->zbar;
- lsf->xybar = lsf->xybar / N - lsf->xbar * lsf->ybar;
- lsf->yzbar = lsf->yzbar / N - lsf->ybar * lsf->zbar;
- lsf->xzbar = lsf->xzbar / N - lsf->xbar * lsf->zbar;
+ lsf->x2bar = lsf->x2bar / N - sq(lsf->xbar);
+ lsf->y2bar = lsf->y2bar / N - sq(lsf->ybar);
+ lsf->z2bar = lsf->z2bar / N - sq(lsf->zbar);
+ lsf->xybar = lsf->xybar / N - sq(lsf->xbar);
+ lsf->yzbar = lsf->yzbar / N - sq(lsf->ybar);
+ lsf->xzbar = lsf->xzbar / N - sq(lsf->xbar); |
Rebase #6501 and apply more cleanup…
smart_fill_mesh
smart_fill_mesh
::debug
methods' title argumentConcise diff