1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-25 17:25:18 +03:00

Merge pull request #2893 from iNavFlight/de_pid_improvements

MC PID improvements
This commit is contained in:
Konstantin Sharlaimov 2018-04-22 09:44:35 +10:00 committed by GitHub
commit ff06f6c53d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 56 additions and 49 deletions

View file

@ -1040,8 +1040,8 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
break;
case MSP_PID_ADVANCED:
sbufWriteU16(dst, pidProfile()->rollPitchItermIgnoreRate);
sbufWriteU16(dst, pidProfile()->yawItermIgnoreRate);
sbufWriteU16(dst, 0); // pidProfile()->rollPitchItermIgnoreRate
sbufWriteU16(dst, 0); // pidProfile()->yawItermIgnoreRate
sbufWriteU16(dst, pidProfile()->yaw_p_limit);
sbufWriteU8(dst, 0); //BF: pidProfile()->deltaMethod
sbufWriteU8(dst, 0); //BF: pidProfile()->vbatPidCompensation
@ -1781,8 +1781,8 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src)
case MSP_SET_PID_ADVANCED:
if (dataSize >= 17) {
pidProfileMutable()->rollPitchItermIgnoreRate = sbufReadU16(src);
pidProfileMutable()->yawItermIgnoreRate = sbufReadU16(src);
sbufReadU16(src); // pidProfileMutable()->rollPitchItermIgnoreRate
sbufReadU16(src); // pidProfileMutable()->yawItermIgnoreRate
pidProfileMutable()->yaw_p_limit = sbufReadU16(src);
sbufReadU8(src); //BF: pidProfileMutable()->deltaMethod