1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-24 00:35:34 +03:00

Fix expected length of MSP2_INAV_SET_GLOBAL_FUNCTIONS frame (#5570)

* Fix expected length of MSP2_INAV_SET_GLOBAL_FUNCTIONS frame

* MSP2_INAV_SET_GLOBAL_FUNCTIONS length adjustment
This commit is contained in:
Paweł Spychalski 2020-04-05 18:09:42 +02:00 committed by GitHub
parent db12e87990
commit fe5ada21ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1958,7 +1958,7 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src)
#ifdef USE_GLOBAL_FUNCTIONS
case MSP2_INAV_SET_GLOBAL_FUNCTIONS:
sbufReadU8Safe(&tmp_u8, src);
if ((dataSize == 14) && (tmp_u8 < MAX_GLOBAL_FUNCTIONS)) {
if ((dataSize == 10) && (tmp_u8 < MAX_GLOBAL_FUNCTIONS)) {
globalFunctionsMutable(tmp_u8)->enabled = sbufReadU8(src);
globalFunctionsMutable(tmp_u8)->conditionId = sbufReadU8(src);
globalFunctionsMutable(tmp_u8)->action = sbufReadU8(src);