feat: close GPIO port on node boot if is is already used#25
Merged
Conversation
…used Signed-off-by: Manato HIRABAYASHI <manato.hirabayashi@tier4.jp>
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.
PR Type
Related Links
Description
Currently, if the target GPIO port is opened when the node starts, the node exits with an error status.
This PR checks the status of the target GPIO port, closes it if it is in use, and tries to open it on node boot.
Review Procedure
Before merging this PR, the node should exit with a message like
Failed to initialize GPIO trigger. ...while should not after mergingRemarks
Even if there is another process that uses a specified GPIO port properly, the ownership of the GPIO port is forcely taken by this
sensor_triggernode. This PR intends to makesensor_triggernode work properly under the condition that some processes (including previous run ofsensor_trigger) exit unexpectedly and the target GPIO port is not closed correctly.Pre-Review Checklist for the PR Author
PR Author should check the checkboxes below when creating the PR.
Checklist for the PR Reviewer
Reviewers should check the checkboxes below before approval.
Post-Review Checklist for the PR Author
PR Author should check the checkboxes below before merging.
CI Checks