'G29 H' to set a centered square probe area (linear, bilinear)#12242
'G29 H' to set a centered square probe area (linear, bilinear)#12242thinkyhead merged 2 commits intoMarlinFirmware:bugfix-2.0.xfrom MasterPIC:Customized
Conversation
…rea. G29_SQUARE_GRID_SIZE is to be defined to enable the feature.
|
You are going to find great resistance to using G, M, and N as parameters. You need to use another letter that isn't a GCode command. |
|
I already made a PR with a different and still wrong letter in the past: Now I should re-edit all config files just for a wrong comment. :( |
|
Yes. S and P are widely used across many GCode (and MCode) commands. |
|
I see S is already used as argument. |
|
I personally don't have a preference. This may not be possible in this case, but I try to name the option something that the parameter letter makes sense. (I know you tried to do this with the 'G'). But if we can't come up with a name or title for the option that aligns with H, I, K or U... I guess we just pick one at random. |
| front_probe_bed_position = (MAX_PROBE_Y + MIN_PROBE_Y-dimens)/2; | ||
| back_probe_bed_position = front_probe_bed_position + dimens; | ||
| } | ||
| else |
There was a problem hiding this comment.
Tabs are verboten. Please use two spaces for indentation.
|
|
||
| // Enable G29 G parameter to set dimension of square centered probing area | ||
| //#define G29_SQUARE_GRID_SIZE | ||
|
|
There was a problem hiding this comment.
Please strip all trailing whitespace from these new lines, or better yet, just drop this extra configuration option altogether and make it a standard part of UBL.
There was a problem hiding this comment.
@thinkyhead I believe this only affects:
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)|
|
||
| if (parser.seen('G')){ | ||
| int dimens = (int)parser.linearval('G'); | ||
| left_probe_bed_position = (MAX_PROBE_X + MIN_PROBE_X-dimens)/2; |
There was a problem hiding this comment.
Please include a single space before and after all mathematical operators.
|
|
Thank You @thinkyhead |
G29 - Added G parameter to quickly set dimension of square centered probing area.
It affects only linear and bilinear automatic bed leveling.
G29_SQUARE_GRID_SIZE is to be enabled to activate the feature.