mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-24 00:35:34 +03:00
Add activatorId to CLI and MSP
This commit is contained in:
parent
e17e12ad03
commit
ae8d29c025
4 changed files with 33 additions and 4 deletions
|
@ -530,6 +530,7 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
|
|||
case MSP2_INAV_LOGIC_CONDITIONS:
|
||||
for (int i = 0; i < MAX_LOGIC_CONDITIONS; i++) {
|
||||
sbufWriteU8(dst, logicConditions(i)->enabled);
|
||||
sbufWriteU8(dst, logicConditions(i)->activatorId);
|
||||
sbufWriteU8(dst, logicConditions(i)->operation);
|
||||
sbufWriteU8(dst, logicConditions(i)->operandA.type);
|
||||
sbufWriteU32(dst, logicConditions(i)->operandA.value);
|
||||
|
@ -1949,8 +1950,9 @@ 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 == 14) && (tmp_u8 < MAX_LOGIC_CONDITIONS)) {
|
||||
if ((dataSize == 15) && (tmp_u8 < MAX_LOGIC_CONDITIONS)) {
|
||||
logicConditionsMutable(tmp_u8)->enabled = sbufReadU8(src);
|
||||
logicConditionsMutable(tmp_u8)->activatorId = sbufReadU8(src);
|
||||
logicConditionsMutable(tmp_u8)->operation = sbufReadU8(src);
|
||||
logicConditionsMutable(tmp_u8)->operandA.type = sbufReadU8(src);
|
||||
logicConditionsMutable(tmp_u8)->operandA.value = sbufReadU32(src);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue