Skip to content

NavSat::ToElement() method (backport #1585)#1636

Merged
scpeters merged 2 commits into
mainfrom
mergify/bp/main/pr-1585
Apr 17, 2026
Merged

NavSat::ToElement() method (backport #1585)#1636
scpeters merged 2 commits into
mainfrom
mergify/bp/main/pr-1585

Conversation

@mergify

@mergify mergify Bot commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

🦟 Bug fix

Fixes #

Summary

sdf::NavSat didn't have a ToElement() method which prevent to convert sensor-specific information back to sdf format.

This PR include such changes:

  • Introduce sdf::NavSat::ToElement() method
  • Added this method call to dispatcher in Sensor::ToElement()
  • Also same dispatcher had misleading error msg: if user tried to convert sensor w/o sensor-specific information it will get error message about lack of this feature, but actually it's not correct. Dispatcher logic changed to avoid such misleading (split apart type check and pointer check)
  • And message was w/o trailing new_line symbol which makes console output harder to read
  • Added test for new ToElement() method; valgrind is happy
  • Couple of typos fixed

This PR was developed on top of sdf15 and retargeted to sdf16 due to sdf16 do not have dev packages.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers
  • Was GenAI used to generate this PR? If so, make sure to add "Generated-by" to your commits. (See this policy for more info.)

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by and Generated-by messages.


This is an automatic backport of pull request #1585 done by Mergify.

`sdf::NavSat` didn't have a `ToElement()` method which prevent to convert sensor-specific information back to sdf format.

This PR include such changes:
* Introduce `sdf::NavSat::ToElement()` method
* Added this method call to dispatcher in `Sensor::ToElement()`
* Also same dispatcher had misleading error msg: if user tried to convert sensor w/o sensor-specific information it will get error message about lack of this feature, but actually it's not correct. Dispatcher logic changed to avoid such misleading (split apart type check and pointer check)
* And message was w/o trailing new_line symbol which makes console output harder to read
* Added test for new ToElement() method; valgrind is happy
* Couple of typos fixed

---------

Signed-off-by: Maksim Derbasov <ntfs.hard@gmail.com>
(cherry picked from commit 8ccc60c)
@mergify mergify Bot requested review from azeey and scpeters as code owners March 3, 2026 19:37
@mergify mergify Bot mentioned this pull request Mar 3, 2026
9 tasks
@mderbaso-deepx

Copy link
Copy Markdown

Hello, @azeey @scpeters

Is this PR can't be merged by some reason? Port to this branch even doesn't have a merge conflicts
(I also curious about ports of this changes to other branches)

Thanks

@scpeters

Copy link
Copy Markdown
Member

Hello, @azeey @scpeters

Is this PR can't be merged by some reason? Port to this branch even doesn't have a merge conflicts (I also curious about ports of this changes to other branches)

Thanks

thanks for your contribution! I'm taking a look now and will help get these backports merged

@github-project-automation github-project-automation Bot moved this from Inbox to In review in Core development Apr 17, 2026
@scpeters scpeters enabled auto-merge (rebase) April 17, 2026 21:02
@scpeters scpeters merged commit 7a9e14e into main Apr 17, 2026
14 checks passed
@scpeters scpeters deleted the mergify/bp/main/pr-1585 branch April 17, 2026 21:26
@github-project-automation github-project-automation Bot moved this from In review to Done in Core development Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants