Skip to content

docs: add the three MSP commands the registry is missing - #12018

Open
MrScothh wants to merge 3 commits into
iNavFlight:maintenance-10.xfrom
MrScothh:docs/msp-registry-srxl2
Open

MrScothh wants to merge 3 commits into
iNavFlight:maintenance-10.xfrom
MrScothh:docs/msp-registry-srxl2

Conversation

@MrScothh

Copy link
Copy Markdown
Contributor

What this fixes

check_msp.py fails on maintenance-10.x, so the MSP consistency workflow goes red on every pull request that touches MSP, whatever the pull request does. Three commands are defined in msp_protocol_v2_inav.h and answered in fc_msp.c but have no entry in msp_messages.json:

  • MSP2_INAV_ESC_SRXL2_STATUS (0x2233) and MSP2_INAV_ESC_SRXL2_CALIBRATE (0x2234), which came in with my Spektrum Smart ESC (SRXL2) motor output #11947 and which I should have added then;
  • MSP2_INAV_MAG_UNALIGNED (0x2232), which isn't mine, but without it the check stays red.

What I changed

An entry for each, written from the handlers in fc_msp.c and the enums in motor_srxl2.h, with README.md regenerated by gen_msp_docs.sh. The MAG_UNALIGNED entry is a commit of its own, so it can be dropped if its author would rather write it.

The registry version goes from 2.1.1 to 2.1.2: new entries inside the current schema, which the versioning rule counts as a patch.

Testing

check_msp.py passes ("281 C definitions match 282 JSON definitions"), and gen_msp_docs.sh leaves README.md unchanged after the commit, which is what the workflow compares.

#11979 also bumps the registry version, so whichever of the two goes in second will need that line rebased.

The command is defined in msp_protocol_v2_inav.h and answered in fc_msp.c,
but the registry never listed it, so check_msp.py fails on maintenance-10.x
and on every pull request that runs the MSP consistency workflow.
MSP2_INAV_ESC_SRXL2_STATUS and MSP2_INAV_ESC_SRXL2_CALIBRATE came in with
iNavFlight#11947 without an entry in msp_messages.json, which is two of the three
commands check_msp.py reports as missing.
@qodo-code-review

Copy link
Copy Markdown
Contributor

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can keep summaries lean with Finding overflow, which tucks the rest behind 'View more'

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Register missing MAG and SRXL2 MSP commands

🐞 Bug fix 📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Restores MSP consistency checks by registering three implemented commands missing from the
 catalog.
• Documents unaligned magnetometer readings and SRXL2 ESC status and calibration payloads.
• Bumps the registry patch version and regenerates the MSP reference.
Diagram

graph TD
  Handlers["MSP handlers"] -->|payload contract| Registry["JSON registry"] --> Generator["Docs generator"] --> Reference["MSP reference"]
  Headers["C definitions"] -->|command catalog| Checker["Consistency check"]
  Registry -->|registered commands| Checker
Loading
High-Level Assessment

The PR uses the correct existing workflow: add implemented commands to the canonical JSON registry, increment its patch version, and regenerate the Markdown reference. Editing only the generated README would be overwritten, while weakening the consistency check would conceal future registry drift.

Files changed (2) +136 / -1

Bug fix (1) +91 / -1
msp_messages.jsonRegister missing MAG and SRXL2 messages +91/-1

Register missing MAG and SRXL2 messages

• Adds canonical registry entries for 'MSP2_INAV_MAG_UNALIGNED', 'MSP2_INAV_ESC_SRXL2_STATUS', and 'MSP2_INAV_ESC_SRXL2_CALIBRATE', matching their firmware handlers. Bumps the registry patch version from 2.1.1 to 2.1.2.

docs/development/msp/msp_messages.json

Documentation (1) +45 / -0
README.mdDocument three previously missing MSPv2 commands +45/-0

Document three previously missing MSPv2 commands

• Adds generated reference sections for unaligned magnetometer readings and SRXL2 ESC status and calibration. The documentation describes command IDs, payload fields, enum values, feature requirements, and failure behavior.

docs/development/msp/README.md

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