mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 01:35:35 +03:00
Merge branch 'inav-rates-in-dps' of https://github.com/DzikuVx/cleanflight into DzikuVx-inav-rates-in-dps
This commit is contained in:
commit
f77eb4788d
15 changed files with 124 additions and 105 deletions
|
@ -737,7 +737,7 @@ static bool processOutCommand(uint8_t cmdMSP)
|
|||
break;
|
||||
case MSP_RC_TUNING:
|
||||
headSerialReply(11);
|
||||
serialize8(currentControlRateProfile->rcRate8);
|
||||
serialize8(100); //rcRate8 kept for compatibity reasons, this setting is no longer used
|
||||
serialize8(currentControlRateProfile->rcExpo8);
|
||||
for (i = 0 ; i < 3; i++) {
|
||||
serialize8(currentControlRateProfile->rates[i]); // R,P,Y see flight_dynamics_index_t
|
||||
|
@ -1220,11 +1220,11 @@ static bool processInCommand(void)
|
|||
|
||||
case MSP_SET_RC_TUNING:
|
||||
if (currentPort->dataSize >= 10) {
|
||||
currentControlRateProfile->rcRate8 = read8();
|
||||
read8(); //Read rcRate8, kept for protocol compatibility reasons
|
||||
currentControlRateProfile->rcExpo8 = read8();
|
||||
for (i = 0; i < 3; i++) {
|
||||
rate = read8();
|
||||
currentControlRateProfile->rates[i] = MIN(rate, i == FD_YAW ? CONTROL_RATE_CONFIG_YAW_RATE_MAX : CONTROL_RATE_CONFIG_ROLL_PITCH_RATE_MAX);
|
||||
currentControlRateProfile->rates[i] = constrain(rate, i == FD_YAW ? CONTROL_RATE_CONFIG_YAW_RATE_MIN : CONTROL_RATE_CONFIG_ROLL_PITCH_RATE_MIN, i == FD_YAW ? CONTROL_RATE_CONFIG_YAW_RATE_MAX : CONTROL_RATE_CONFIG_ROLL_PITCH_RATE_MAX);
|
||||
}
|
||||
rate = read8();
|
||||
currentControlRateProfile->dynThrPID = MIN(rate, CONTROL_RATE_CONFIG_TPA_MAX);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue