Skip to content

Conversation

@hamishwillee
Copy link
Contributor

This uses gemini to write some copilot review instructions based on https://docs.px4.io/main/en/uorb/uorb_documentation

The idea is that copilot should do basic review only any PR that includes msg.

I have not checked this carefully - was hoping to iterate.

@hamishwillee hamishwillee requested a review from MaEtUgR December 24, 2025 05:01
# 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).
Copy link
Contributor

Choose a reason for hiding this comment

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

You might want to use a relative path


## 2. Field Documentation Standards

- **Inline Comments:** Every field and constant should have a comment on the same line, separated by exactly one space.
Copy link
Contributor

Choose a reason for hiding this comment

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

every field no exceptions?


## 5. Deprecation & Semantic Changes

- **Field Deprecation:** Do not delete fields. Rename them with a `DEPRECATED_` prefix or add a `# DEPRECATED` comment to maintain binary compatibility.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do not delete fields

Since when? We need to be able to extend or remove uORB messages

Rename them with a DEPRECATED_ prefix

Renaming breaks compatibility

## 5. Deprecation & Semantic Changes

- **Field Deprecation:** Do not delete fields. Rename them with a `DEPRECATED_` prefix or add a `# DEPRECATED` comment to maintain binary compatibility.
- **Semantic Changes:** If a unit changes (e.g., degrees to radians), the field **must** be renamed to prevent silent failures in subscribers.
Copy link
Contributor

Choose a reason for hiding this comment

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

Really? I'm not so sure about this, shouldn't it be a versioned message if we really care about backwards compatibility?

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.

2 participants