mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 09:45:33 +03:00
add msp frame to get GVAR values
This commit is contained in:
parent
6c7fd8ad36
commit
004082b67d
2 changed files with 7 additions and 0 deletions
|
@ -36,6 +36,7 @@
|
||||||
#include "common/time.h"
|
#include "common/time.h"
|
||||||
#include "common/utils.h"
|
#include "common/utils.h"
|
||||||
#include "common/global_functions.h"
|
#include "common/global_functions.h"
|
||||||
|
#include "common/global_variables.h"
|
||||||
|
|
||||||
#include "config/parameter_group_ids.h"
|
#include "config/parameter_group_ids.h"
|
||||||
|
|
||||||
|
@ -542,6 +543,11 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
|
||||||
sbufWriteU32(dst, logicConditionGetValue(i));
|
sbufWriteU32(dst, logicConditionGetValue(i));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case MSP2_INAV_GVAR_STATUS:
|
||||||
|
for (int i = 0; i < MAX_GLOBAL_VARIABLES; i++) {
|
||||||
|
sbufWriteU32(dst, gvGet(i));
|
||||||
|
}
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_GLOBAL_FUNCTIONS
|
#ifdef USE_GLOBAL_FUNCTIONS
|
||||||
case MSP2_INAV_GLOBAL_FUNCTIONS:
|
case MSP2_INAV_GLOBAL_FUNCTIONS:
|
||||||
|
|
|
@ -60,6 +60,7 @@
|
||||||
#define MSP2_INAV_GLOBAL_FUNCTIONS 0x2024
|
#define MSP2_INAV_GLOBAL_FUNCTIONS 0x2024
|
||||||
#define MSP2_INAV_SET_GLOBAL_FUNCTIONS 0x2025
|
#define MSP2_INAV_SET_GLOBAL_FUNCTIONS 0x2025
|
||||||
#define MSP2_INAV_LOGIC_CONDITIONS_STATUS 0x2026
|
#define MSP2_INAV_LOGIC_CONDITIONS_STATUS 0x2026
|
||||||
|
#define MSP2_INAV_GVAR_STATUS 0x2027
|
||||||
|
|
||||||
#define MSP2_PID 0x2030
|
#define MSP2_PID 0x2030
|
||||||
#define MSP2_SET_PID 0x2031
|
#define MSP2_SET_PID 0x2031
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue