From 0fdbb9509ccff231e2d859250763bb33e074c60f Mon Sep 17 00:00:00 2001 From: "Pawel Spychalski (DzikuVx)" Date: Wed, 10 Apr 2024 20:54:49 +0200 Subject: [PATCH 1/2] Drop MSP_SET_SERVO_MIX_RULE command --- src/main/fc/fc_msp.c | 26 +------------------------- src/main/msp/msp_protocol.h | 2 -- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/src/main/fc/fc_msp.c b/src/main/fc/fc_msp.c index 75af8dabbbb..db915dd8131 100644 --- a/src/main/fc/fc_msp.c +++ b/src/main/fc/fc_msp.c @@ -504,17 +504,7 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF sbufWriteU32(dst, 0); //Input reversing is not required since it can be done on mixer level } break; - case MSP_SERVO_MIX_RULES: - for (int i = 0; i < MAX_SERVO_RULES; i++) { - sbufWriteU8(dst, customServoMixers(i)->targetChannel); - sbufWriteU8(dst, customServoMixers(i)->inputSource); - sbufWriteU16(dst, customServoMixers(i)->rate); - sbufWriteU8(dst, customServoMixers(i)->speed); - sbufWriteU8(dst, 0); - sbufWriteU8(dst, 100); - sbufWriteU8(dst, 0); - } - break; + case MSP2_INAV_SERVO_MIXER: for (int i = 0; i < MAX_SERVO_RULES; i++) { sbufWriteU8(dst, customServoMixers(i)->targetChannel); @@ -2098,20 +2088,6 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src) } break; - case MSP_SET_SERVO_MIX_RULE: - sbufReadU8Safe(&tmp_u8, src); - if ((dataSize == 9) && (tmp_u8 < MAX_SERVO_RULES)) { - customServoMixersMutable(tmp_u8)->targetChannel = sbufReadU8(src); - customServoMixersMutable(tmp_u8)->inputSource = sbufReadU8(src); - customServoMixersMutable(tmp_u8)->rate = sbufReadU16(src); - customServoMixersMutable(tmp_u8)->speed = sbufReadU8(src); - sbufReadU16(src); //Read 2bytes for min/max and ignore it - sbufReadU8(src); //Read 1 byte for `box` and ignore it - loadCustomServoMixer(); - } else - return MSP_RESULT_ERROR; - break; - case MSP2_INAV_SET_SERVO_MIXER: sbufReadU8Safe(&tmp_u8, src); if ((dataSize == 7) && (tmp_u8 < MAX_SERVO_RULES)) { diff --git a/src/main/msp/msp_protocol.h b/src/main/msp/msp_protocol.h index 9840b39aa39..0fda145a11e 100644 --- a/src/main/msp/msp_protocol.h +++ b/src/main/msp/msp_protocol.h @@ -290,8 +290,6 @@ #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_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 7cc9ca13be63d9f8d0fe5982db02b0ae4e362ff8 Mon Sep 17 00:00:00 2001 From: Ray Morris Date: Sat, 29 Aug 2026 19:43:54 -0500 Subject: [PATCH 2/2] Remove leftover MSP_SET_SERVO_MIX_RULE reference from MSP2_INAV_SET_SERVO_MIXER description The dropped command's cross-reference remained in the JSON description after the README was already cleaned. --- docs/development/msp/msp_messages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/msp/msp_messages.json b/docs/development/msp/msp_messages.json index e5c5cdaee67..06f29779bc4 100644 --- a/docs/development/msp/msp_messages.json +++ b/docs/development/msp/msp_messages.json @@ -8972,7 +8972,7 @@ }, "reply": null, "notes": "Expects 7 bytes. Returns error if index invalid. Calls `loadCustomServoMixer()`.", - "description": "Sets a single custom servo mixer rule, including programming framework condition ID. Supersedes `MSP_SET_SERVO_MIX_RULE`." + "description": "Sets a single custom servo mixer rule, including programming framework condition ID." }, "MSP2_INAV_LOGIC_CONDITIONS": { "code": 8226,