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:
parent
6f147c12e5
commit
1d22cf70b3
1 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue