1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 13:25:30 +03:00

MSP fix bytes remaining check

We need at least 2 bytes for dyn_notch_max_hz.
This commit is contained in:
Hans Christian Olaussen 2021-04-02 21:37:54 +02:00
parent 025ee87a7a
commit 8497762f50

View file

@ -2660,7 +2660,7 @@ static mspResult_e mspProcessInCommand(mspDescriptor_t srcDesc, int16_t cmdMSP,
sbufReadU8(src);
#endif
}
if (sbufBytesRemaining(src) >= 1) {
if (sbufBytesRemaining(src) >= 2) {
#if defined(USE_GYRO_DATA_ANALYSE)
// Added in MSP API 1.43
gyroConfigMutable()->dyn_notch_max_hz = sbufReadU16(src);