1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Merge pull request #9519 from Asizon/ratesTypeToMsp

Added rates type to Msp
This commit is contained in:
Michael Keller 2020-02-28 10:08:15 +13:00 committed by GitHub
commit 41a59bfe10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1225,6 +1225,9 @@ static bool mspProcessOutCommand(int16_t cmdMSP, sbuf_t *dst)
sbufWriteU16(dst, currentControlRateProfile->rate_limit[FD_PITCH]);
sbufWriteU16(dst, currentControlRateProfile->rate_limit[FD_YAW]);
// added in 1.43
sbufWriteU8(dst, currentControlRateProfile->rates_type);
break;
case MSP_PID:
@ -2260,6 +2263,11 @@ static mspResult_e mspProcessInCommand(mspDescriptor_t srcDesc, int16_t cmdMSP,
currentControlRateProfile->rate_limit[FD_YAW] = sbufReadU16(src);
}
// version 1.43
if (sbufBytesRemaining(src) >= 1) {
currentControlRateProfile->rates_type = sbufReadU8(src);
}
initRcProcessing();
} else {
return MSP_RESULT_ERROR;