docs - Correct the Python Interface example function ok_for_mdi#605
Merged
jethornton merged 1 commit intoLinuxCNC:2.8from Jun 9, 2019
Merged
docs - Correct the Python Interface example function ok_for_mdi#605jethornton merged 1 commit intoLinuxCNC:2.8from
jethornton merged 1 commit intoLinuxCNC:2.8from
Conversation
…achine is homed before returning True. The homed attribute returns a tuple of length 9 with home status of each axis. The current example will always return True for the homed test even if all axes are unhomed. Since there is a 1:1 correspondence between a joint and an axis, I suggest to correct the example by counting the homed axes and comparing with the number of joints (2.8) or number of axes (2.7): 2.8: s.homed.count(1) == s.joints 2.7: s.homed.count(1) == s.axes
Collaborator
|
Both PR's are on Master and it looks like your repo was not up to date. You should git pull --rebase before submitting the PR and git checkout 2.7. |
Contributor
Author
|
I changed the base branch of the PR to 2.8. Is that better? If so I can try making the same change to the other PR that was intended for the 2.7 branch. |
Contributor
Author
|
I filed the separate PR for 2.8 because the 2.7 example will not work in 2.8. For example consider a JOINTS=4 machine with trivkins coordinates=XYYZ in 2.8. s.axes in 2.8 will return 3 |
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.
This PR corrects the logic in the ok_for_mdi() example function. I filed a separate request for 2.7.