Skip to content

Conversation

@pv42
Copy link
Contributor

@pv42 pv42 commented Sep 23, 2025

This PR adds better error and documentation to mavlink-core

Breaking

To have consistent read_ function names I renamed the following group of functions:
read_raw_versioned_msg[_async][_signed] -> read_versioned_raw_message[_async][_signed]

Changes

  • # Errors and # Panics doc sections to all applicable public functions in mavlink-core
  • Add unified doc for read_ and write_ functions and their errors in mavlink-core/src/lib.rs
  • simplyfy doc link when applicable
  • properly import commonly used items e.g. crate::error::MessageReadError

Lints

There are 2 clippy lints that check for the existence of these sections but in my experience the one for panics is not very useful since it has many false positives and negatives. Therefore I did not enable them.

Other

Only lock signing mutex when message actually needs to be signed, this is a minor performance improvement for the signing feature. This is so minor that I didn't want to put it in a separate PR.

Copy link
Collaborator

@joaoantoniocardoso joaoantoniocardoso left a comment

Choose a reason for hiding this comment

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

Ty

@onur-ozkan
Copy link
Collaborator

Will you have any free space to finalize this PR? @pv42

It would be quite cool to have this on the next release along with Add wrapper for char arrays to access str conveniently #388.

Copy link
Collaborator

@onur-ozkan onur-ozkan left a comment

Choose a reason for hiding this comment

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

Thanks!

@onur-ozkan onur-ozkan merged commit e0cc8ae into mavlink:master Oct 8, 2025
45 checks passed
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.

3 participants