Add MSP2 link stats message + fix missing msp-set-wp-index-and-altitu…#11496
Add MSP2 link stats message + fix missing msp-set-wp-index-and-altitu…#11496xznhj8129 wants to merge 1 commit intoiNavFlight:maintenance-9.xfrom
Conversation
…de spec + msp_gen_docs
Code Review by Qodo
|
| "name": "uplinkRSSI_dBm", | ||
| "ctype": "uint8_t", | ||
| "desc": "Uplink RSSI in dBm, sent as a positive magnitude (`getRSSI()`). For example, 70 means -70dBm.", | ||
| "units": "-dBm" |
There was a problem hiding this comment.
1. uplinkrssi_dbm docs cite getrssi() 📘 Rule violation ≡ Correctness
The new MSP2_INAV_GET_LINK_STATS documentation/spec says uplinkRSSI_dBm comes from getRSSI(), but firmware actually serializes -rxLinkStatistics.uplinkRSSI (dBm). This mismatch can cause GCS implementations to interpret the field incorrectly and breaks the documented API contract.
Agent Prompt
## Issue description
`MSP2_INAV_GET_LINK_STATS.uplinkRSSI_dBm` is documented as being sourced from `getRSSI()`, but the implementation serializes `-rxLinkStatistics.uplinkRSSI` (dBm). This makes the spec/docs inconsistent with the actual API behavior.
## Issue Context
- `getRSSI()` is documented as a normalized value in `[0, RSSI_MAX_VALUE]`, not dBm.
- The new message name and field name (`uplinkRSSI_dBm`) imply dBm, aligning with `rxLinkStatistics.uplinkRSSI`.
## Fix Focus Areas
- docs/development/msp/msp_messages.json[6963-6966]
- docs/development/msp/README.md[4372-4372]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
Test firmware build ready — commit Download firmware for PR #11496 232 targets built. Find your board's
|
|
That will go nicely with https://codeberg.org/stronnag/mwptools/issues/184 |
MSP2_INAV_GET_LINK_STATS (8451 / 0x2103)Description: Provides uplink RC link statistics for monitoring on a GCS.
Request Payload: None
Reply Payload:
uplinkRSSI_dBmuint8_tgetRSSI()). For example, 70 means -70dBm.uplinkLQuint8_trxLinkStatistics.uplinkLQ)uplinkSNRint8_trxLinkStatistics.uplinkSNR)Notes: Useful for GCS monitoring of the active RC link quality and signal margin.
PR Add two new MSP2 commands for GCS-initiated flight control #11462 added two new MSP messages, but they weren't actually defined in the msp_messages.json file; the documentation was manually updated, which nobody noticed. This also adds the messages to the spec and regenerates docs with gen_docs.sh (those enum changes are basically the delta from the last time it was run)
fixes a small, dumb bug in gen_docs which was zeroing out rev on checksum change; that whole system will be gone in 10