1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-23 08:15:26 +03:00

Merge pull request #9901 from iNavFlight/dzikuvx-drop-MSP_PID_ADVANCED

Drop MSP_PID_ADVANCED and MSP_SET_PID_ADVANCED from MSP protocol
This commit is contained in:
Paweł Spychalski 2024-04-09 18:45:28 +02:00 committed by GitHub
commit cea4397f7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 0 additions and 45 deletions

View file

@ -1200,25 +1200,6 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
sbufWriteU8(dst, 0);
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:
sbufWriteU8(dst, 0); //Legacy, no longer in use async processing value
sbufWriteU16(dst, 0); //Legacy, no longer in use async processing value
@ -2164,29 +2145,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

View file

@ -196,9 +196,6 @@
#define MSP_ADVANCED_CONFIG 90
#define MSP_SET_ADVANCED_CONFIG 91
#define MSP_PID_ADVANCED 94
#define MSP_SET_PID_ADVANCED 95
#define MSP_SENSOR_CONFIG 96
#define MSP_SET_SENSOR_CONFIG 97