1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-18 22:05:17 +03:00

Merge pull request #6038 from supiiik/master

MSP for smart_feedforward and throttle boost
This commit is contained in:
Michael Keller 2018-07-17 01:26:48 +12:00 committed by GitHub
commit 8607b1c38b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1262,6 +1262,9 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
sbufWriteU16(dst, currentPidProfile->itermThrottleThreshold);
sbufWriteU16(dst, currentPidProfile->itermAcceleratorGain);
sbufWriteU16(dst, currentPidProfile->dtermSetpointWeight);
sbufWriteU8(dst, currentPidProfile->smart_feedforward);
sbufWriteU8(dst, currentPidProfile->throttle_boost);
sbufWriteU8(dst, currentPidProfile->throttle_boost_cutoff);
break;
case MSP_SENSOR_CONFIG:
@ -1742,6 +1745,11 @@ static mspResult_e mspProcessInCommand(uint8_t cmdMSP, sbuf_t *src)
if (sbufBytesRemaining(src) >= 2) {
currentPidProfile->dtermSetpointWeight = sbufReadU16(src);
}
if (sbufBytesRemaining(src) >= 3) {
currentPidProfile->smart_feedforward = sbufReadU8(src);
currentPidProfile->throttle_boost = sbufReadU8(src);
currentPidProfile->throttle_boost_cutoff = sbufReadU8(src);
}
pidInitConfig(currentPidProfile);
break;