⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@sensei-hacker
Copy link
Member

@sensei-hacker sensei-hacker commented Feb 8, 2026

User description

Summary

Marks 16 legacy MSP commands as deprecated with specific replacement info, rather than immediately dropping them. This gives third-party developers (ground stations, OSD tools, telemetry apps, scripting libraries) a full major release cycle of notice before removal in INAV 10.0.

All commands remain fully functional — no behavioral changes, no code removal, no API version bump.

Supersedes

This PR supersedes the following PRs which proposed immediate removal without a deprecation period:

Deprecated commands and their replacements

Command Code Replaced by
MSP_POSITION_ESTIMATION_CONFIG 16 MSP2_COMMON_SETTING
MSP_SET_POSITION_ESTIMATION_CONFIG 17 MSP2_COMMON_SET_SETTING
MSP_OSD_CONFIG 84 MSP2_INAV_OSD_LAYOUTS / MSP2_INAV_OSD_ALARMS / MSP2_INAV_OSD_PREFERENCES
MSP_SET_OSD_CONFIG 85 MSP2_INAV_OSD_SET_LAYOUT_ITEM / MSP2_INAV_OSD_SET_ALARMS / MSP2_INAV_OSD_SET_PREFERENCES
MSP_FILTER_CONFIG 92 MSP2_COMMON_SETTING
MSP_SET_FILTER_CONFIG 93 MSP2_COMMON_SET_SETTING
MSP_PID_ADVANCED 94 MSP_INAV_PID
MSP_SET_PID_ADVANCED 95 MSP_SET_INAV_PID
MSP_ANALOG 110 MSP2_INAV_ANALOG
MSP_MISC 114 MSP2_INAV_MISC
MSP_PIDNAMES 117 No replacement needed (static data)
MSP_SET_MISC 207 MSP2_INAV_SET_MISC
MSP_SERVO_MIX_RULES 241 MSP2_INAV_SERVO_MIXER
MSP_SET_SERVO_MIX_RULE 242 MSP2_INAV_SET_SERVO_MIXER

None of these commands were previously marked as deprecated.

Changes

  • src/main/msp/msp_protocol.h — Added //DEPRECATED in INAV 9.1 comments with replacement info to all 16 #defines
  • docs/development/msp/msp_messages.json — Added "replaced_by" field to all 14 command entries
  • docs/development/msp/format.md — Documented the new replaced_by schema field

Why deprecate instead of drop?

Third-party tools (mwptools, mobile ground stations, Lua scripts, Python libraries) may still use these commands. Dropping without notice breaks those tools silently. A deprecation cycle gives developers time to migrate, then allows clean removal in INAV 10.0.

Testing

Documentation/comment-only changes — no compiled code modified. JSON schema validated.


PR Type

Enhancement


Description

  • Mark 16 legacy MSP commands as deprecated for removal in INAV 10.0

  • Add deprecation comments with replacement guidance to protocol header

  • Document replaced_by field in MSP message JSON schema

  • Populate replaced_by field for all 14 deprecated command entries


Diagram Walkthrough

flowchart LR
  A["Legacy MSP Commands<br/>16 commands"] -->|Add deprecation comments| B["msp_protocol.h<br/>with replacement info"]
  A -->|Document schema field| C["format.md<br/>replaced_by field"]
  A -->|Populate metadata| D["msp_messages.json<br/>14 entries updated"]
  B --> E["Full major release cycle<br/>before removal"]
  C --> E
  D --> E
Loading

File Walkthrough

Relevant files
Documentation
msp_protocol.h
Add deprecation notices to legacy MSP command definitions

src/main/msp/msp_protocol.h

  • Added //DEPRECATED in INAV 9.1 comments to 16 MSP command #define
    statements
  • Included specific replacement command names or guidance for each
    deprecated command
  • Commands affected: MSP_POSITION_ESTIMATION_CONFIG (16),
    MSP_SET_POSITION_ESTIMATION_CONFIG (17), MSP_OSD_CONFIG (84),
    MSP_SET_OSD_CONFIG (85), MSP_FILTER_CONFIG (92), MSP_SET_FILTER_CONFIG
    (93), MSP_PID_ADVANCED (94), MSP_SET_PID_ADVANCED (95), MSP_ANALOG
    (110), MSP_MISC (114), MSP_PIDNAMES (117), MSP_SET_MISC (207),
    MSP_SERVO_MIX_RULES (241), MSP_SET_SERVO_MIX_RULE (242)
  • No functional code changes, only documentation comments
+14/-14 
format.md
Document replaced_by schema field for deprecated commands

docs/development/msp/format.md

  • Added documentation for new replaced_by schema field in MSP message
    format
  • Defined as optional array of MSP message names that replace deprecated
    commands
  • Clarified that empty array indicates no replacement is needed
+1/-0     
Configuration changes
msp_messages.json
Populate replaced_by metadata for deprecated MSP commands

docs/development/msp/msp_messages.json

  • Added replaced_by field to 14 deprecated MSP command entries in JSON
    schema
  • MSP_POSITION_ESTIMATION_CONFIG (16) → ["MSP2_COMMON_SETTING"]
  • MSP_SET_POSITION_ESTIMATION_CONFIG (17) → ["MSP2_COMMON_SET_SETTING"]
  • MSP_OSD_CONFIG (84) → ["MSP2_INAV_OSD_LAYOUTS",
    "MSP2_INAV_OSD_ALARMS", "MSP2_INAV_OSD_PREFERENCES"]
  • MSP_SET_OSD_CONFIG (85) → ["MSP2_INAV_OSD_SET_LAYOUT_ITEM",
    "MSP2_INAV_OSD_SET_ALARMS", "MSP2_INAV_OSD_SET_PREFERENCES"]
  • MSP_FILTER_CONFIG (92) → ["MSP2_COMMON_SETTING"]
  • MSP_SET_FILTER_CONFIG (93) → ["MSP2_COMMON_SET_SETTING"]
  • MSP_PID_ADVANCED (94) → ["MSP_INAV_PID"]
  • MSP_SET_PID_ADVANCED (95) → ["MSP_SET_INAV_PID"]
  • MSP_ANALOG (110) → ["MSP2_INAV_ANALOG"]
  • MSP_MISC (114) → ["MSP2_INAV_MISC"]
  • MSP_PIDNAMES (117) → [] (no replacement needed)
  • MSP_SET_MISC (207) → ["MSP2_INAV_SET_MISC"]
  • MSP_SERVO_MIX_RULES (241) → ["MSP2_INAV_SERVO_MIXER"]
  • MSP_SET_SERVO_MIX_RULE (242) → ["MSP2_INAV_SET_SERVO_MIXER"]
+14/-0   

Deprecate the following MSP commands with replacement info:
- MSP_ANALOG (110) -> MSP2_INAV_ANALOG
- MSP_MISC (114) / MSP_SET_MISC (207) -> MSP2_INAV_MISC / MSP2_INAV_SET_MISC
- MSP_PIDNAMES (117) -> no replacement needed
- MSP_FILTER_CONFIG (92) / MSP_SET_FILTER_CONFIG (93) -> MSP2_COMMON_SETTING
- MSP_PID_ADVANCED (94) / MSP_SET_PID_ADVANCED (95) -> MSP_INAV_PID
- MSP_OSD_CONFIG (84) / MSP_SET_OSD_CONFIG (85) -> MSP2_INAV_OSD_*
- MSP_POSITION_ESTIMATION_CONFIG (16) / MSP_SET_POSITION_ESTIMATION_CONFIG (17) -> MSP2_COMMON_SETTING
- MSP_SERVO_MIX_RULES (241) / MSP_SET_SERVO_MIX_RULE (242) -> MSP2_INAV_SERVO_MIXER

Commands remain fully functional. This gives third-party developers
a full major release cycle of notice before removal.

Also adds "replaced_by" field to the MSP message JSON schema
(docs/development/msp/format.md) and populates it for all 14 entries.
@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Feb 8, 2026

PR Compliance Guide 🔍

All compliance sections have been disabled in the configurations.

@sensei-hacker
Copy link
Member Author

@xznhj8129 Does this addition to the JSON work for you?

@sensei-hacker sensei-hacker added this to the 9.1 milestone Feb 8, 2026
@sensei-hacker sensei-hacker changed the title Deprecate 16 legacy MSP commands (for removal in INAV 10.0) Deprecate 16 legacy MSP commands (for removal in INAV 10.0 or 11) Feb 8, 2026
@xznhj8129
Copy link
Contributor

@xznhj8129 Does this addition to the JSON work for you?

Yes that looks like a solid addition, will make it easier to parse rather than just a note

Co-authored-by: qodo-code-review[bot] <151058649+qodo-code-review[bot]@users.noreply.github.com>
@stronnag
Copy link
Collaborator

stronnag commented Feb 8, 2026

If you really think this is worth doing, by the same logic, you might consider deprecating other obsolete messages superseded by MSP2_INAV_STATUS, e.g.:

  • MSP_STATUS
  • MSP_STATUS_EX

and MSP_DEBUG (superseded by MSP2_INAV_DEBUG).

and MSP_SET_BLACKBOX_CONFIG (superseded by MSP2_SET_BLACKBOX_CONFIG, #4302)

and probably the others listed as "Superseded" in the MSP reference.

Also

  • Bump MSP API_VERSION_MINOR

@sensei-hacker
Copy link
Member Author

sensei-hacker commented Feb 8, 2026

Bump MSP API_VERSION_MINOR

Should we bump the version number when we aren't adding or removing anything other than a comment? I don't mind doing so, just checking. Or should that wait until we actually change the implementation, when something is removed in INAV 10 or 11?

If you really think this is worth doing, by the same logic

What do you think? This was initiated by Pawel and I was somewhat figuring "if Pawel think it should be done, maybe it should be". I also value your opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants