mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
Apply the same maximum control rates (1.0) in CLI and MSP
Previously it was possible to set roll/pitch rate > 1.0 using MSP, but not using the CLI. Roll/pitch rate > 1.0 is meaningless. TPA is also limited to 1.0.
This commit is contained in:
parent
bcadd0803a
commit
828ec550cd
4 changed files with 19 additions and 9 deletions
|
@ -1331,9 +1331,9 @@ static bool processInCommand(void)
|
|||
currentControlRateProfile->rcRate8 = read8();
|
||||
currentControlRateProfile->rcExpo8 = read8();
|
||||
for (i = 0; i < 3; i++) {
|
||||
currentControlRateProfile->rates[i] = read8();
|
||||
currentControlRateProfile->rates[i] = MIN(read8(), i == FD_YAW ? CONTROL_RATE_CONFIG_YAW_RATE_MAX : CONTROL_RATE_CONFIG_ROLL_PITCH_RATE_MAX);
|
||||
}
|
||||
currentControlRateProfile->dynThrPID = read8();
|
||||
currentControlRateProfile->dynThrPID = MIN(read8(), CONTROL_RATE_CONFIG_TPA_MAX);
|
||||
currentControlRateProfile->thrMid8 = read8();
|
||||
currentControlRateProfile->thrExpo8 = read8();
|
||||
currentControlRateProfile->tpa_breakpoint = read16();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue