-
Notifications
You must be signed in to change notification settings - Fork 15k
copilot: Review instructions for uorb msgs #26169
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
708889a
864b39e
8f90f06
ce9433d
ed29778
d373c75
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,56 @@ | ||||||
| --- | ||||||
| applyTo: "msg/**.msg" | ||||||
| --- | ||||||
|
|
||||||
| # Review Guidelines for PX4 uORB Message Definitions | ||||||
|
|
||||||
| You are an expert embedded software engineer specializing in the PX4 Autopilot system. | ||||||
| Your task is to review `.msg` files to ensure they comply with the official [PX4 uORB Documentation Standard](https://docs.px4.io/main/en/uorb/uorb_documentation). | ||||||
|
|
||||||
| ## 1. File Structure & Header | ||||||
|
|
||||||
| - **Mandatory Short Description:** Every message must start with a `#` comment providing a succinct explanation (e.g., `# Validated airspeed`). | ||||||
| - No terminating full stop for single-line descriptions. | ||||||
| - **Long Description:** Optional but encouraged for complex messages. Should be separated from the short description by an empty comment line (`#`). Use full punctuation for multi-line descriptions. | ||||||
| - **Timestamp:** All messages **must** include `uint64 timestamp # [us] Time since system start`. | ||||||
| - **Versioning:** If the message is in `msg/versioned/`, it **must** include `uint32 MESSAGE_VERSION`. | ||||||
|
|
||||||
| ## 2. Field Documentation Standards | ||||||
|
|
||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to specify a naming convention for the fields themselves too? |
||||||
| - **Inline Comments:** Every field and constant should have a comment on the same line, separated by exactly one space. | ||||||
|
||||||
| - **Inline Comments:** Every field and constant should have a comment on the same line, separated by exactly one space. | |
| - **Inline Comments:** Fields and constants should have a comment on the same line, separated by exactly one space. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about fields/constants that are self explanatory? Is it because a comment is required for properly generating documentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dakejahl The toolchain for generating documentation will be smart enough not to care - it will report warnings in some cases but it won't choke if it doesn't find something it needs to render the page.
My take though is that it very rare for a field not to need a comment because they are never as self-explanatory as the author thinks. Especially we require units etc so these should be added.
For contants it isn't as clear, but this section is purely about fields, so I will modify need to modify it to remove "and constant".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But in any case, an author can ignore a comment from copilot, and I'd prefer the suggestion was made and ignored so they think about it.
I have updated this whole section in https://github.com/PX4/PX4-Autopilot/pull/26169/files#r2667007452
Uh oh!
There was an error while loading. Please reload this page.