Backport #4167: expose absolute machine position as #5021-#5029 (2.9)#4168
Open
grandixximo wants to merge 1 commit into
Open
Backport #4167: expose absolute machine position as #5021-#5029 (2.9)#4168grandixximo wants to merge 1 commit into
grandixximo wants to merge 1 commit into
Conversation
Add a machine-coordinate current-position parameter set, matching the layout used by other controllers. Reading machine coordinates previously required either summing the individual offset registers by formula or the G30.1 trick (which writes the absolute position into X Y Z A B C U V W, in the current program units, with no coordinate system, G92/G52 or tool length offset applied. They are read-only and volatile, filled each line alongside #5420-#5428 and not persisted to the var file. This is the same value already available as the #<_abs_*> named parameters, which until now existed only for X Y Z A B C; the U V W named parameters (#<_abs_u>, #<_abs_v>, #<_abs_w>) are added to match. The shared computation is factored into get_abs_position().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #4167 to 2.9.
Adds a machine-coordinate current-position parameter set,
#5021-#5029, for X Y Z A B C U V W: the current absolute machine position (G53 frame), with no coordinate system, G92/G52 or tool length offset applied, in the current program units. Read-only and volatile, filled each line alongside#5420-#5428and not persisted to the var file.Also adds the
#<_abs_u>,#<_abs_v>,#<_abs_w>named parameters so the existing#<_abs_*>set (previously X Y Z A B C only) covers all nine axes. The shared computation is factored intoget_abs_position(). The G38 documentation is updated to use this for converting a probe result to machine coordinates.This is purely additive: it introduces new read-only parameters and does not change the value or behavior of any existing parameter. The only change to existing tests is the introspection dump in tests/remap/introspect, which now lists the three new named parameters.
Cherry-picked cleanly except for two trivial resolutions: the array is named
_readonly_parameterson 2.9, and the introspect expected output was regenerated on 2.9.Verified on 2.9: clean build, the new interp test passes, and 98/98 in tests/interp + tests/remap + tests/tlo + tests/g38.
@andypugh tagging you for the 2.9 sign-off. This adds parameters on the stable branch, if what landed yesterday was ok, this is better IMO.