mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 06:15:16 +03:00
Fix MSP_RC_TUNING and MSP_SET_RC_TUNING to cater for rcYawExpo
This commit is contained in:
parent
da8bb6f6fc
commit
f5bfe1ce83
1 changed files with 5 additions and 3 deletions
|
@ -908,7 +908,7 @@ static bool processOutCommand(uint8_t cmdMSP)
|
||||||
serialize16(masterConfig.looptime);
|
serialize16(masterConfig.looptime);
|
||||||
break;
|
break;
|
||||||
case MSP_RC_TUNING:
|
case MSP_RC_TUNING:
|
||||||
headSerialReply(10);
|
headSerialReply(11);
|
||||||
serialize8(currentControlRateProfile->rcRate8);
|
serialize8(currentControlRateProfile->rcRate8);
|
||||||
serialize8(currentControlRateProfile->rcExpo8);
|
serialize8(currentControlRateProfile->rcExpo8);
|
||||||
for (i = 0 ; i < 3; i++) {
|
for (i = 0 ; i < 3; i++) {
|
||||||
|
@ -1365,7 +1365,7 @@ static bool processInCommand(void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MSP_SET_RC_TUNING:
|
case MSP_SET_RC_TUNING:
|
||||||
if (currentPort->dataSize >= 11) {//allow for yaw expo
|
if (currentPort->dataSize >= 10) {
|
||||||
currentControlRateProfile->rcRate8 = read8();
|
currentControlRateProfile->rcRate8 = read8();
|
||||||
currentControlRateProfile->rcExpo8 = read8();
|
currentControlRateProfile->rcExpo8 = read8();
|
||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
|
@ -1377,7 +1377,9 @@ static bool processInCommand(void)
|
||||||
currentControlRateProfile->thrMid8 = read8();
|
currentControlRateProfile->thrMid8 = read8();
|
||||||
currentControlRateProfile->thrExpo8 = read8();
|
currentControlRateProfile->thrExpo8 = read8();
|
||||||
currentControlRateProfile->tpa_breakpoint = read16();
|
currentControlRateProfile->tpa_breakpoint = read16();
|
||||||
currentControlRateProfile->rcYawExpo8 = read8();
|
if (currentPort->dataSize >= 11) {
|
||||||
|
currentControlRateProfile->rcYawExpo8 = read8();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
headSerialError(0);
|
headSerialError(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue