-
-
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
Extend M421 with I and J parameters #3798
Conversation
if ((hasZ = code_seen('Z'))) z = code_value(); | ||
|
||
if (hasX && hasY && hasZ) { | ||
|
||
int8_t ix = mbl.select_x_index(x), | ||
iy = mbl.select_y_index(y); | ||
|
||
if (ix >= 0 && iy >= 0) | ||
if (ix >= 0 && ix < MESH_NUM_X_POINTS && iy >= 0 && iy < MESH_NUM_Y_POINTS) |
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.
select_x_index
and select_y_index
can never return values >= to MESH_NUM_X_POINTS
or MESH_NUM_Y_POINTS
. If a point is too far out of range, these functions return a -1
.
Updated. |
@@ -5899,12 +5899,16 @@ inline void gcode_M410() { stepper.quick_stop(); } | |||
|
|||
/** | |||
* M421: Set a single Mesh Bed Leveling Z coordinate | |||
* Eter with 'M421 Xmm Ymm Zmm' or with 'M421 In Jm Zmm' |
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.
Minor misspelling. And the word "with" isn't used quite this way in formal English. Better phrasing:
* Use either 'M421 X<mm> Y<mm> Z<mm>' or 'M421 I<xindex> J<yindex> Z<mm>'
To keep "Enter … with" you could say:
* Enter 'M421' with 'X<mm> Y<mm> Z<mm>' or with 'I<xindex> J<yindex> Z<mm>'
Sorry to be so pedantic. I don't mind merging this and just fixing it up later.
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.
Updated
Extend M421 with I and J parameters
Extend M421 with I and J parameters to access its mesh-points directly.