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

Correct length of MSP SET frame for logic conditions

This commit is contained in:
Pawel Spychalski (DzikuVx) 2019-04-01 21:06:46 +02:00
parent 298c2810b0
commit d0073d63b7

View file

@ -1893,7 +1893,7 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src)
#ifdef USE_LOGIC_CONDITIONS
case MSP2_INAV_SET_LOGIC_CONDITIONS:
sbufReadU8Safe(&tmp_u8, src);
if ((dataSize == 13) && (tmp_u8 < MAX_LOGIC_CONDITIONS)) {
if ((dataSize == 14) && (tmp_u8 < MAX_LOGIC_CONDITIONS)) {
logicConditionsMutable(tmp_u8)->enabled = sbufReadU8(src);
logicConditionsMutable(tmp_u8)->operation = sbufReadU8(src);
logicConditionsMutable(tmp_u8)->operandA.type = sbufReadU8(src);