1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 21:05:35 +03:00

MSP for smart_feedforward and throttle boost

Added 3 new MSP values: throttle boost and smart feedforward
This commit is contained in:
supiiik 2018-06-03 13:53:10 +02:00
parent 6f147c12e5
commit 1d22cf70b3

View file

@ -1263,6 +1263,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:
@ -1726,6 +1729,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;