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

Ros2 - Add dynamic parameter callback #51

Open
wants to merge 3 commits into
base: ros2
Choose a base branch
from

Conversation

gennartan
Copy link

This PR contains commits to add a dynamic parameter callback that allows to reconfigure the ntrip client at runtime. It can be useful if you want to change the NTRIP mountpoint at runtime, or use another NTRIP caster.

  • Reformat the files with 4 tabs for readability and try to reduce the line length when possible. (2 tabs were too small and difficult to read). Also use f-string to instead of format as it improves performance and also increases readability.
  • Reorganize the parameters in constructor. As the goal is to be able to dynamically update the parameters, the chain of control must be easier to understand. By passing the parameters using the constructor (or specific function is easier to understand that writing a class attribute).
  • Finally, add the callback to dynamically reload ntrip configuration. The parameter update is accepted by default. The defined callback updates the ntrip client configuration afterwards.

agennart added 3 commits July 25, 2024 14:40
Instead of updating private members of the NtripClient class after
initialization, set them as parameters and add them to the constructor.
When the ntrip server parameters are updated, the ntrip server is
restarted with the new set of parameters. Note that for it to work
properly, it is required to call the set parameters service with all the
parameters that needs to be overwritten at once.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant