From 24275c03ecb881a28ad030359fcfbf3cf664a903 Mon Sep 17 00:00:00 2001 From: Ray Morris Date: Sat, 7 Feb 2026 19:53:59 -0600 Subject: [PATCH 1/4] Mark 16 legacy MSP commands as deprecated for removal in INAV 10.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. --- docs/development/msp/format.md | 1 + docs/development/msp/msp_messages.json | 14 +++++++++++++ src/main/msp/msp_protocol.h | 28 +++++++++++++------------- 3 files changed, 29 insertions(+), 14 deletions(-) diff --git a/docs/development/msp/format.md b/docs/development/msp/format.md index e8c6a348c07..bbe7c1fc6fa 100644 --- a/docs/development/msp/format.md +++ b/docs/development/msp/format.md @@ -40,6 +40,7 @@ **variable_len**: Optional boolean, if true, message does not have a predefined fixed length and needs appropriate handling\ **variants**: Optional special case, message has different cases of reply/request. Key/description is not a strict expression or code; just a readable condition\ **not_implemented**: Optional special case, message is not implemented (never or deprecated)\ +**replaced_by**: Optional array of MSP message names that replace this command. Present when a command is deprecated and scheduled for removal. Empty array if no replacement is needed\ **notes**: String with details of message ## Data dict fields: diff --git a/docs/development/msp/msp_messages.json b/docs/development/msp/msp_messages.json index e4c2a39993f..78d3c2f99e2 100644 --- a/docs/development/msp/msp_messages.json +++ b/docs/development/msp/msp_messages.json @@ -673,6 +673,7 @@ "MSP_POSITION_ESTIMATION_CONFIG": { "code": 16, "mspv": 1, + "replaced_by": ["MSP2_COMMON_SETTING"], "request": null, "reply": { "payload": [ @@ -727,6 +728,7 @@ "MSP_SET_POSITION_ESTIMATION_CONFIG": { "code": 17, "mspv": 1, + "replaced_by": ["MSP2_COMMON_SET_SETTING"], "request": { "payload": [ { @@ -2426,6 +2428,7 @@ "MSP_OSD_CONFIG": { "code": 84, "mspv": 1, + "replaced_by": ["MSP2_INAV_OSD_LAYOUTS", "MSP2_INAV_OSD_ALARMS", "MSP2_INAV_OSD_PREFERENCES"], "request": null, "reply": { "payload": [ @@ -2504,6 +2507,7 @@ "MSP_SET_OSD_CONFIG": { "code": 85, "mspv": 1, + "replaced_by": ["MSP2_INAV_OSD_SET_LAYOUT_ITEM", "MSP2_INAV_OSD_SET_ALARMS", "MSP2_INAV_OSD_SET_PREFERENCES"], "request": null, "reply": null, "notes": "Requires `USE_OSD`. Distinguishes formats based on the first byte. Format 1 requires at least 10 bytes. Format 2 requires 3 bytes. Triggers an OSD redraw. See `MSP2_INAV_OSD_SET_*` for more advanced control.", @@ -3134,6 +3138,7 @@ "MSP_FILTER_CONFIG": { "code": 92, "mspv": 1, + "replaced_by": ["MSP2_COMMON_SETTING"], "request": null, "reply": { "payload": [ @@ -3217,6 +3222,7 @@ "MSP_SET_FILTER_CONFIG": { "code": 93, "mspv": 1, + "replaced_by": ["MSP2_COMMON_SET_SETTING"], "request": { "payload": [ { @@ -3293,6 +3299,7 @@ "MSP_PID_ADVANCED": { "code": 94, "mspv": 1, + "replaced_by": ["MSP_INAV_PID"], "request": null, "reply": { "payload": [ @@ -3370,6 +3377,7 @@ "MSP_SET_PID_ADVANCED": { "code": 95, "mspv": 1, + "replaced_by": ["MSP_SET_INAV_PID"], "request": { "payload": [ { @@ -3914,6 +3922,7 @@ "MSP_ANALOG": { "code": 110, "mspv": 1, + "replaced_by": ["MSP2_INAV_ANALOG"], "request": null, "reply": { "payload": [ @@ -4039,6 +4048,7 @@ "MSP_MISC": { "code": 114, "mspv": 1, + "replaced_by": ["MSP2_INAV_MISC"], "request": null, "reply": { "payload": [ @@ -4168,6 +4178,7 @@ "MSP_PIDNAMES": { "code": 117, "mspv": 1, + "replaced_by": [], "request": null, "reply": { "payload": [ @@ -5135,6 +5146,7 @@ "MSP_SET_MISC": { "code": 207, "mspv": 1, + "replaced_by": ["MSP2_INAV_SET_MISC"], "request": { "payload": [ { @@ -5588,6 +5600,7 @@ "MSP_SERVO_MIX_RULES": { "code": 241, "mspv": 1, + "replaced_by": ["MSP2_INAV_SERVO_MIXER"], "request": null, "reply": { "payload": [ @@ -5644,6 +5657,7 @@ "MSP_SET_SERVO_MIX_RULE": { "code": 242, "mspv": 1, + "replaced_by": ["MSP2_INAV_SET_SERVO_MIXER"], "request": { "payload": [ { diff --git a/src/main/msp/msp_protocol.h b/src/main/msp/msp_protocol.h index 5a3af115f9c..fa385fc4f75 100644 --- a/src/main/msp/msp_protocol.h +++ b/src/main/msp/msp_protocol.h @@ -110,8 +110,8 @@ #define MSP_CALIBRATION_DATA 14 #define MSP_SET_CALIBRATION_DATA 15 -#define MSP_POSITION_ESTIMATION_CONFIG 16 -#define MSP_SET_POSITION_ESTIMATION_CONFIG 17 +#define MSP_POSITION_ESTIMATION_CONFIG 16 //DEPRECATED in INAV 9.1 - use settings system instead. Will be removed in INAV 10.0 +#define MSP_SET_POSITION_ESTIMATION_CONFIG 17 //DEPRECATED in INAV 9.1 - use settings system instead. Will be removed in INAV 10.0 #define MSP_WP_MISSION_LOAD 18 // Load mission from NVRAM #define MSP_WP_MISSION_SAVE 19 // Save mission to NVRAM @@ -189,8 +189,8 @@ #define MSP_TRANSPONDER_CONFIG 82 //out message Get transponder settings #define MSP_SET_TRANSPONDER_CONFIG 83 //in message Set transponder settings -#define MSP_OSD_CONFIG 84 //out message Get osd settings - betaflight -#define MSP_SET_OSD_CONFIG 85 //in message Set osd settings - betaflight +#define MSP_OSD_CONFIG 84 //DEPRECATED in INAV 9.1 - use MSP2_INAV_OSD_* instead. Will be removed in INAV 10.0 +#define MSP_SET_OSD_CONFIG 85 //DEPRECATED in INAV 9.1 - use MSP2_INAV_OSD_* instead. Will be removed in INAV 10.0 #define MSP_OSD_CHAR_READ 86 //out message Get osd settings - betaflight #define MSP_OSD_CHAR_WRITE 87 //in message Set osd settings - betaflight @@ -202,10 +202,10 @@ #define MSP_ADVANCED_CONFIG 90 #define MSP_SET_ADVANCED_CONFIG 91 -#define MSP_FILTER_CONFIG 92 -#define MSP_SET_FILTER_CONFIG 93 -#define MSP_PID_ADVANCED 94 -#define MSP_SET_PID_ADVANCED 95 +#define MSP_FILTER_CONFIG 92 //DEPRECATED in INAV 9.1 - use settings system instead. Will be removed in INAV 10.0 +#define MSP_SET_FILTER_CONFIG 93 //DEPRECATED in INAV 9.1 - use settings system instead. Will be removed in INAV 10.0 +#define MSP_PID_ADVANCED 94 //DEPRECATED in INAV 9.1 - use MSP_INAV_PID/MSP_SET_INAV_PID instead. Will be removed in INAV 10.0 +#define MSP_SET_PID_ADVANCED 95 //DEPRECATED in INAV 9.1 - use MSP_INAV_PID/MSP_SET_INAV_PID instead. Will be removed in INAV 10.0 #define MSP_SENSOR_CONFIG 96 #define MSP_SET_SENSOR_CONFIG 97 @@ -240,12 +240,12 @@ #define MSP_COMP_GPS 107 //out message distance home, direction home #define MSP_ATTITUDE 108 //out message 2 angles 1 heading #define MSP_ALTITUDE 109 //out message altitude, variometer -#define MSP_ANALOG 110 //out message vbat, powermetersum, rssi if available on RX +#define MSP_ANALOG 110 //DEPRECATED in INAV 9.1 - use MSP2_INAV_ANALOG instead. Will be removed in INAV 10.0 #define MSP_RC_TUNING 111 //out message rc rate, rc expo, rollpitch rate, yaw rate, dyn throttle PID #define MSP_ACTIVEBOXES 113 //out message Active box flags (full width, more than 32 bits) -#define MSP_MISC 114 //out message powermeter trig +#define MSP_MISC 114 //DEPRECATED in INAV 9.1 - use MSP2_INAV_MISC instead. Will be removed in INAV 10.0 #define MSP_BOXNAMES 116 //out message the aux switch names -#define MSP_PIDNAMES 117 //out message the PID names +#define MSP_PIDNAMES 117 //DEPRECATED in INAV 9.1 - no replacement needed (static data). Will be removed in INAV 10.0 #define MSP_WP 118 //out message get a WP, WP# is in the payload, returns (WP#, lat, lon, alt, flags) WP#0-home, WP#16-poshold #define MSP_BOXIDS 119 //out message get the permanent IDs associated to BOXes #define MSP_SERVO_CONFIGURATIONS 120 //out message All servo configurations. @@ -263,7 +263,7 @@ #define MSP_SET_RC_TUNING 204 //in message rc rate, rc expo, rollpitch rate, yaw rate, dyn throttle PID, yaw expo #define MSP_ACC_CALIBRATION 205 //in message no param #define MSP_MAG_CALIBRATION 206 //in message no param -#define MSP_SET_MISC 207 //in message powermeter trig + 8 free for future use +#define MSP_SET_MISC 207 //DEPRECATED in INAV 9.1 - use MSP2_INAV_SET_MISC instead. Will be removed in INAV 10.0 #define MSP_RESET_CONF 208 //in message no param #define MSP_SET_WP 209 //in message sets a given WP (WP#,lat, lon, alt, flags) #define MSP_SELECT_SETTING 210 //in message Select Setting Number (0-2) @@ -295,8 +295,8 @@ #define MSP_GPSSTATISTICS 166 //out message get GPS debugging data #define MSP_ACC_TRIM 240 //out message get acc angle trim values #define MSP_SET_ACC_TRIM 239 //in message set acc angle trim values -#define MSP_SERVO_MIX_RULES 241 //out message Returns servo mixer configuration -#define MSP_SET_SERVO_MIX_RULE 242 //in message Sets servo mixer configuration +#define MSP_SERVO_MIX_RULES 241 //DEPRECATED in INAV 9.1 - use MSP2_INAV_SERVO_MIXER instead. Will be removed in INAV 10.0 +#define MSP_SET_SERVO_MIX_RULE 242 //DEPRECATED in INAV 9.1 - use MSP2_INAV_SET_SERVO_MIXER instead. Will be removed in INAV 10.0 #define MSP_SET_PASSTHROUGH 245 //in message Sets up passthrough to different peripherals (4way interface, uart, etc...) #define MSP_RTC 246 //out message Gets the RTC clock (returns: secs(i32) millis(u16) - (0,0) if time is not known) #define MSP_SET_RTC 247 //in message Sets the RTC clock (args: secs(i32) millis(u16)) From 435e489959b985f9174c8bfad7ab088e7ee760b6 Mon Sep 17 00:00:00 2001 From: Sensei Date: Sat, 7 Feb 2026 20:32:06 -0600 Subject: [PATCH 2/4] msp_protocol.h change depreciation comment format Co-authored-by: qodo-code-review[bot] <151058649+qodo-code-review[bot]@users.noreply.github.com> --- src/main/msp/msp_protocol.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/msp/msp_protocol.h b/src/main/msp/msp_protocol.h index fa385fc4f75..e1cbd028293 100644 --- a/src/main/msp/msp_protocol.h +++ b/src/main/msp/msp_protocol.h @@ -204,8 +204,8 @@ #define MSP_FILTER_CONFIG 92 //DEPRECATED in INAV 9.1 - use settings system instead. Will be removed in INAV 10.0 #define MSP_SET_FILTER_CONFIG 93 //DEPRECATED in INAV 9.1 - use settings system instead. Will be removed in INAV 10.0 -#define MSP_PID_ADVANCED 94 //DEPRECATED in INAV 9.1 - use MSP_INAV_PID/MSP_SET_INAV_PID instead. Will be removed in INAV 10.0 -#define MSP_SET_PID_ADVANCED 95 //DEPRECATED in INAV 9.1 - use MSP_INAV_PID/MSP_SET_INAV_PID instead. Will be removed in INAV 10.0 +#define MSP_PID_ADVANCED 94 //DEPRECATED in INAV 9.1 - use MSP_INAV_PID instead. Will be removed in INAV 10.0 +#define MSP_SET_PID_ADVANCED 95 //DEPRECATED in INAV 9.1 - use MSP_SET_INAV_PID instead. Will be removed in INAV 10.0 #define MSP_SENSOR_CONFIG 96 #define MSP_SET_SENSOR_CONFIG 97 From e5bcf839535de1e7567d611ce01c25fc1adf67ff Mon Sep 17 00:00:00 2001 From: Ray Morris Date: Sun, 1 Mar 2026 14:10:29 -0600 Subject: [PATCH 3/4] Mark MSP_STATUS, MSP_DEBUG, and blackbox config commands as deprecated Add replaced_by fields to msp_messages.json and deprecation comments to msp_protocol.h for MSP_BLACKBOX_CONFIG, MSP_SET_BLACKBOX_CONFIG, MSP_STATUS, and MSP_DEBUG. MSP_STATUS_EX not marked deprecated because its accCalibAxisFlags field is absent from MSP2_INAV_STATUS. --- docs/development/msp/msp_messages.json | 4 ++++ src/main/msp/msp_protocol.h | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/development/msp/msp_messages.json b/docs/development/msp/msp_messages.json index 78d3c2f99e2..db4e7ebf2b1 100644 --- a/docs/development/msp/msp_messages.json +++ b/docs/development/msp/msp_messages.json @@ -2362,6 +2362,7 @@ "MSP_BLACKBOX_CONFIG": { "code": 80, "mspv": 1, + "replaced_by": ["MSP2_BLACKBOX_CONFIG"], "request": null, "reply": { "payload": [ @@ -2401,6 +2402,7 @@ "MSP_SET_BLACKBOX_CONFIG": { "code": 81, "mspv": 1, + "replaced_by": ["MSP2_SET_BLACKBOX_CONFIG"], "not_implemented": true, "request": null, "reply": null, @@ -3607,6 +3609,7 @@ "MSP_STATUS": { "code": 101, "mspv": 1, + "replaced_by": ["MSP2_INAV_STATUS"], "request": null, "reply": { "payload": [ @@ -5817,6 +5820,7 @@ "MSP_DEBUG": { "code": 254, "mspv": 1, + "replaced_by": ["MSP2_INAV_DEBUG"], "request": null, "reply": { "payload": [ diff --git a/src/main/msp/msp_protocol.h b/src/main/msp/msp_protocol.h index e1cbd028293..4a6cb877237 100644 --- a/src/main/msp/msp_protocol.h +++ b/src/main/msp/msp_protocol.h @@ -183,8 +183,8 @@ #define MSP_SDCARD_SUMMARY 79 //out message Get the state of the SD card -#define MSP_BLACKBOX_CONFIG 80 //out message Get blackbox settings -#define MSP_SET_BLACKBOX_CONFIG 81 //in message Set blackbox settings +#define MSP_BLACKBOX_CONFIG 80 //DEPRECATED in INAV 9.1, use MSP2_BLACKBOX_CONFIG. Will be removed in INAV 10.0 +#define MSP_SET_BLACKBOX_CONFIG 81 //DEPRECATED in INAV 9.1, use MSP2_SET_BLACKBOX_CONFIG. Will be removed in INAV 10.0 #define MSP_TRANSPONDER_CONFIG 82 //out message Get transponder settings #define MSP_SET_TRANSPONDER_CONFIG 83 //in message Set transponder settings @@ -231,7 +231,7 @@ // Multwii original MSP commands // -#define MSP_STATUS 101 //out message cycletime & errors_count & sensor present & box activation & current setting number +#define MSP_STATUS 101 //DEPRECATED in INAV 9.1, use MSP2_INAV_STATUS. Will be removed in INAV 10.0 #define MSP_RAW_IMU 102 //out message 9 DOF #define MSP_SERVO 103 //out message servos #define MSP_MOTOR 104 //out message motors @@ -284,7 +284,7 @@ #define MSP_RESERVE_1 251 //reserved for system usage #define MSP_RESERVE_2 252 //reserved for system usage #define MSP_DEBUGMSG 253 //out message debug string buffer -#define MSP_DEBUG 254 //out message debug1,debug2,debug3,debug4 +#define MSP_DEBUG 254 //DEPRECATED in INAV 9.1, use MSP2_INAV_DEBUG. Will be removed in INAV 10.0 #define MSP_V2_FRAME 255 //MSPv2 payload indicator // Additional commands that are not compatible with MultiWii From 1aec36a770a8036b45a7dfdefa54c3c915b59a83 Mon Sep 17 00:00:00 2001 From: Ray Morris Date: Sun, 1 Mar 2026 14:14:57 -0600 Subject: [PATCH 4/4] Mark MSP_STATUS_EX as deprecated; accCalibAxisFlags in MSP_CALIBRATION_DATA MSP2_INAV_STATUS supersedes MSP_STATUS_EX for all status fields. The accCalibAxisFlags field absent from MSP2_INAV_STATUS is available via MSP_CALIBRATION_DATA. --- docs/development/msp/msp_messages.json | 3 ++- src/main/msp/msp_protocol.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/development/msp/msp_messages.json b/docs/development/msp/msp_messages.json index db4e7ebf2b1..84d603de8e1 100644 --- a/docs/development/msp/msp_messages.json +++ b/docs/development/msp/msp_messages.json @@ -4658,6 +4658,7 @@ "MSP_STATUS_EX": { "code": 150, "mspv": 1, + "replaced_by": ["MSP2_INAV_STATUS"], "request": null, "reply": { "payload": [ @@ -4715,7 +4716,7 @@ } ] }, - "notes": "Superseded by `MSP2_INAV_STATUS` which provides the full 32-bit `armingFlags` and other enhancements.", + "notes": "Superseded by `MSP2_INAV_STATUS` which provides the full 32-bit `armingFlags` and other enhancements. The `accCalibAxisFlags` field is not present in `MSP2_INAV_STATUS` but is available via `MSP_CALIBRATION_DATA`.", "description": "Provides extended flight controller status, including CPU load, arming flags, and calibration status, in addition to `MSP_STATUS` fields." }, "MSP_SENSOR_STATUS": { diff --git a/src/main/msp/msp_protocol.h b/src/main/msp/msp_protocol.h index 4a6cb877237..406cfe28ddf 100644 --- a/src/main/msp/msp_protocol.h +++ b/src/main/msp/msp_protocol.h @@ -288,7 +288,7 @@ #define MSP_V2_FRAME 255 //MSPv2 payload indicator // Additional commands that are not compatible with MultiWii -#define MSP_STATUS_EX 150 //out message cycletime, errors_count, CPU load, sensor present etc +#define MSP_STATUS_EX 150 //DEPRECATED in INAV 9.1, use MSP2_INAV_STATUS (accCalibAxisFlags available via MSP_CALIBRATION_DATA). Will be removed in INAV 10.0 #define MSP_SENSOR_STATUS 151 //out message Hardware sensor status #define MSP_UID 160 //out message Unique device ID #define MSP_GPSSVINFO 164 //out message get Signal Strength (only U-Blox)