1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-24 00:35:34 +03:00
This commit is contained in:
Pawel Spychalski (DzikuVx) 2020-07-23 10:47:43 +02:00
parent 893e532f8b
commit 426d21a9fc
12 changed files with 70 additions and 474 deletions

View file

@ -35,7 +35,6 @@
#include "common/bitarray.h"
#include "common/time.h"
#include "common/utils.h"
#include "programming/global_functions.h"
#include "programming/global_variables.h"
#include "config/parameter_group_ids.h"
@ -551,18 +550,6 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
sbufWriteU32(dst, gvGet(i));
}
break;
#endif
#ifdef USE_PROGRAMMING_FRAMEWORK
case MSP2_INAV_GLOBAL_FUNCTIONS:
for (int i = 0; i < MAX_GLOBAL_FUNCTIONS; i++) {
sbufWriteU8(dst, globalFunctions(i)->enabled);
sbufWriteU8(dst, globalFunctions(i)->conditionId);
sbufWriteU8(dst, globalFunctions(i)->action);
sbufWriteU8(dst, globalFunctions(i)->withValue.type);
sbufWriteU32(dst, globalFunctions(i)->withValue.value);
sbufWriteU8(dst, logicConditions(i)->flags);
}
break;
#endif
case MSP2_COMMON_MOTOR_MIXER:
for (uint8_t i = 0; i < MAX_SUPPORTED_MOTORS; i++) {
@ -1953,20 +1940,6 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src)
} else
return MSP_RESULT_ERROR;
break;
#endif
#ifdef USE_PROGRAMMING_FRAMEWORK
case MSP2_INAV_SET_GLOBAL_FUNCTIONS:
sbufReadU8Safe(&tmp_u8, src);
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);
globalFunctionsMutable(tmp_u8)->withValue.type = sbufReadU8(src);
globalFunctionsMutable(tmp_u8)->withValue.value = sbufReadU32(src);
globalFunctionsMutable(tmp_u8)->flags = sbufReadU8(src);
} else
return MSP_RESULT_ERROR;
break;
#endif
case MSP2_COMMON_SET_MOTOR_MIXER:
sbufReadU8Safe(&tmp_u8, src);