diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index 96acb9cbd..3c82bc7fc 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -1246,10 +1246,7 @@ void message(const pm_char *title, const pm_char *t, const char *last MESSAGE_SO } #if defined(GVARS) - int8_t trimGvar[NUM_STICKS] = { -1, -1, -1, -1 }; - #define TRIM_REUSED(idx) trimGvar[idx] >= 0 -#else - #define TRIM_REUSED(idx) 0 +int8_t trimGvar[NUM_STICKS] = { -1, -1, -1, -1 }; #endif #if defined(CPUARM) diff --git a/radio/src/opentx.h b/radio/src/opentx.h index 2ab9ec925..620357de3 100644 --- a/radio/src/opentx.h +++ b/radio/src/opentx.h @@ -770,6 +770,13 @@ int8_t getMovedSwitch(); #define getTrimFlightPhase(phase, idx) (phase) #endif +#if defined(GVARS) + extern int8_t trimGvar[NUM_STICKS]; + #define TRIM_REUSED(idx) trimGvar[idx] >= 0 +#else + #define TRIM_REUSED(idx) 0 +#endif + trim_t getRawTrimValue(uint8_t phase, uint8_t idx); int getTrimValue(uint8_t phase, uint8_t idx);