mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 13:25:30 +03:00
Add throttle_limit settings to MSP
The feature has been in place and stable since 3.4 so it seems reasonable to add it to MSP so it can be added to the configurator.
This commit is contained in:
parent
e24a4fe4de
commit
78ecccd724
1 changed files with 11 additions and 0 deletions
|
@ -936,6 +936,11 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst)
|
|||
sbufWriteU8(dst, currentControlRateProfile->rcRates[FD_YAW]);
|
||||
sbufWriteU8(dst, currentControlRateProfile->rcRates[FD_PITCH]);
|
||||
sbufWriteU8(dst, currentControlRateProfile->rcExpo[FD_PITCH]);
|
||||
|
||||
// added in 1.41
|
||||
sbufWriteU8(dst, currentControlRateProfile->throttle_limit_type);
|
||||
sbufWriteU8(dst, currentControlRateProfile->throttle_limit_percent);
|
||||
|
||||
break;
|
||||
|
||||
case MSP_PID:
|
||||
|
@ -1672,6 +1677,12 @@ static mspResult_e mspProcessInCommand(uint8_t cmdMSP, sbuf_t *src)
|
|||
if (sbufBytesRemaining(src) >= 1) {
|
||||
currentControlRateProfile->rcExpo[FD_PITCH] = sbufReadU8(src);
|
||||
}
|
||||
|
||||
// version 1.41
|
||||
if (sbufBytesRemaining(src) >= 2) {
|
||||
currentControlRateProfile->throttle_limit_type = sbufReadU8(src);
|
||||
currentControlRateProfile->throttle_limit_percent = sbufReadU8(src);
|
||||
}
|
||||
|
||||
initRcProcessing();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue