From 08050a13bbada00c82e47aa321267662d970c46d Mon Sep 17 00:00:00 2001 From: "Pawel Spychalski (DzikuVx)" Date: Wed, 10 Apr 2024 21:07:28 +0200 Subject: [PATCH] Revert "Revert "Merge pull request #9901 from iNavFlight/dzikuvx-drop-MSP_PID_ADVANCED"" This reverts commit 6481f1ef25dc146aff6b4e20d2f213dfc17d895a. --- src/main/fc/fc_msp.c | 42 ------------------------------------- src/main/msp/msp_protocol.h | 2 -- 2 files changed, 44 deletions(-) diff --git a/src/main/fc/fc_msp.c b/src/main/fc/fc_msp.c index 63c7468ea69..ee97a9f1e65 100644 --- a/src/main/fc/fc_msp.c +++ b/src/main/fc/fc_msp.c @@ -1260,25 +1260,6 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF sbufWriteU16(dst, accelerometerConfig()->acc_notch_cutoff); sbufWriteU16(dst, 0); //Was gyroConfig()->gyro_stage2_lowpass_hz - break; - - case MSP_PID_ADVANCED: - sbufWriteU16(dst, 0); // pidProfile()->rollPitchItermIgnoreRate - sbufWriteU16(dst, 0); // pidProfile()->yawItermIgnoreRate - sbufWriteU16(dst, 0); //pidProfile()->yaw_p_limit - sbufWriteU8(dst, 0); //BF: pidProfile()->deltaMethod - sbufWriteU8(dst, 0); //BF: pidProfile()->vbatPidCompensation - sbufWriteU8(dst, 0); //BF: pidProfile()->setpointRelaxRatio - sbufWriteU8(dst, 0); - sbufWriteU16(dst, pidProfile()->pidSumLimit); - sbufWriteU8(dst, 0); //BF: pidProfile()->itermThrottleGain - - /* - * To keep compatibility on MSP frame length level with Betaflight, axis axisAccelerationLimitYaw - * limit will be sent and received in [dps / 10] - */ - sbufWriteU16(dst, constrain(pidProfile()->axisAccelerationLimitRollPitch / 10, 0, 65535)); - sbufWriteU16(dst, constrain(pidProfile()->axisAccelerationLimitYaw / 10, 0, 65535)); break; case MSP_INAV_PID: @@ -2297,29 +2278,6 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src) return MSP_RESULT_ERROR; break; - case MSP_SET_PID_ADVANCED: - if (dataSize == 17) { - sbufReadU16(src); // pidProfileMutable()->rollPitchItermIgnoreRate - sbufReadU16(src); // pidProfileMutable()->yawItermIgnoreRate - sbufReadU16(src); //pidProfile()->yaw_p_limit - - sbufReadU8(src); //BF: pidProfileMutable()->deltaMethod - sbufReadU8(src); //BF: pidProfileMutable()->vbatPidCompensation - sbufReadU8(src); //BF: pidProfileMutable()->setpointRelaxRatio - sbufReadU8(src); - pidProfileMutable()->pidSumLimit = sbufReadU16(src); - sbufReadU8(src); //BF: pidProfileMutable()->itermThrottleGain - - /* - * To keep compatibility on MSP frame length level with Betaflight, axis axisAccelerationLimitYaw - * limit will be sent and received in [dps / 10] - */ - pidProfileMutable()->axisAccelerationLimitRollPitch = sbufReadU16(src) * 10; - pidProfileMutable()->axisAccelerationLimitYaw = sbufReadU16(src) * 10; - } else - return MSP_RESULT_ERROR; - break; - case MSP_SET_INAV_PID: if (dataSize == 15) { sbufReadU8(src); //Legacy, no longer in use async processing value diff --git a/src/main/msp/msp_protocol.h b/src/main/msp/msp_protocol.h index ac847afeaec..62e3c0d1a3d 100644 --- a/src/main/msp/msp_protocol.h +++ b/src/main/msp/msp_protocol.h @@ -204,8 +204,6 @@ #define MSP_FILTER_CONFIG 92 #define MSP_SET_FILTER_CONFIG 93 -#define MSP_PID_ADVANCED 94 -#define MSP_SET_PID_ADVANCED 95 #define MSP_SENSOR_CONFIG 96 #define MSP_SET_SENSOR_CONFIG 97