mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 01:35:35 +03:00
Add MSP2_INAV_LOGIC_CONDITIONS_SINGLE
This commit is contained in:
parent
ebf88e1a86
commit
ed802fedc6
2 changed files with 14 additions and 1 deletions
|
@ -534,6 +534,18 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#ifdef USE_PROGRAMMING_FRAMEWORK
|
#ifdef USE_PROGRAMMING_FRAMEWORK
|
||||||
|
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);
|
||||||
|
sbufWriteU8(dst, logicConditions(i)->operandB.type);
|
||||||
|
sbufWriteU32(dst, logicConditions(i)->operandB.value);
|
||||||
|
sbufWriteU8(dst, logicConditions(i)->flags);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case MSP2_INAV_LOGIC_CONDITIONS_STATUS:
|
case MSP2_INAV_LOGIC_CONDITIONS_STATUS:
|
||||||
for (int i = 0; i < MAX_LOGIC_CONDITIONS; i++) {
|
for (int i = 0; i < MAX_LOGIC_CONDITIONS; i++) {
|
||||||
sbufWriteU32(dst, logicConditionGetValue(i));
|
sbufWriteU32(dst, logicConditionGetValue(i));
|
||||||
|
@ -3232,7 +3244,7 @@ bool mspFCProcessInOutCommand(uint16_t cmdMSP, sbuf_t *dst, sbuf_t *src, mspResu
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_PROGRAMMING_FRAMEWORK
|
#ifdef USE_PROGRAMMING_FRAMEWORK
|
||||||
case MSP2_INAV_LOGIC_CONDITIONS:
|
case MSP2_INAV_LOGIC_CONDITIONS_SINGLE:
|
||||||
*ret = mspFcLogicConditionCommand(dst, src);
|
*ret = mspFcLogicConditionCommand(dst, src);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -80,3 +80,4 @@
|
||||||
#define MSP2_INAV_SET_SAFEHOME 0x2039
|
#define MSP2_INAV_SET_SAFEHOME 0x2039
|
||||||
|
|
||||||
#define MSP2_INAV_MISC2 0x203A
|
#define MSP2_INAV_MISC2 0x203A
|
||||||
|
#define MSP2_INAV_LOGIC_CONDITIONS_SINGLE 0x203B
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue