Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_DDS: remove instance check for DDS Client #27941

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

peterbarker
Copy link
Contributor

this is probably a flow of control problem.

But the code block below this resets some state variables before returning, and will also return false in the same case this removed block does.

Resetting that state might be very important to the caller.

this is probably a flow of control problem.

But the code block below this resets some state variables before returning, and will also return false in the same case this removed block does.

Resetting that state might be very important to the caller.
@peterbarker peterbarker requested a review from Ryanf55 August 27, 2024 03:14
@Ryanf55
Copy link
Collaborator

Ryanf55 commented Aug 27, 2024

By returning false in update_topic, it prevents data from being published. If we don't have a fix, which is the statement below what you changed, then we want to publish there is no fix so the consuming application can handle the GPS outage. This PR, although indicating there is a logic problem, doesn't fix the underlying issue.

I'll propose an alternative in the next few days to discuss. Many thanks for pointing this out!

@peterbarker
Copy link
Contributor Author

By returning false in update_topic, it prevents data from being published. If we don't have a fix, which is the statement below what you changed, then we want to publish there is no fix so the consuming application can handle the GPS outage. This PR, although indicating there is a logic problem, doesn't fix the underlying issue.

I'll propose an alternative in the next few days to discuss. Many thanks for pointing this out!

The statement below is not healthy, not "no fix". If an out-of-bound GPS instance is bassed to is_healthy it will return false, so you will go through the code path which resets the state, which is probably desirable.

@Ryanf55 Ryanf55 added the ROS label Aug 28, 2024
Copy link
Collaborator

@Ryanf55 Ryanf55 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation. Approved!

@peterbarker peterbarker merged commit c05441b into ArduPilot:master Sep 5, 2024
93 checks passed
@peterbarker peterbarker deleted the pr/dds-sanity-check branch September 5, 2024 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants