hostmot2: use the H entry's pins for two-part sserial encoders - #4635
Open
grandixximo wants to merge 1 commit into
Open
grandixximo wants to merge 1 commit into
grandixximo wants to merge 1 commit into
Conversation
LBP_ENCODER_L entries get no HAL pins, but the two-part Fanuc encoder reassembly fell through into the encoder body with whichever entry completed the pair. When a format lists the H part before the L part the body ran on the L entry's pins and dereferenced handles that were never created. Redirect the body to the matching LBP_ENCODER_H entry's pin set, and refuse the pair with an error when no H entry exists.
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.
LBP_ENCODER_L entries get no HAL pins, but the two-part Fanuc encoder reassembly in hm2_sserial_read_pins falls through into the encoder body with whichever entry completes the pair. A format that lists H before L runs the body on the L entry's pins and dereferences handles that were never created, killing the realtime thread. Redirect the body to the matching LBP_ENCODER_H entry's pin set, and refuse the pair with an error when no H entry exists.
One of three candidates for @andypugh's hostmot2 SIGSEGV on master (see #4453, #4632). Split out of #4626.