diff --git a/src/main/fc/fc_msp.c b/src/main/fc/fc_msp.c index 8adea1b05b..596db0dc5c 100644 --- a/src/main/fc/fc_msp.c +++ b/src/main/fc/fc_msp.c @@ -36,6 +36,7 @@ #include "common/time.h" #include "common/utils.h" #include "common/global_functions.h" +#include "common/global_variables.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)); } break; + case MSP2_INAV_GVAR_STATUS: + for (int i = 0; i < MAX_GLOBAL_VARIABLES; i++) { + sbufWriteU32(dst, gvGet(i)); + } + break; #endif #ifdef USE_GLOBAL_FUNCTIONS case MSP2_INAV_GLOBAL_FUNCTIONS: diff --git a/src/main/msp/msp_protocol_v2_inav.h b/src/main/msp/msp_protocol_v2_inav.h index fd6a7c5e27..0367bc5a3b 100755 --- a/src/main/msp/msp_protocol_v2_inav.h +++ b/src/main/msp/msp_protocol_v2_inav.h @@ -60,6 +60,7 @@ #define MSP2_INAV_GLOBAL_FUNCTIONS 0x2024 #define MSP2_INAV_SET_GLOBAL_FUNCTIONS 0x2025 #define MSP2_INAV_LOGIC_CONDITIONS_STATUS 0x2026 +#define MSP2_INAV_GVAR_STATUS 0x2027 #define MSP2_PID 0x2030 #define MSP2_SET_PID 0x2031